window服务创建后设置依赖启动问题
作者:互联网
refs:
Examples
Dependency on one other service:
sc config ServiceA depend= ServiceB
Above means that ServiceA will not start until ServiceB has started. If you stop ServiceB, ServiceA will stop automatically.
Dependency on multiple other services:
sc config ServiceA depend= ServiceB/ServiceC/ServiceD/"Service Name With Spaces"
Above means that ServiceA will not start until ServiceB, ServiceC, and ServiceD have all started. If you stop any of ServiceB, ServiceC, or ServiceD, ServiceA will stop automatically.
To remove all dependencies:
sc config ServiceA depend= /
To list current dependencies:
sc qc ServiceA
标签:依赖,ServiceC,创建,ServiceA,stop,will,window,ServiceB,sc 来源: https://blog.csdn.net/Henry_Wu001/article/details/118071860