使用sc命令创建svn服务的问题

 今天學了一下發佈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=

查了半天原因,原來是空格的問題, = 後面都有有空格的,所以,正确的代码应该是这样:

sc create svnserve binpath= "d:/PortableApps/svn/svnserve.exe --service -r e:/svn" displayname= "Subversion" depend= tcpip start= auto

你可能感兴趣的:(SVN,service,subversion)