How to change user credentials of windows service from command line?

How to change user credentials of windows service from command line?


You're looking for:

sc config <servicename> obj= <accountname> password= <password>

The "sc" command will work on remote machines, too. Start it with no arguments to get more info. (It's a bit odd in requring spaces after many of the arguments. I can't say I've seen a similiar command-line program.)