Link to home
Start Free TrialLog in
Avatar of tungpn
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.
Avatar of x4u
x4u

Are you talking about a Window NT (or 2k/XP) service?

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.
take a look at the DependsOnService registry key. This list the service(s) which must start before that service can start.
ASKER CERTIFIED SOLUTION
Avatar of cwwkie
cwwkie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial