Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
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
add comment

1 Answer

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

share|improve this answer
    
Thanks, but it already has that right. The logon succeeds, according to the Security log. –  EMP Feb 27 '11 at 23:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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