I’d need to build a “single package authoring” MSI that is perMachine by default with the possibility to change the scope to perUser through an UI dialog.
One peculiarity there is that the perMachine default scope is not the usual recommended scope for dual-scope packages.
Another thing is that I’d need to change the scope at the installation time not with the standard InstallScopeDlg included in WixUI_Advanced, but by checking a checkbox on a custom “Welcome” dialog.
So the questions are whether it’s even possible to make a perUserOrMachine MSI to be perMachine by default with WiX and also whether it’s possible to change the scope from a custom dialog and using not radio-button group as on the standard dialog, but a “Install for current user only” checkbox (on a custom dialog).
Perhaps that was a naïve approach to the issue: first I tried defining two properties in the package, ALLUSERS and MSIINSTALLPERUSER with the initial values of 2 and 1 respectively, in which case Wix refused to build the MSI complaining about “duplicate symbols” ALLUSERS and MSIINSTALLPERUSER.
Regarding the scope change (also perhaps a naïve kind of approach), I tried assigning a property to the checkbox and hook a couple of custom actions to the dialog’s “Next” button that would check the value of the property associated with the checkbox and set MSIINSTALLPERUSER according to the current value: that didn’t work.
Where could I find some more information/examples regarding the way to achieve both things?
(tried guessing possible solutions after reading the Wix and Windows Installer documentation and trying to find some solution on Stack Overflow and I still can’t imagine quite clearly what exactly is needed for that to work.
(sorry if the message is rather long and perhaps it might need to have some code examples included: please tell me if some additional information is needed: I’ll add it)
Thank you
Dmytro Lyakh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.