Windows手动添加服务sccreate

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Windows⼿动添加服务sccreate
命令⾏创建服务项: sc create
⽤法:
sc <server> create [service name] [binPath= ] <option1> <option2>...
选项:
注意: 选项名称包括等号,等号和值之间需要⼀个空格。

type= <own|share|interact|kernel|filesys|rec|userown|usershare> (默认 = own)
start= <boot|system|auto|demand|disabled|delayed-auto> (默认 = demand)
error= <normal|severe|critical|ignore> (默认 = normal)
binPath= <.exe ⽂件的 BinaryPathName>
group= <LoadOrderGroup>
tag= <yes|no>
depend= <依存关系(以 / (斜杠)分隔)>
obj= <AccountName|ObjectName> (默认= LocalSystem)
DisplayName= <显⽰名称>
password= <密码>
⽰例:将 Redis 添加到服务,以管理员⾝份运⾏命令提⽰符
sc create Redis6.2.6 binPath= "D:\Redis6.2.6\redis-server.exe --service-run \"D:\Redis6.2.6\redis-windows.conf\"" DisplayName= Redis6.2.6 start= auto 命令中的双引号使⽤反斜杠加引号 \" 来进⾏转义处理
设置服务的描述: sc description
⽤法:
sc <server> description [service name] [description]
⽰例:修改 Redis 描述
sc description Redis6.2.6"This service runs the Redis server"。

相关文档
最新文档