1
votes

I have a custom action in WiX that lists web sites from the current computer. That action needs elevated permissions. Is it possible to elevate in the InstallUISequence?

Before upgrading to Wix 3.8 I used setupbld to create a setup.exe that would elevate the installer, but that option seems to be gone now.

I'm starting to think that I need to create a bootstrapper to get around this problem.

2
Just found some information that if you sign your MSI, it would prompt for a UAC on launching the installation, however I have not verified this. Adjusting the WelcomeDlg from Wix to have the ElevatedShield-icon on the Next-button did also not prompt for admin rights. - taffit

2 Answers

1
votes

The user interface is only "elevated" if the setup is run with admin rights. As far as I know you can't elevate an MSI without launching it via a setup.exe bootstrapper.

Disclaimer: I am not sure if later versions of Windows emulate user rights only for the MSI GUI sequence.

0
votes

What if you write your own little application requiring admin rights and bypass the MSI GUI altogether by launching your setup silently? The application can then read all the web site stuff and use a list box to select the right one? There might even be sample code for this in WIX that I am not aware of.

You should be able to launch the setup silently via a standard msiexec.exe command line:

msiexec.exe /I "C:\Test.msi" /QN /L* "C:\msilog.log" SITE=http://www.example.com/

Or use DTF included with the WIX toolkit. See some info here: https://serverfault.com/a/596519/20599

One thing to be aware of is that the listing of the web pages may not be related to admin rights as much as privileges. A custom configuration could mean that even generic admin rights wouldn't work - but I guess that is rare.