Jeremy Stein - Brain
« class path resource [applicationContext.xml] cannot be opened because it does not exist | Log batch file output » |
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.
No Comments
Be the first to comment!
« class path resource [applicationContext.xml] cannot be opened because it does not exist | Log batch file output » |
Leave a Reply