tags:

views:

32

answers:

1

I am trying to create a wix installer to install and start a Windows Service.
I am getting the following error: "Service"() could not be installed. Verify that you have sufficient privileges to install system services."

Below is the script i am using:

<File Id="filFBC5F84CB0C200C1A2F8FFB335A07753" KeyPath="yes" 
      Source="..\..\TestDotNet\Monarch.Server.WCF\EFI.Monarch.Server\bin\Release  \EFIMonarchServer.exe" />
<ServiceInstall Id="MonarchServerServiceInstaller"  
                Type="ownProcess" Vital="yes"  Name="EFI Monarch Server" 
                DisplayName="EFI Monarch Server"  
                Description="Testing EFI Monarch Server"  
                Start="auto" Account="LocalSystem" 
                ErrorControl="ignore" Interactive="yes" >
</ServiceInstall>  
<ServiceControl Id="StartService" Start="install" 
                Stop="both" Remove="uninstall" 
                Name="DiskManagement" Wait="yes" />
A: 

That message is always a red herring. It basically means you had an error starting the service. Anytime I put a new service into the install I leave the ServiceControl element out at first and start the service manually. If it won't start, I ( or the developer ) profile it to find out why. You could be missing a dependency, a problem with a service account ( not here ), problems connecting to a database or reading an xml file. The point is there is usually a problem with the service it self.

Once I can start it manually I go back and put the ServiceControl element back in.

Christopher Painter
I am able to start it manually. I dont think i am missing any dependency.
Subrat Agasti
Are any of your dependencies in the GAC? If so, there's a race problem in windows installer where you can't start a service that depends on a file you just installed to the GAC because MsiPublishAssemblies doesn't call into Fusion until the commit phase which is after the service tries to start.
Christopher Painter
For additional profiling, put the servicecontrol element back in and if/when you get the error, try to start it manually at that moment while the install is hung.
Christopher Painter