< 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
這個是成功的
本文轉自 netcorner 部落格園部落格,原文連結: http://www.cnblogs.com/netcorner/archive/2012/05/02/2911916.html ,如需轉載請自行聯系原作者