I am getting "ERROR: Network path was not found" when I try to create a scheduled task on my local machine. I am using this command at the command prompt: schtasks /tn taskname /tr taskpath /sc minute /mo 20 /sd 09/23/2010 /s \\%computername% /u username /p password
When I give the above command without computername, username and password the task gets created perfectly fine. What am I doing wrong??
EDIT : I got it working by using the below command. I do not understand why it is working becuase I am using /ru and /rp which are remote user and remote password settings whereas I am executing the command on my local machine. And I had to give double quotes to computername.
schtasks /tn taskname /tr taskpath /sc minute /mo 20 /sd 09/23/2010 /s "%computername%" /ru username /rp password