Start/stop Windows Service A also Start/stop Windows service B
Posted
by
Sean
on Server Fault
See other posts from Server Fault
or by Sean
Published on 2011-11-29T19:06:26Z
Indexed on
2011/11/30
18:00 UTC
Read the original article
Hit count: 556
I created two Windows services A and B, and would like to add dependency between them so that I can:
Start service A (service B starts automatically)
Stop service A (service B stops automatically)
However, the command sc config ServiceA depend= ServiceB
only works for:
Start service A (service B starts automatically)
Stop service B (service A stops automatically)
Is there any way to make service B stop automatically when I stop service A?
© Server Fault or respective owner