5
votes

As far as I have researched and asked other people, it seems that regular MSI runs as limited user for most of the time, especially during GUI phases.

But the application requires elevated prompt during install phase anyway, and I would love to have admin rights during custom actions that are performed during GUI selection phases. Is there really no way to force the UAC prompt right at the beginning?

Also, some custom actions need to be performed during Active Directory install as well, and also cannot be done if the MSI runs as guest or something.

4

4 Answers

3
votes

Custom actions may still fail on Vista, Server 2008 and Windows 7 even when running an elevated installer. This is because they run by impersonating the user which elevated the process.

Custom actions which require full privileges and don't use per-user information should be marked to run without impersonation. This way they run under the local system account with no restrictions.

2
votes

You can launch your MSI from a bootstrapper, which contains appropriate manifest embedded.

2
votes

Use the Privileged Property in an lauchcondition.

1
votes

During GUI phase it always runs in non-elevated user context. Only custom action in the InstallExecuteSequence are elevated in deferred execution mode.

To fix this either you should re-design your MSI or use a bootstrapper (setup.exe) which request elevation at the startup

http://msdn.microsoft.com/en-us/magazine/cc163486.aspx#S7