tungpn
asked on
how to start my service after all of services were started
Hi experts,
I built my service but now I want to my service is started when others services were started. Could you tell me whether or not I can do it? what functions I can use for configuring it?
Thanks you.
I built my service but now I want to my service is started when others services were started. Could you tell me whether or not I can do it? what functions I can use for configuring it?
Thanks you.
take a look at the DependsOnService registry key. This list the service(s) which must start before that service can start.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In this case you need to install the service first, so that the Windows service control manager knows about it. For this you can either use the instsrv command or implement the installation into your service itself. To see how to use instsrv just run it from the cmmand line and it will show it's arguments with examples.
If the service is properly installed you can configure, start and stop with the services control panel (just run services.msc from the command line). I.e. setting the startup type to Automatic in the service's properties will start it automatically when Windows is started.