I'm running Windows XP x64 SP2. I have a Windows batch file that with some Robocopy commands that I want to run on schedule. I created a scheduled task for it, running as a dedicated user (not the user I'm logged on as), but it simply did not run. I could see successful logon events in the security log, so it got that far, but the commands in the batch file definitely weren't getting executed.

After reading through all of http://social.technet.microsoft.com/Forums/en-US/winservermanager/thread/d47d116e-10b9-44f0-9a30-7406c86c2fbe/ I tried making the target user account an Administrator and that fixed it - the batch file ran just fine. Nothing else seemed to work.

The thing is, I want it to run under a low-privileged account. Does anyone know how can I get a batch file to run on schedule as a non-Administrator?

  • 1
    I've had problems in the past running tasks under accounts without a password -- so make sure the one you use has one. – martineau Feb 27 '11 at 12:57
  • What happens if you use runas to launch cmd.exe as the unprivileged user and run the batch file from there? – Justin Dearing Feb 27 '11 at 13:25
  • @martineau - yes, it has a password. @Justin Dearing - that works fine. – EMP Feb 27 '11 at 23:08

Your unpriviledged user needs to be asigned the Logon as a batch job right.

  • Thanks, but it already has that right. The logon succeeds, according to the Security log. – EMP Feb 27 '11 at 23:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.