3
votes

We have our product installation built using WiX. It needs to be executed on servers and, because of its nature, needs to create user and assign this user specific rights (e.g. Execute as Service) For that we're using our own custom actions that are defined in C#-based custom actions library.

When we start installation by user who has administrative permissions, but is not administrator on Windows 2008 the system doesn't ask us to confirm that we want this application to be executed (UAC dialog is not shown). As result, all these action fails because the MSI seems to be run without Administrative permissions. We cannot make our action deferred because some of them need to be executed during UI sequence and need to be marked as "immediate".

How would we mark installer as one that needs Administrative permissions? We tried WiX attribute InstallPrivileges='elevated', but documentation says it is set by default and it didn't make any difference.

Thanks

2

2 Answers

5
votes

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

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

  • use Immediate custom action which collect data from UI
  • use Deferred with no impersonation custom action which use that data

The information collected by the UI custom actions can be stored in installer properties. These properties can be passed through Action Data (CustomActionData property) to the deferred actions.

1
votes

I use InstallPrivileges='elevated' in my install and it displays the UAC dialog on Windows 2008. Do you see the shield icon on the "Install" button?