0

When I type

c:\windows\system32\taskkill.exe /im somename.exe /t

in the run box of the scheduled tasks wizard,the job completes successfully,but if I used the windows command prompt instead and I typed the following:

schtasks /create /sc once /sd 01/01/2009 /st 16:16:16 /ru confused /rp bigheadache /tn sametask /tr c:\windows\system32\taskkill.exe /im somename.exe /t

I run into all sorts of syntax errors.It is very cofusing indeed! The path to the executable doesn't contain spaces.There is that mandatory space between the parameters and the executable,and I have tried quotes in all sorts of combinations but to no avail. Why is the CLI playing up?

The check box "only if I am logged on" is useless because even if it is not checked and you log out after setting the task the GUI s for the applications[that are in the schtasks list] would be invisible to you when you log in! Is there a work around for this annoyance?

1
Contributor
1
Reply
2
Views
8 Years
Discussion Span
Last Post by knowledgehog
0

schtasks /create /sc once /sd 01/01/2009 /st 16:16:16 /ru confused /rp bigheadache /tn sametask /tr c:\windows\system32\taskkill.exe /im somename.exe /t should be typed as:

schtasks /create /sc once /sd 01/01/2009 /st 16:16:16 /ru confused /rp bigheadache /tn sametask /tr "c:\windows\system32\taskkill.exe /im somename.exe /t"

because whatever comes after /tr has to be a string and by using quotes we are telling the processor the whole expression is a string!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.