Jeremy Stein - Brain

« »

Scheduled Task running as Local Service can’t run net stop

I tried to create a scheduled task in Windows Server 2008 to run a batch file that calls NET STOP. I configured it to use LOCAL SERVICE and I checked “Run with highest privileges”.

I kept getting permission errors:

System error 5 has occurred.

Access is denied.

(Interestingly, this exits with errorlevel 2, which seems to be documented nowhere.)

I finally realized that I should be running as SYSTEM, not LOCAL SERVICE. I learned the difference.

July 19, 2012 No Comments.

No Comments

Be the first to comment!

Leave a Reply

Your email address will not be published. Required fields are marked *

Why ask?

« »