Hi ,
I had to create a scheduled task on a specific date - I tried using schtasks It worked well!.
SCHTASKS /create /tn "Mytask" /tr "cscript "C:\Remove.vbs"" /sc ONCE /sd 08/02/2014 /st 14:25 /RL HIGHEST /RU SYSTEM
But when I try to embed this in VBscript it throws me below error.
Set oShell = WScript.CreateObject ("WScript.Shell")
oShell.run "cmd.exe /C SCHTASKS /create /tn "Mytask1" /tr "cscript "C:\Remove.vbs"" /sc ONCE /sd 12/04/2015 /st 12:00 /RL HIGHEST /RU SYSTEM
samp.vbs(6, 72) Microsoft VBScript compilation error: Expected end of statement
Can you please help.
Sai Krishna