Issue with starting as network service

5.9k Views Asked by At

I have an app that I am trying to start as a network service..

This is how I do it: sc create "App" binpath= "app path" obj= .\NetworkService password= ""

But I keep getting an error - "The account name is invalid or does not exist, or the password is invalid for the account name specified."

Any pointers on what could be wrong...

2

There are 2 best solutions below

0
On

If you are using the proper syntax sc create "myservice" binPath= "C:\somepath\whatever.exe" DisplayName= "MyService" start= auto obj= ".\username" password= password and it's not working, I would guess that either you have the account name or password wrong, or you don't have access to that account... if you are using cmd to run the command you may need to run the command prompt as admin if you are on windows vista or higher.

Or something I just noticed... try and see what happens if you remove the quotes after 'password='

0
On

The problem is that the Network Service account must be specified as "NT Authority\NetworkService" and no password is needed.
That is, use this command:

sc create "App" binpath= "app path" obj= "NT Authority\NetworkService"