Edit windows service to log on as specific user using a batch script

4

I have several programs that are installed as a service.

By default, after installation, the service runs as Local System Account.

I can change it through services.msc, service properties to the desired account. Is there a way to do the above using a script ?

Ofiris

Posted 2012-08-28T20:21:55.610

Reputation: 1 623

Found the solution, hope it will hope others.

From command line:

sc \server config ServiceName obj= Domain\user password= pass – Ofiris – 2012-08-28T20:24:09.380

1Please post your solution as an answer, so that you can accept it and close the question. – None – 2012-08-29T03:53:27.963

Answers

4

sc \\server config ServiceName obj= Domain\user password= pass

hope it helps.

Ofiris

Posted 2012-08-28T20:21:55.610

Reputation: 1 623