Can't get xcopy cmd to run in task scheduler without user logged in (Windows 2012)
Hello,
I'm running Windows 2012 full
This task runs correctly -
I went to task scheduler created a new basic task
It has the security option set for domain\administrator
Run with highest privileges is selected (it doesn't matter what OS I configure it for)
Trigger runn every day at 11PM
Action Start a program
program - C:\Windows\System32\xcopy.exe
Arguments - v:\vhds\*.* d:\vhd\*.* /s
C:\Windows\System32\
Conditions - ponly if the computer is on AC
Settings - Allow task to be run on demand
stop if it runs longer than 3 days
Do not start a new instance
The task/ command runs perfectly
HOWEVER
If I just modify that task
Select Run whether user is logged in or not and give it the domain\administrator credentials and password (Do not store password is UNCHECKED)
The task does not do anything. It says running but it isn't running. The process isn't there under all processes and when it does run correctly the network utilization jumps to about 50% immediately and since there is no change I know it
isn't running correctly (sitting at about 1%).
I can't figure out why the task runs fine when set to run only when user is logged in and it will NOT run the task properly when set to run whether user is logged in or not.
I've also tried setting it for system. It doesn't matter if I set it to run at a time or if I manually select the task and click run - it says running but it does nothing.
May 9th, 2013 11:40pm
Is V: a local disk or a network share? If so - the drive won't be mapped when a user is not logged on. If that's not the case, you might consider making this job in a .cmd file and then adding some logging.
G. Samuel Hays
Free Windows Admin Tool Kit Click here and download it now
May 10th, 2013 4:21pm
Thanks!! I just changed it from a mapped drive to the IP share.
May 10th, 2013 5:36pm