Search code examples
wixwix3.11wix4

How does WiX decide the installation scope (perUser, perMachine)?


I have two products, ProdU and ProdM. ProdU gets installed "per user" (=registered under Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Installer\Products\), ProdM gets installed "per machine" (=registered under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\). WiX decided this, I did not intentionally configure it!

Now I created two Major Upgrade installers, and WiX decided that both of them are "per machine". Which leads to the problem, that ProdU does not get updated at all, because of the second "Note" here:

If an application is installed in the per-user installation context, any major upgrade to the application must also be performed using the per-user context. If an application is installed in the per-machine installation context, any major upgrade to the application must also be performed using the per-machine context. The Windows Installer will not install major upgrades across installation context.

Now how does WiX decide the scope, given I do not set it manually?

PS, in case it's important: ProdU and ProM are WiX 3.11-based, the updates are WiX 4-based.


Solution

  • In WiX v3, if you don't specify a Package/@InstallScope the default is per-user.

    But you can change the install scope at install time by setting the ALLUSERS property. That is actually what controls if the package is installed per-user or per-machine.

    So, you'll want to look at your log files to see how the ALLUSERS property is set.