The AT command is pretty useful to this day as well, check it out.

From: [email protected] [mailto:[email protected]] On 
Behalf Of Marcum, John
Sent: Tuesday, August 11, 2015 2:52 PM
To: [email protected]
Subject: RE: [scripting] Simple VBScript to Delete Scheduled Tasks

Thanks guys. Someone sent me a working script offline. And yes it was /c plus 
some other oddities that I had done wrong.




From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Michael Niehaus
Sent: Tuesday, August 11, 2015 1:47 PM
To: [email protected]<mailto:[email protected]>
Subject: RE: [scripting] Simple VBScript to Delete Scheduled Tasks

It should also probably be “cmd /c” instead of “cmd c” ☺

-MTN

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Keith Garner (Hotmail)
Sent: Tuesday, August 11, 2015 10:28 AM
To: [email protected]<mailto:[email protected]>
Subject: RE: [scripting] Simple VBScript to Delete Scheduled Tasks

Run Schtasks to see if the paths entered below match what’s in the system.
Additionally, I would suggest “/change /disable” instead of “/delete”, cleaner.

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Ryan
Sent: Tuesday, August 11, 2015 7:36 AM
To: [email protected]<mailto:[email protected]>
Subject: Re: [scripting] Simple VBScript to Delete Scheduled Tasks

Because Windows is sad you aren't using Powershell.

On Mon, Aug 10, 2015 at 9:15 AM, Marcum, John 
<[email protected]<mailto:[email protected]>> wrote:
Can anyone tell me why this incredibly simple script that I stole from someone 
else does not work. After running the script the scheduled tasks are still 
present.

On Error Resume Next
Set objShell = WScript.CreateObject("WScript.Shell")
Set objExecObject = objShell.Exec("cmd c schtasks /Delete /TN ""\Adobe Acrobat 
Update Task"" /F")
Set objExecObject = objShell.Exec("cmd c schtasks /Delete /TN 
""\microsoft\windows\Application Experience\AitAgent"" /F")
Set objExecObject = objShell.Exec("cmd c schtasks /Delete /TN 
""\microsoft\windows\Customer Experience Improvement Program\Consolidator"" /F")
Set objExecObject = objShell.Exec("cmd c schtasks /Delete /TN 
""\Microsoft\Windows\Defrag\ScheduledDefrag"" /F")
Set objExecObject = objShell.Exec("cmd c schtasks /Delete /TN 
""\microsoft\windows\Customer Experience Improvement Program\KernelCeipTask"" 
/F")
Set objExecObject = objShell.Exec("cmd c schtasks /Delete /TN 
""\microsoft\windows\Application Experience\ProgramDataUpdater"" /F")
Set objExecObject = objShell.Exec("cmd c schtasks /Delete /TN 
""\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip"" /F")

wscript.quit


________________________________
        John Marcum
            MCITP, MCTS, MCSA
              Desktop Architect
   Bradley Arant Boult Cummings LLP
________________________________

  [H_Logo]


________________________________

Confidentiality Notice: This e-mail is from a law firm and may be protected by 
the attorney-client or work product privileges. If you have received this 
message in error, please notify the sender by replying to this e-mail and then 
delete it from your computer.







Reply via email to