Tuesday, 27 September 2011

WiX, Troubleshooting "Verify that you have sufficient privileges to install system services" error message

When running an installer created by using WiX (Windows Installer XML), you may sometimes get the following errorService 'Service Display Name' (ServiceName) could not be installed. Verify that you have sufficient privileges to install system services.

This error message, like many other in WiX is totally misleading - it is not about YOUR privileges, it is about how service account is resolved
The WiX ServiceInstall element is used to install Windows services. Its Account attribute should contain the name of the windows account that this windows service is supposed to run under.
This windows user name must be fully qualified - either as a domain or as machine name. This is true even for local accounts.
The solution is to set Account attribute like this:  <ServiceInstall ... Account=".\MyWindowsUser" .... />
Not like this: <ServiceInstall .... Account="MyWindowsUser" .... />

1 comment:

  1. Good point. Worked for me. Anyway, I think its better to force user to enter it in format domainName(computerName)\username.