views:

19

answers:

1

Hello,

I have WIX installers for two windows services. Both are installed using the same credentials, but one works while the other fails with the error "Service "PCP Event Processor-3.9.9.0-wix' (MyServiceExeName) could not be installed. Verify that you have sufficient privileges to install system services.". I use a common wxi file for both projects with the credentials to use, so it's not an account name or domain name typo AFAICS. The only substantial differences between the two services being installed are:

  • The failing project has a .licx file for the 3rd party component.
  • the failing project is a WinExe project. The successful install is an Exe (Console style app)

As far as I can see, there is no real difference (obviously GUIDs are different) between the wxs files for the two installers. The failing component has WIX installer code like this:

<Component Id="cmpMainExe" Guid="{EXCISED-FOR-CUT-N-PASTERS}">
  <File Id="filASJHDJSDJSHGDJH" Source="$(var.EventPollingService.TargetDir)\EventPollingService.exe" />
  <ServiceInstall Name="$(var.SVCNAME)-$(var.ProductVersion)-$(var.BranchName)"
                  DisplayName="PCP $(var.SVCNAME)-$(var.ProductVersion)-$(var.BranchName)"
                  Type="ownProcess"
                  Interactive="no"
                  Start="auto"
                  Vital="yes"
                  ErrorControl="normal"
                  Description="Manages the state model of a user's session by handling incoming events from the dialler"
                  Account="$(var.ServiceAccountId)" 
                  Password="$(var.ServiceAccountPwd)" />
  <ServiceControl Id="StartWixServiceInstaller"
                  Name="$(var.SVCNAME)-$(var.ProductVersion)-$(var.BranchName)"
                  Start="install"
                  Wait="yes" />
  <ServiceControl Id="StopWixServiceInstaller"
                  Name="$(var.SVCNAME)-$(var.ProductVersion)-$(var.BranchName)"
                  Stop="both" Wait="yes"
                  Remove="uninstall" />
</Component>

I'm using Wix 3.5 with Votive in VS 2010, and both projects are .NET 3.5 SP1 apps. I'm using Windows 7, with UAC turned off.

Any ideas?

+1  A: 

Look at the two build MSI's in ORCA and verify the ServiceInstall table entries look the same.

However, in my experience, this is not likely to be an installer issue. This is usually a red herring that points to an application problem such as missing dependencies or application exception. After you rule out the ServiceInstall entries and verify that the service account credentials are correct, the account is not disabled and the account has the authority to logon as a service then start profiling your application. This is easiest to do right when the installer is hung at the error window.

Two last thoughts:

If a program has dependencies on the winsxs or GAC it won't work as these don't get installed until Commit execution which is after trying to start the service

If you need to grant the user LogonAsService rights look at the User element in WiX.

Christopher Painter