Reputation: 501
The command sc.exe config <servicename> obj= LocalSystem
results in 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 batch file to change a particular service to LocalSystem but the above command does not work. I can set LocalSystem via services.msc
without problems.
Thanks.
Upvotes: 6
Views: 18298
Reputation: 21
As written in: https://msdn.microsoft.com/de-de/library/windows/desktop/ms684190(v=vs.85).aspx
If you specify the LocalSystem account in a call to the CreateService or ChangeServiceConfig function, any password information you provide is ignored.
Upvotes: 0
Reputation: 501
For LocalSystem an empty password must be provided:
sc.exe config <servicename> obj= LocalSystem password= ""
Upvotes: 14
Reputation: 11
try this...
sc config **Myservice** obj= LocalSystem password= ""
Upvotes: 1