sc.exe 失败并显示 1639

发布于 2024-10-31 09:50:38 字数 1249 浏览 5 评论 0原文

我们正在设置一个新环境,我正在编写批处理文件以在集群中的多台机器上使用。一致性是我的朋友。 :)

命令行仅列出参数并设置 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

放低过去 2024-11-07 09:50:38

显然,我需要学习阅读,因为我的答案就在我面前。

d:\services\WFCContainerStatus>sc config ContainerStatusService start= auto
[SC] ChangeServiceConfig SUCCESS

正如帮助文本所述,“等号和值之间需要一个空格。”添加空间,一切正常。

Apparently, I need to learn to read because my answer was right there in front of me.

d:\services\WFCContainerStatus>sc config ContainerStatusService start= auto
[SC] ChangeServiceConfig SUCCESS

As the help text said, "A space is required between the equal sign and the value." Add the space and everything works.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文