[Windows] 批处理文件系统服务控制

在cmd下可有两种方法打开,net和sc。

 

net只能用于用于打开没有被禁用的服务。

启动: net start 服务名

停止: net stop 服务名

 

sc可打开被禁用的服务。

sc config 服务名 start= demand 

sc config 服务名 start= auto

sc config 服务名 start= disabled

sc start 服务名

sc stop 服务名

原文地址:https://www.cnblogs.com/southernduck/p/4002657.html