Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make UAC optional in Windows Installer on Vista

I'm have written an msi file that offers a choice of "per-user" or "for all" installation in the UI phase, and now find that the installer fails on Vista:

  • if I just reuse the installer that works for XP, Vista will trigger a UAC prompt even for the "per-user" installation, making that installation pointless
  • if I turn off UAC in bit 3 of PID_WORDCOUNT, Vista won't invoke UAC at all anymore, so even if the user would have permission to install into the machine registry (say), the privilege raising doesn't happen, so the installation fails.

So: how can I prevent installer from invoking UAC when it isn't really needed? Alternatively, how can I programmatically request UAC even if bit 3 is set?

like image 310
Martin v. Löwis Avatar asked Oct 31 '08 08:10

Martin v. Löwis


Video Answer


1 Answers

Unfortunately, the Windows Installer does not provide a way to create a single package that can install per-machine and per-user but only prompt for UAC on the per-machine case. The issue is that the bit that can suppress the UAC prompt is stored in the SummaryInformation stream and is not modifiable while the package is executing.

like image 83
Rob Mensching Avatar answered Oct 04 '22 11:10

Rob Mensching