sc.exe 失败并显示 1639
我们正在设置一个新环境,我正在编写批处理文件以在集群中的多台机器上使用。一致性是我的朋友。 :)
命令行仅列出参数并设置 errorlevel=1639。
d:\services\WFCContainerStatus>sc config ContainerStatusService start=auto
DESCRIPTION:
Modifies a service entry in the registry and Service Database.
USAGE:
sc <server> config [service name] <option1> <option2>...
OPTIONS:
NOTE: The option name includes the equal sign.
A space is required between the equal sign and the value.
type= <own|share|interact|kernel|filesys|rec|adapt>
start= <boot|system|auto|demand|disabled|delayed-auto>
error= <normal|severe|critical|ignore>
binPath= <BinaryPathName>
group= <LoadOrderGroup>
tag= <yes|no>
depend= <Dependencies(separated by / (forward slash))>
obj= <AccountName|ObjectName>
DisplayName= <display name>
password= <password>
d:\services\WFCContainerStatus>echo %errorlevel%
1639
至少可以说,查找错误代码是一次尝试。尝试 net helpmsg 是有用的。
d:\services\WFCContainerStatus>net helpmsg 1639
Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.
我确信这是一件微不足道的事情,我做错了,而且我根本没有看到它。
有人对此有什么想法吗?
We're setting up a new enviroment and I'm writing batch files to used across multiple machines in a cluster. Consistency is my friend. :)
The command line simply lists the parameters and sets the errorlevel=1639.
d:\services\WFCContainerStatus>sc config ContainerStatusService start=auto
DESCRIPTION:
Modifies a service entry in the registry and Service Database.
USAGE:
sc <server> config [service name] <option1> <option2>...
OPTIONS:
NOTE: The option name includes the equal sign.
A space is required between the equal sign and the value.
type= <own|share|interact|kernel|filesys|rec|adapt>
start= <boot|system|auto|demand|disabled|delayed-auto>
error= <normal|severe|critical|ignore>
binPath= <BinaryPathName>
group= <LoadOrderGroup>
tag= <yes|no>
depend= <Dependencies(separated by / (forward slash))>
obj= <AccountName|ObjectName>
DisplayName= <display name>
password= <password>
d:\services\WFCContainerStatus>echo %errorlevel%
1639
Looking up the error code has been a trying experience to say the least. Trying net helpmsg was as usefil.
d:\services\WFCContainerStatus>net helpmsg 1639
Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.
I'm sure this is something trivial that I'm doing wrong and that I'm simply not seeing it.
Does anyone have any ideas on this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
显然,我需要学习阅读,因为我的答案就在我面前。
正如帮助文本所述,“等号和值之间需要一个空格。”添加空间,一切正常。
Apparently, I need to learn to read because my answer was right there in front of me.
As the help text said, "A space is required between the equal sign and the value." Add the space and everything works.