1
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?
1I've had problems in the past running tasks under accounts without a password -- so make sure the one you use has one. – martineau – 2011-02-27T12:57:10.150
What happens if you use runas to launch cmd.exe as the unprivileged user and run the batch file from there? – Justin Dearing – 2011-02-27T13:25:57.027
@martineau - yes, it has a password. @Justin Dearing - that works fine. – EMP – 2011-02-27T23:08:40.340