命令格式:
描述:
在注册表和服务数据库中创建服务项。
用法:
sc <server> create [service name] [binPath= ] <option1> <option2>...
选项:
注意: 选项名称包括等号。等号和值之间需要一个空格。
type= <own|share|interact|kernel|filesys|rec>
(默认 = own)
start= <boot|system|auto|demand|disabled|delayed-auto>
(默认 = demand)
error= <normal|severe|critical|ignore>
(默认 = normal)
binPath= <BinaryPathName>
group= <LoadOrderGroup>
tag= <yes|no>
depend= <依存关系(以 / (斜杠) 分隔)>
obj= <AccountName|ObjectName>
(默认 = LocalSystem)
DisplayName= <显示名称>
password= <密码>
实例:
sc create TestServiceName binpath= "E:/intel/test.exe" DisplayName= "The Test Service" depend= RpcSs start= auto
depend后面加的是另一个服务名而不是另一个服务的DisplayName
每个=号后面要跟一个空格,而前面不要加空格。
binpath和DisplayName的值要用引号括起来。