Windows Service – Configuring a Service to Start Under Local Service Account from Command Line

command-line-interfaceconfigurationwindows-service

How can this problem be solved?

I know there is a sc utility, but I don't know how to assign the Local Service account to the obj parameter (because of the spaces in the name), and how to assign a blank password (I assume Local Service account has a blank password) to the password parameter.

Best Answer

This should work: SC CONFIG MyService binPath=c:\myprogram.exe obj=".\LocalSystem" password=""