# sc ```bash # SC是一个命令行程序,用于服务控制管理,sc [命令] [服务名称] sc query service #查询服务状态 sc start service #启动服务 sc stop service #将STOP请求发送到服务 sc pause service #将PAUSE请求发送到服务 sc config service #更改服务的配置(持久) sc create service #创建一个服务(增加到注册表中) sc delete service #删除一个服务(从注册表中删除) sc description service #更改服务的描述 sc qc service #查询服务的配置信息 #更改服务的配置(持久) sc config [service] [option] #选项(等号和值之间需要一个空格。) type= start= error= binPath= group= tag= depend= <依存关系(以 / (斜杠) 分隔)> obj= DisplayName= <显示名称> password= <密码> #常用 sc config service start= demand #手动 sc config service start= auto #自动 sc config service start= disabled #禁用 #创建服务 sc create scname binPath= xxx.exe ```