How to setup “svnserve --service” to run on Windows?

偶尔善良 提交于 2019-12-01 17:43:42

问题


When starting from cmdline

svnserve.exe -d -r d:\svn\mytools

all working fine.

Then I had tried to set it up to run as Windows service:

@echo off
set SvnHome=C:\Program Files\TortoiseSVN
set SvnRepository=D:\Svn\mytools
sc delete SvnMyTools
sc create SvnMyTools binPath= "%SvnHome%\bin\svnserve.exe --service -r %SvnRepository%" start=   delayed-auto type= share

service was installed but it is unable to start. All the time it is reporting an error

Error 1083: The executable program that this service is configured to run in does not implement the service.

I have tried to edit service cmdline using regedit, so tried to add double quotes arround ref to exe, tried to change cmdline parameters (used -d instead of --service, used both -d and --service) and so on. Sometimes reported errors are looks a bit different but it does not work anyway. :-(

Question is - how to setup it to make it working as service on Windows 7 x64? Is it possible at all? I mean - if that "--service" cmdline switch is able to work in svnserve?

Note: svnserve version is 1.7.9 (r1462340). Rest of TortoiseSVN components are 1.7.12.24070.

Thanks in advance.


回答1:


Looks fine to me. My server is installed with this binary path:

"C:\Program Files\Subversion\svnserve.exe" --service -r "D:\Repositories" --listen-port "3690"

Did you try to install it outside of a script?




回答2:


It took me a while to figure out that the selected answer was not final, but a supplement to the question. This is the final one line command to execute:

sc create svnserve binpath="\"C:\Program Files\TortoiseSVN\bin\svnserve.exe\" --service -r D:\Repositories" displayname="Subversion Server" depend=Tcpip start=auto


来源:https://stackoverflow.com/questions/16281172/how-to-setup-svnserve-service-to-run-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!