views:

385

answers:

2

Hi,

During Installation, I'm installing my service using ServiceInstall and ServiceControl tags. But, my service is not running. I'm getting error message "Please check you have sufficient privilege to start service". But, I'm in Administrators group. I'm using Wix ver 3.0.

code snippet is here,

<File Id='myexe' Name='myexe.exe' DiskId='1'
        Source='myexe.exe' Vital='yes'>
</File>

<ServiceInstall Id='myService' DisplayName='MySampleService' 
                Name='MySampleService' 
                ErrorControl='normal' Start='auto' 
                Type='ownProcess' Vital='yes' />

     <ServiceControl Id="StartService"
                  Name="MySampleService" Start="install" Wait="yes" />
     <ServiceControl Id="StopService" Name="MySampleService"
                  Stop="both" Wait="yes" Remove="uninstall" />

Please help me.

+1  A: 

That is the generic error you get when the service fails to install or start (if you are telling it to do that) for any reason. It is very frustrating. The only way to debug is slowly remove dependencies until things finally work. More often than not, the service requires some code (an assembly in the GAC?) that isn't fully configured until later.

I usually debug by looking at the Services.msc and trying to start the service while the error message is up. That typically provides better error messages than the Windows Installer does.

Rob Mensching
A: 

You could also examine Window Eventlog to identify the problem. If the problem is a missing binary the you can use Depends to find out what is missing.

Vapour in the Alley

related questions