Michael Phoenix
New Member
- Joined
- Sep 21, 2015
- Messages
- 1
- Thread Author
- #1
I need to be able to use the schtasks command line utility to cteate a a task theat will run even when the user is not logged on. So far I have been unable to figure out away to do that. Any help would be appreciated.
I have tried several combinations of /RU and /RP and /u and /p without success detailed below along with the error messages that are returned:
Various attempts:
C:\Users\mphoenix>schtasks /create /tn test /st 18:00 /tr c:\scheduledtasks\test.bat /ru system /sc minute /mo 4 ERROR: Access is denied.
C:\Users\mphoenix>schtasks /create /tn test /st 18:00 /tr c:\scheduledtasks\test.bat /u system /sc minute /mo 4 ERROR: Invalid syntax. Cannot specify user name without specifying system name. Type "SCHTASKS /?" for usage.
C:\Users\mphoenix>schtasks /create /tn test /st 18:00 /tr c:\scheduledtasks\test .bat /u [my username] /p [my user password] /sc minute /mo 4 /NP ERROR: Invalid syntax. Cannot specify user name without specifying system name. Type "SCHTASKS /?" for usage.
C:\Users\mphoenix>schtasks /create /tn test /st 18:00 /tr c:\scheduledtasks\test.bat /ru system /sc minute /mo 4 /rp ERROR: Access is denied.
C:\Users\mphoenix>schtasks /create /tn test /st 18:00 /tr c:\scheduledtasks\test.bat /ru SYSTEM /sc minute /mo 4 /rp ERROR: Access is denied.
C:\Users\mphoenix>schtasks /create /tn test /st 18:00 /tr c:\scheduledtasks\test.bat /ru /sc minute /mo 4 /rp ERROR: Invalid syntax. Value expected for '/ru'. Type "SCHTASKS /CREATE /?" for usage.
C:\Users\mphoenix>schtasks /create /tn test /st 18:00 /tr c:\scheduledtasks\test.bat /ru /sc minute /mo 4 /rp ! ERROR: Invalid syntax. Value expected for '/ru'. Type "SCHTASKS /CREATE /?" for usage.
C:\Users\mphoenix>schtasks /create /tn test /st 18:00 /tr c:\scheduledtasks\test.bat /ru /sc minute /mo 4 /rp * ERROR: Invalid syntax. Value expected for '/ru'. Type "SCHTASKS /CREATE /?" for usage.
C:\Users\mphoenix>schtasks /create /tn test /st 18:00 /tr c:\scheduledtasks\test.bat /ru /sc minute /mo 4 /rp "*" ERROR: Invalid syntax. Value expected for '/ru'. Type "SCHTASKS /CREATE /?" for usage.
Exactly what am I missing here? I thought with /RU SYSTEM that you only need /RP to have no value or be "*".
I have tried several combinations of /RU and /RP and /u and /p without success detailed below along with the error messages that are returned:
Various attempts:
C:\Users\mphoenix>schtasks /create /tn test /st 18:00 /tr c:\scheduledtasks\test.bat /ru system /sc minute /mo 4 ERROR: Access is denied.
C:\Users\mphoenix>schtasks /create /tn test /st 18:00 /tr c:\scheduledtasks\test.bat /u system /sc minute /mo 4 ERROR: Invalid syntax. Cannot specify user name without specifying system name. Type "SCHTASKS /?" for usage.
C:\Users\mphoenix>schtasks /create /tn test /st 18:00 /tr c:\scheduledtasks\test .bat /u [my username] /p [my user password] /sc minute /mo 4 /NP ERROR: Invalid syntax. Cannot specify user name without specifying system name. Type "SCHTASKS /?" for usage.
C:\Users\mphoenix>schtasks /create /tn test /st 18:00 /tr c:\scheduledtasks\test.bat /ru system /sc minute /mo 4 /rp ERROR: Access is denied.
C:\Users\mphoenix>schtasks /create /tn test /st 18:00 /tr c:\scheduledtasks\test.bat /ru SYSTEM /sc minute /mo 4 /rp ERROR: Access is denied.
C:\Users\mphoenix>schtasks /create /tn test /st 18:00 /tr c:\scheduledtasks\test.bat /ru /sc minute /mo 4 /rp ERROR: Invalid syntax. Value expected for '/ru'. Type "SCHTASKS /CREATE /?" for usage.
C:\Users\mphoenix>schtasks /create /tn test /st 18:00 /tr c:\scheduledtasks\test.bat /ru /sc minute /mo 4 /rp ! ERROR: Invalid syntax. Value expected for '/ru'. Type "SCHTASKS /CREATE /?" for usage.
C:\Users\mphoenix>schtasks /create /tn test /st 18:00 /tr c:\scheduledtasks\test.bat /ru /sc minute /mo 4 /rp * ERROR: Invalid syntax. Value expected for '/ru'. Type "SCHTASKS /CREATE /?" for usage.
C:\Users\mphoenix>schtasks /create /tn test /st 18:00 /tr c:\scheduledtasks\test.bat /ru /sc minute /mo 4 /rp "*" ERROR: Invalid syntax. Value expected for '/ru'. Type "SCHTASKS /CREATE /?" for usage.
Exactly what am I missing here? I thought with /RU SYSTEM that you only need /RP to have no value or be "*".