I have created a msi using Visual Studio Installer Projects. When i run the msi, uac prompt always appears in all machines. This is fine.
But for standard users, uac ask
Settings: At least the below settings must be enforced in a per-user package
. In WiX you have several constructs to help you with this, but I am not sure what Visual Studio Installer projects have. I do not like Visual Studio installer projects because of a number of severe technological limitations. Maybe consider using another tool? List of Deployment Tools, WiX Quick Start Tips.
Property Table: In the Property Table, set the following properties:
ALLUSERS=2
MSIINSTALLPERUSER=1
Summary Information: In Orca, go View
=> Summary Information...
=> Check the UAC Compliant
box. Then test on a virtual. Also test whilst actually logged in as a standard user (obviously). There seems to be a property called MSIDEPLOYMENTCOMPLIANT that can be set to 1 to do this as well. I have never tested it. Will do soon.
Orca: I would try that first. Use Orca or an equivalent tool (towards bottom, prefer Orca over SuperOrca). If you have Visual Studio installed you have the Orca installer in the SDK folders. Try searching for Orca-x86_en-us.msi
- under Program Files (x86)
.
(Currently the path is: C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86
- just replace the version numbers as appropriately and you should find the MSI quicker).
Some Links: Please read these two MSI SDK links:
To avoid the UAC window, your installer shouldn't do anything that is require elevated permissions (e. g. install files to Program Files
sub-folders or writing to registry in HKLM
sub keys). And you should specify this before the Windows Installer will go to the installation stage and show you the UAC window.
You'll need to make separate features for each configuration and switch them according to some conditions. For example, you could ask a user about which kind of installation he/she wants to perform or check if the user is an admin. According to this you should switch on/off the corresponding features in your MSI.