Why Major Upgrade does not upgrade previous Per-Machine installation?

673 views Asked by At

I am using Wix 3.5 with new Major Upgrade feature, I am also using WixUI_Advanced to allow user to choose between Per User (default) or Per Machine installation scope.

The Major Upgrade works fine with per-user installation scope when installing the newer version with the same per-user scope. However, when the old version was installed as Per Machine scope, installing new version with Per Machine scope does not actually upgrade the old one to the new one. Instead, I found 2 installed instances in Programs and Features.

I found this question and answer from StackOverflow: Wix Major Upgrade and Install Context Issues . The only answer from Ciprian was to execute FindRelatedProducts action again.

I dont know how to execute FindRelatedProducts again. Has anyone tried this and see it works, if yes, how?

Many thanks.

2

There are 2 answers

0
Sasha On

You can add element with required condition and Sequence in and . Though I didn't encounter your problem and can't tell for sure if this will help...

0
Huy Nguyen On

I managed to fix this by executing FindRelatedProducts action after user selects PerMachine scope then clicks on Next button on InstallScopeDlg dialog:

<UI Id="CustomWixUI_Advanced">

...

<Publish Dialog="CustomInstallScopeDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg" Order="7">WixAppFolder = "WixPerMachineFolder"</Publish>

<-- Here is how we construct Windows Installer to execute FindRelatedProducts action when user choose PerMachine installation scope then clicks Next button on InstallScopeDlg -->

<Publish Dialog="CustomInstallScopeDlg" Control="Next" Order="8" Event="DoAction" Value="FindRelatedProducts">WixAppFolder = "WixPerMachineFolder"</Publish>

</UI Id="CustomWixUI_Advanced">