scheduled tasks puzzle

Thread Solved
Reply

Join Date: Jan 2009
Posts: 2
Reputation: knowledgehog is an unknown quantity at this point 
Solved Threads: 0
knowledgehog knowledgehog is offline Offline
Newbie Poster

scheduled tasks puzzle

 
0
  #1
Jan 17th, 2009
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?
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 2
Reputation: knowledgehog is an unknown quantity at this point 
Solved Threads: 0
knowledgehog knowledgehog is offline Offline
Newbie Poster

Re: scheduled tasks puzzle

 
0
  #2
Jan 20th, 2009
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!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Windows NT / 2000 / XP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC