SC.exe config <servicename> obj = LocalSystem给出错误</servicename>

时间:2010-11-15 02:59:37

标签: windows-services

命令sc.exe config <servicename> obj= LocalSystem会导致以下错误:

The account name is invalid or does not exist,
or the password is invalid for the account name specified.

我想创建批处理文件以将特定服务更改为 LocalSystem ,但上述命令不起作用。我可以通过services.msc设置 LocalSystem 而不会出现问题。

感谢。

3 个答案:

答案 0 :(得分:12)

对于 LocalSystem ,必须提供空密码:

sc.exe config <servicename> obj= LocalSystem password= ""

答案 1 :(得分:1)

试试这个......

sc config **Myservice** obj= LocalSystem password= ""

答案 2 :(得分:0)

写于: https://msdn.microsoft.com/de-de/library/windows/desktop/ms684190(v=vs.85).aspx

如果在调用CreateService或ChangeServiceConfig函数时指定LocalSystem帐户,则忽略您提供的任何密码信息。

相关问题