Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a scheduled task that is supposed to run a batch file. The batch files runs file when called on it's own, but does not run when wrapped in a scheduled task.

Here is what the dialog looks like:

enter image description here

share|improve this question
See also… – lessthanideal Apr 14 '14 at 14:34

In my case the solution was to replace the mapped drive with the fully qualified path. So instead of:

XCOPY C:\DATA Z:\ (where Z is the drive mapped to \\SERVER\DATA$)

I changed to:


I run the task as Administrator and it worked like a charm.

share|improve this answer

If you are trying to copy these folders to a network share, it will not work because the scheduled task is run as 'System'. If this is the case, you have to specify which user the task is Run As.


share|improve this answer
@mmcglynn in the general tab, check out the user/group it is run under there. Enable the history on the item, and the history on the whole thing also , you will see more usefull errors. For me it was some stupid thing with the batch I forget what, but one of the batches wouldnt run hidden, I assume as security?? You will get it, but it can be a pain. Also running right after a boot can fail , a delay could solve that. – Psycogeek May 18 '12 at 1:09
@mmcglynn The link isn't toast, your computer is. I have accesed it from two different computers, as I said earlier. – cutrightjm May 19 '12 at 4:53
Did you ever try my suggestion? – cutrightjm Jul 7 '12 at 6:02

I managed to get around this by using a combination of the Robocopy utility (for its more robust logging and error handling) and the NET USE command.

NET USE B: \\remote-machine\location RemotePassword /user:remote-machine\RemoteUserName

robocopy.exe B:\ D:\backups /NP /LOG+:D:\robocopy\robocopy.log /R:10 /W:5

This script maps the remote location to the network drive B: using the specified username and password for the remote machine.

Robocopy then copies the contents of the folder on the network location to the D:\backups folder. This will also log details to the specified robocopy log file so you can see how many files have been copied etc.

share|improve this answer

It guess. But high possible. Execution of .bat or .cmd really imply execution of cmd.exe In Windows for some (I think security) reasons, cmd.exe os executable only for interactive user. So it only can be executed when user logged in locally.

Give some group right to execute cmd.exe as sheduled task and assign user from whom executing this task to this group.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .