I'm trying to install some software using a batch script and using schtasks to start a service every day at midnight.
The script works fine, but it prompts for a password, which causes the script to hang. I've tried using the '/RU "user" /RP ""' flags, which seemed to work in XP, but not under Vista.
What is the right way to do this?
If you understand the security implications*, you could run tasks with the local System account without a password.
This also works through the GUI, just enter SYSTEM as the user name and leave the password field blank.
*The biggest security risk would be someone changing the script or executable your scheduled task is pointed at. Be sure to set the file permissions accordingly.
Have you tried /u and /p (without the R)?
From the help file:
Alternatively you could try using this utility to create a run as command for your task: http://www.robotronic.de/runasspc/