When upgrading from the pre-fix installer, it would dump everything

into the C:\ root as the UI never executes to set the value for
the MSI_INSTALLATIONDIRECTORY, and the custom action doesn't run
on upgrade as we should be reading from the registry in that situation

This will force the customaction to run when the path is the confusingly
named TARGETDIR (which is C:\ in 99% of cases).

All other properties when upgrading from the pre-fix to the fix
will be reset to the default values as well; which was the same
as the previous behaviour anyway.
This commit is contained in:
Rob Emery 2026-07-22 13:59:55 +01:00
parent f9d839c8c0
commit 5b0aa3ee97

View File

@ -98,7 +98,7 @@
</Directory>
<InstallUISequence>
<Custom Action="SetInstallDirProperty" After="CostFinalize">Not Installed AND NOT WIX_UPGRADE_DETECTED</Custom>
<Custom Action="SetInstallDirProperty" After="CostFinalize">(Not Installed AND NOT WIX_UPGRADE_DETECTED) OR (MSI_INSTALLATIONDIRECTORY=TARGETDIR)</Custom>
<Show Dialog="MyCustomPropertiesDlg" After="WelcomeDlg">Not Installed AND NOT WIX_UPGRADE_DETECTED</Show>
</InstallUISequence>