SC Create 添加服务不成功(总弹帮助信息)的原因[转]

< DOCTYPE html PUBLIC -WCDTD XHTML StrictEN httpwwwworgTRxhtmlDTDxhtml-strictdtd>

微软的介绍:
Creates a service entry in the registry and Service Database.

SYNTAX: 
sc create [service name] [binPath= ] <option1> <option2>...

CREATE OPTIONS:
NOTE: The option name includes the equal sign.
type= <own|share|interact|kernel|filesys|rec>
       (default = own)
start= <boot|system|auto|demand|disabled>
       (default = demand)
error= <normal|severe|critical|ignore>
       (default = normal)
binPath= <BinaryPathName>
group= <LoadOrderGroup>
tag= <yes|no>
depend= <Dependencies(separated by / (forward slash))>
obj= <AccountName|ObjectName>
       (default = LocalSystem)
DisplayName= <display name>
password= <password>

提示大家:sc cretate命令后面带的参数比如[binPath= ]的等号后面必须有个空格,没空格你怎么折腾都不行的,哈哈。微软还真搞笑啊,搞这么个功能迷惑人。同样,后面的其它参数比如group= , displayname=的等号后面都需要空格,不然sc create命令不会成功创建服务,只会返回给你帮助信息。

sc create nlsvc binpath= "F:\Program Files\NetLimiter 2 Lite\NLClient.exe" type= own start= demand DisplayName= NetLimiter

这个是成功的

posted @ 2012-05-02 10:56  netcorner  阅读(690)  评论(0编辑  收藏  举报