Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get WiX installer to request administrative privileges?

Tags:

We have a program we have developed in house. We are upgrading to use Visual Studio 2012, and so have to leave the Visual Studio installer project behind. InstallShield LE was giving us problems with shortcuts if the application was already installed. This left me with finally going with WiX.

I have researched this for a few days and read several posts on how to get administrator rights, but none of them seem to work. The Package element has InstallPrivileges="1" and the following Property element is present:

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

It will not request administrator privileges when it starts, and so it fails when it tries to create the program folder in C:\Program Files(x86).

like image 665
Opus Krokus Avatar asked Jan 15 '13 22:01

Opus Krokus


People also ask

How do I run as administrator in WiX Installer?

Setup tab > Run after execution input: your msi file name. Advanced tab > Mark Request Administrative access option checkbox.

How do I obtain administrator permission?

Select Start > Control Panel > Administrative Tools > Computer Management. In the Computer Management dialog, click on System Tools > Local Users and Groups > Users. Right-click on your user name and select Properties. In the properties dialog, select the Member Of tab and make sure it states "Administrator".

How does WiX Installer work?

The WiX tools follow the traditional compile and link model used to create executables from source code. At build time, the WiX source files are validated against the core WiX schema, then processed by a preprocessor, compiler, and linker to create the final result.


1 Answers

Answer on How to get WiX installer to request Administrative Privileges

Solution found by Opus Krokus in comment.

Answer

I added the following (to the Package element), and I am not sure which (or what combination) gave me what I need, but it works now: InstallPrivileges="elevated" AdminImage="yes" InstallScope="perMachine"

like image 192
Atrotygma Avatar answered Sep 27 '22 19:09

Atrotygma