Omi
Omi

Reputation: 1148

Issue with starting as network service

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...

Upvotes: 7

Views: 6270

Answers (2)

White hawk
White hawk

Reputation: 1538

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"

Upvotes: 17

Kat Cox
Kat Cox

Reputation: 3571

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='

Upvotes: 0

Related Questions