Install MSI and UAC

We have our product installation built using WiX. It must be executed on servers and, by its nature, must create a user and assign him certain user rights (for example, perform as a service). For this, we use our own user actions, which are defined in the library of user actions in C #.

When we start the installation by a user with administrator rights, but not an administrator in Windows 2008, the system does not ask us to confirm that we want this application to run (the UAC dialog is not displayed). As a result, all of these actions fail, because the MSI seems to be running without administrative permissions. We cannot postpone the action because some of them must be executed during the user interface sequence and must be marked as β€œimmediate”.

How do we mark an installer as one that needs administrative permissions? We tried the WiX attribute InstallPrivileges = 'elevated', but the documentation says that it is installed by default, and that didn't matter.

thank

+3
source share
2 answers

You cannot mark MSI directly to request administrator privileges. However, you can try using an EXE loader that requests elevation through its manifest: http://msdn.microsoft.com/en-us/library/bb756929.aspx

A better approach is to split your user actions instead of a single action that does everything:

  • Use immediate user actions that collect data from the user interface
  • Use Deferred without using a personalized action that uses this data

Information collected by the user actions of the user interface can be stored in the properties of the installer. These properties can be passed through Action Data (CustomActionData property) to pending actions.

+5

InstallPrivileges = '' , UAC Windows 2008. ""?

+1

Source: https://habr.com/ru/post/1787950/


All Articles