Skip to content
Fragmented Development

Troubleshooting: Scheduling Batch Scripts in Server 2003

For all of us stuck in a Windows Server environment, hopefully this will help a bit.

I encountered a problem running batch scripts as scheduled tasks in Windows Server 2003 under alternate credentials. I kept getting errors like the following:

Unable to start task.  
The specific error is:  
0x80070005: Access is denied.

It turns out that the reason this occurs isn't necessarily because of permission problems with the script itself, but with the Windows shell, cmd.exe. You see, the task scheduler isn't really running your batch script: it's running cmd.exe, with your script as an argument. So, you need to give read (maybe more?) permissions to the account that the service is running under, or else your script can't execute.

Yet another reason Linux is better as a server operating system...

Tags: server security troubleshooting


Add Your Comment