1
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
I am running that command on my local machine only. I am not doing from remote computer. Although I am accessing the computer through remote access. my computer name has a hyphen "-" in it. Do you think becuase of hyphen I am getting this error? – user50273 – 2010-09-24T14:06:01.837
Why I am saying about hyphen because, I ran the same command on another system and its working fine. – user50273 – 2010-09-24T14:08:12.380
I guess the hyphen was escaped by the double quotes. The /ru & /rp are probably needed for the /s. If you are running the task on the local machine, you could probably get away with not using /s (and computer name) and change the /ru and /rp to /u and /p. I guess you need the task to run under alternate credentials and that is why you took the route you did. – Scott McClenning – 2010-09-24T23:25:56.403