我正在尝试为svn创建一个Windows服务,但它无法正常工作。当我输入以下内容时:
c:\>sc create svnserver binpath="c:\Program Files\Svn\bin\svnserve.exe --service -r c:\repo" displayname=subversion depend=Tcpip start=auto
它只是回复了sc
的帮助选项:
DESCRIPTION:
Creates a service entry in the registry and Service Database.
USAGE:
sc <server> create [service name] [binPath= ] <option1> <option2>...
OPTIONS:
NOTE: The option name includes the equal sign.
A space is required between the equal sign and the value.
type= <own|share|interact|kernel|filesys|rec>
(default = own)
start= <boot|system|auto|demand|disabled|delayed-auto>
(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>
并且不会创建新服务。
答案 0 :(得分:0)
原始命令中有几个错误:
=
符号后都需要一个空格。"\"file path with space\""
)所以正确的命令是:
c:\>sc create svnserver binpath= "\"c:\Program Files\Svn\bin\svnserve.exe\" --service -r c:\repo" displayname= subversion depend= Tcpip start= auto
你应该看到一条信息
[SC] CreateService SUCCESS
表示一切顺利。