Why can’t I change the target directory path during a Maintenance Installation?



Question


Why can’t I change the target directory path during a Maintenance Installation?


This is the last line of Changing the Target Location for a Directory [Windows Installer] where it says

Do not attempt to change the target directory path during a Maintenance Installation.

Answer

Components will retain the directories they were registered under. Setting TARGETDIR during maintenance mode interferes with the retention.

Content credit also belongs to






[Author: Robert Flaming]


This posting is provided “AS IS” with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm.

Comments (1)

  1. Josh says:

    I understand that the target directory cannot be changed after a first time install, but why is it that I have seen CostFinalize changing the target directory during a minor upgrade without any custom action or property reference causing the change? This doesn’t occur if the previous package is not installed. Has the minor upgrade broken some component rule that I have overlooked?