I'm trying to make a dual purpose package and I have problems with the upgrade.
by default my property are
ALLUSERS=2 and MSIINSTALLPERUSER=1
on the dialog readyToInstall if the "install for all users" is checked, I use SetProperty to put ALLUSERS=1 and MSIINSTALLPERUSER={} (just to be sure).
that part work fine, the registry are set in HKLM and the files in Program Files.
during upgdrade however ...
I have a custom action that check after the AppSearch if the keys are in HKLM it set ALLUSERS=1 and MSIINSTALLPERUSER={}.
if I make a minor update, the files are upgraded correctly.
if I make a major update, the registries are still in the HKLM but the files switch to LocalAppData (it follows the default value in fact), ignoring the fact that I force the ALLUSERS to 1 after the AppSearch.
(I even try to force it after the migrate feature state just to mimic the UI but it didn't worked either).
is there a way to make a major upgrade with dual purpose package?