Why don't batch files that I've executed using the Schedule service work?

A. Diagnosing batch files that work on their own but that don't execute correctly under the Schedule service is difficult. However, in most cases, the problem involves granting the appropriate permissions. When you run a batch file, you're executing it under your user profile, with all your rights and permissions. When you use the Schedule service to run the same batch file, you're executing the batch file under the System account, which likely has different permissions. To determine whether your batch files will work running under the System account, use the Schedule service to start a command session, and try to run your batch file:

   at <time in the near future> /inter cmd.exe /k  
The /k switch tells the command window not to close after the command completes. At the time specified, a command window will open under the System account, and you can use it to test your commands in the same environment as scheduled tasks run.
Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.