If you are trying to run a batch file as a schedule task in Windows and the status of the task is “Could Not Start“, you can be a victim of a Windows 2003 server security policy 🙂 . As Microsoft says in this article, “In Windows Server 2003, the Users group does not have Read and Execute permissions to the command processor (Cmd.exe).” Therefore, you’ve got an “Access Denied” message in the Scheduled Tasks Log.
As you can find in the article mentioned above,
“This issue occurs if all the following conditions are true:
- You run the batch job on a Windows Server 2003-based member server.
- The batch job runs as a non-interactive process.
- The batch job is configured to run under the context of an account that is not a member of the Administrators group.“
In order to fix it,
- Find CMD.EXE file in the %windir%\System32 folder
- Add the system BATCH account to the ACL of the CMD.EXE using default permissions