“sc”未被识别为内部或外部命令

Nis*_*mar 3 svn-server svnserve

svnserve.conf通过取消注释文件中的以下行进行更改后,我尝试使用 cmd 创建一个 svnserver ,

anon-access = read
auth-access = write
Run Code Online (Sandbox Code Playgroud)

在cmd中执行的命令是,

sc create svnserver binpath= "C:\Program Files\TortoiseSVN\bin\svnserve.exe --service -r c:\Goods\Repo" DisplayName= "Subversion" depend= tcpip start= auto
Run Code Online (Sandbox Code Playgroud)

但我收到错误

'sc' is not recognized as an internal or external command
Run Code Online (Sandbox Code Playgroud)

我不确定我做错了什么。我已经安装了 tortoise SVN Client 和 Visual SVN Server。有人可以让我知道我在这里缺少什么。

hai*_*mot 6

您需要在 Path 环境变量中添加 sc.exe 的路径(“c:\windows\system32\”)。通过按 Windows 键 + Pause|Break 然后选择高级系统设置来执行此操作 - 环境变量位于底部。只需在最后一个条目之后添加一个额外的条目 - 用分号分隔。如果这是不可能的,只需给命令提供 sc.exe 的完整路径,例如

"c:\windows\system32\sc.exe" 创建 svnserver ....