SC.exe config <servicename> obj = LocalSystem gives an error

The sc.exe config <servicename> obj= LocalSystem command produces the following error:

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

I want to create a batch file to modify a specific service in LocalSystem, but the above command does not work. I can install LocalSystem via services.msc without problems.

Thanks.

+4
source share
3 answers

An empty password must be provided for LocalSystem:

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

try it...

 sc config **Myservice** obj= LocalSystem password= "" 
+1
source

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

If you specify a LocalSystem account when calling the CreateService or ChangeServiceConfig function, any password information that you provide is ignored.

0
source

All Articles