今天重装了系统,Subversion服务也得重装。照例输入代码:
sc create svnserve binpath="d:/PortableApps/svn/svnserve.exe --service -r e:/svn" displayname="Subversion" depend=tcpip start=auto
可是居然出现了下面的提示:
D:/PortableApps/svn>sc create svnserve binpath="d:/PortableApps/svn/svnserve.exe
--service -r e:/svn" displayname="Subversion" depend=tcpip start=auto
Creates a service entry in the registry and Service Database.
SYNTAX:
sc create [service name] [binPath= ]
...
CREATE OPTIONS:
NOTE: The option name includes the equal sign.
type=
(default = own)
start=
(default = demand)
error=
(default = normal)
binPath=
group=
tag=
depend=
obj=
(default = LocalSystem)
DisplayName=
password=
我仔细检查注册表,没有同名的服务啊!浪费了半小时,才搞清楚,binpath=、dispalyname=、depend=后面是必须要有一个空格的。否则就会执行不成功。这语法,太奇怪了……
所以,正确的代码应该是这样:
sc create svnserve binpath= "d:/PortableApps/svn/svnserve.exe --service -r e:/svn" displayname= "Subversion" depend= tcpip start= auto
那么,原来我是怎么执行成功的呢?仔细想了想,以前的代码是直接从SVN帮助中复制的
本文分享了在重装系统后重新安装Subversion服务时遇到的问题及解决方案。由于输入命令时忽略了一些细节如空格导致服务无法正确创建,经过排查最终解决了问题。
766

被折叠的 条评论
为什么被折叠?



