|Subject:||SCHTASKS with Local user|
|Posted by:||Matt Brown - identify (MatthewBro…@gmail.com)|
|Date:||16 Mar 2006|
I am attempting to make a script that schedules a few tasks.
According to the Microsoft "documentation," /s defaults to the current
system; so the following should work:
SCHTASKS /Create /U administrator /P p4ssw0rd /RU "SYSTEM" /SC weekly
/D MON /TN CheckDisk /TR 1-chkdsk.bat /ST 01:00:00
However, I get the following error:
ERROR: Invalid syntax. Cannot specify user name without specifying
I then try the following:
SCHTASKS /Create /s %computername% /U administrator /P p4ssw0rd /RU
"SYSTEM" /SC weekly /D MON /TN CheckDisk /TR 1-chkdsk.bat /ST 01:00:00
I get the following error:
ERROR: Passing the user credential on local connection
So, %computername% works fine, but I can not authenticate. I also
tried to authenticate using my domain user and pass; which did not work
This seems like it'd be a pretty common problem.
Can anyone assist?