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

'sc' is not recognized as an internal or external command

我试图在更改 svnserve.conf 后使用 cmd 创建一个 svnserver,方法是取消注释文件中的以下行,

anon-access = read
auth-access = write

在cmd中执行的命令是,

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

但我收到错误消息

'sc' is not recognized as an internal or external command

我不确定我做错了什么。我已经安装了乌龟 SVN 客户端和 Visual SVN 服务器。 有人可以让我知道我在这里缺少什么吗?

您需要在 Path 环境变量中添加 sc.exe ("c:\windows\system32\") 的路径。为此,请按 windows 键 + 暂停|中断,然后选择高级系统设置 - 环境变量位于底部。只需在最后一个条目之后添加一个额外的条目 - 用分号分隔。如果这不可能,只需为命令提供 sc.exe 的完整路径,例如

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