网上很多执行此命令的注意事项,满大街都是,不知道是原创的还是转的,都可以看看。但有一个注意事项都没有提到,就是如果路径中有空格时,反斜杠的方向,如下是正确的:
sc create SVNService binPath= "\"G:\Program Files\Subversion\bin\svnserve.exe\" --service -r G:\SSH\svnRepository\XSSH" DisplayName= "SVNService" depend= Tcpip start= auto
sc start SVNService
pause
如果写成这样:
sc create SVNService binPath= "/"G:/Program Files/Subversion/bin/svnserve.exe/" --service -r G:/SSH/svnRepository/XSSH" DisplayName= "SVNService" depend= Tcpip start= auto
运行后也不报错,直接出现下面的东西:
描述:
在注册表和服务数据库中创建服务项。
用法:
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= <密码>
另外,如果运行中无法找到