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]] On 
Behalf Of Ryan
Sent: Tuesday, August 11, 2015 7:36 AM
To: [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


  _____  


    

  

 

 

  _____  


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