Quantcast

Create a WiX MSI which always runs as an administrator

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Create a WiX MSI which always runs as an administrator

Kaveesh Dashora
This post has NOT been accepted by the mailing list yet.
I am working on creating an installer which has separate features. Each of the features are required to be installed / changed / repaired with admin priviliges.

When I install from the MSI for the first time. The selected features get installed correctly. However, if I run the MSI for the second time under maintanance mode, and perform a change in the features, the change operation is not performed correctly.

If I execute the MSI from an elevated command prompt, the change operation works fine.

Is there a way through which I can force the MSI to request admin privileges, regardless of the mode install / maintanance?

Note - I have tried using

<Property Id="MSIUSEREALADMINDETECTION" Value="1" />

This works fine for install / remove. I get to see the UAC dialog. However performing change / repair does not request for UAC.

This link specifies that the default behaviour of Change / Repair is to run without admin privileges. https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/48265402-1fbc-41d4-aedc-2c711750fe4a/windows-installer-change-action-does-not-require-admin-password-in-programs-and-features?forum=windowscompatibility

So, is it possible to run the MSI elevated directly when it starts?
Loading...