[wix-users] Dual Mode MSI installed in Per-User Mode requires elevation during minor update

Andrew Derry-Farrell ADerry-Farrell at Vispero.com
Wed Mar 13 12:26:36 PDT 2019


I want to make a dual mode MSI that can be installed as Per-User or Per-Machine based on the ALLUSERS and MSIINSTALLPERUSER property values. I created a sample MSI that installs a single file. I can install and uninstall the MSI in the Per-User mode by setting ALLUSERS=2 and MSIINSTALLPERUSER=1. However, when I try to perform a minor upgrade by rebuilding the MSI with a higher version, Microsoft Windows displays a UAC dialog saying "Do you want to allow the following program to update software on this computer?".

My per-user MSI cannot require any administrator privileges since it will be installed by users with Standard User accounts. Install and Uninstall seem to work as expected, but what do I need to change so a minor update does not require administrator privileges?


The section of the MSI log where the credential request is happening is below:

Action start 13:35:15: RegisterProduct.
MSI (s) (64:BC) [13:35:15:549]: Note: 1: 2205 2:  3: Error
MSI (s) (64:BC) [13:35:15:549]: Note: 1: 2228 2:  3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1302
MSI (s) (64:BC) [13:35:15:549]: Re-registering product - performing upgrade of existing installation.
MSI (s) (64:BC) [13:35:15:549]: Resolving source.
MSI (s) (64:BC) [13:35:15:549]: Resolving source to launched-from source.
MSI (s) (64:BC) [13:35:15:549]: Setting launched-from source as last-used.
MSI (s) (64:BC) [13:35:15:549]: PROPERTY CHANGE: Adding SourceDir property. Its value is 'C:\Users\adfarrell\Desktop\MSI\'.
MSI (s) (64:BC) [13:35:15:549]: PROPERTY CHANGE: Adding SOURCEDIR property. Its value is 'C:\Users\adfarrell\Desktop\MSI\'.
MSI (s) (64:BC) [13:35:15:549]: PROPERTY CHANGE: Adding SourcedirProduct property. Its value is '{8EB13D91-CE1A-4EF8-8D57-024CB710A357}'.
MSI (s) (64:BC) [13:35:15:549]: SOURCEDIR ==> C:\Users\adfarrell\Desktop\MSI\
MSI (s) (64:BC) [13:35:15:549]: SOURCEDIR product ==> {8EB13D91-CE1A-4EF8-8D57-024CB710A357}
MSI (s) (64:BC) [13:35:15:549]: SECREPAIR: CryptAcquireContext succeeded
MSI (s) (64:BC) [13:35:15:549]: Determining source type
MSI (s) (64:BC) [13:35:15:549]: Source type from package 'FileOnlyMSI.msi': 2
MSI (s) (64:BC) [13:35:15:549]: SECREPAIR: Hash Database: C:\Windows\Installer\SourceHash{8EB13D91-CE1A-4EF8-8D57-024CB710A357}
MSI (s) (64:BC) [13:35:15:564]: SECREPAIR: filename: FileOnlyMSI.msi Stored Hash Value:aCdGZQoBntomLwKdqhopRMXmQvjRH+NdhPd2LM21Fnw= Current Hash:D/NTdm5fIQlvK28G4Twf5fzgAOMJLv1TYTng12aUG+A=
MSI (s) (64:BC) [13:35:15:564]: Machine policy value 'AlwaysInstallElevated' is 0
MSI (s) (64:BC) [13:35:15:564]: User policy value 'AlwaysInstallElevated' is 0
MSI (s) (64:BC) [13:37:18:526]: MSI_LUA: Credential Request return = 0x800704C7
MSI (s) (64:BC) [13:37:18:526]: Note: 1: 3
MSI (s) (64:BC) [13:37:18:526]: SECUREREPAIR: SecureRepair Failed. Error code: 3F27344F8
Action ended 13:37:18: RegisterProduct. Return value 2.

More information about the wix-users mailing list