首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >sc.exe失败,返回1639

sc.exe失败,返回1639
EN

Stack Overflow用户
提问于 2011-04-09 04:08:04
回答 1查看 6.7K关注 0票数 4

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

命令行只列出参数并设置errorlevel=1639。

代码语言:javascript
复制
    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作为usefil。

代码语言:javascript
复制
d:\services\WFCContainerStatus>net helpmsg 1639

Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.

我确信这是我做错了的微不足道的事情,我只是没有意识到这一点。

有人对此有什么想法吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-04-09 05:06:17

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

代码语言:javascript
复制
d:\services\WFCContainerStatus>sc config ContainerStatusService start= auto
[SC] ChangeServiceConfig SUCCESS

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

票数 8
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5600259

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档