WIX installer: major update in the new installation directory

We use WiX to create installation packages. I am new to WiX technology and am currently trying to seriously upgrade the installed application, but in a different directory than the previous one. For example, if product v2 was installed in Program Files (x86) \ Old_path \ Product, I would like to install the updated version of v3 in another folder C: \ Program Files (x86) \ New_path \ Product.

I changed the msi INSTALLDIR property to a new path. We tried to modify InstallExecuteSequence, added RemoveRegistryValues ​​after InstallValidate to remove the saved old path in the registry, and did WriteRegistryValues ​​to add new registry values.

<InstallExecuteSequence>
....
    <Custom Action="HxPrepare" Before="InstallValidate">NOT Installed</Custom>
    <RemoveRegistryValues After="InstallValidate" />
    <WriteRegistryValues />
   <Custom Action="HxFinalize" Before="StartServices">NOT Installed</Custom>
....
<InstallExecuteSequence />

But I do not see changes during the installation process, and new files are copied only to the old directory path. Can I find out where this old path came from even after changing the INSTALLDIR path? How can we make this change to the installation path during major updates.

Reply to PhilDW comment:

. . , , , / . . , / , . . INSTALLDIR HxPrepare . , .

<InstallExecuteSequence>
<RemoveExistingProducts After="InstallInitialize" />
<Custom Action="PreventDowngrade" After="FindRelatedProducts">DOWNGRADE</Custom>
<Custom Action="HxInit" After="CostFinalize">NOT Installed</Custom>
<Custom Action="HxPrepare" Before="InstallValidate">NOT Installed</Custom>
<Custom Action="HxFinalize" Before="StartServices">NOT Installed</Custom>
<Custom Action="HxPreUninstall" Before="InstallValidate">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
<Custom Action="HxUninstall" After="InstallInitialize">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>

, , , , , , "C:\Program Files (x86)\New_manufacturer\ ". ?

+4

Source: https://habr.com/ru/post/1678762/


All Articles