Clean up Internet Explorer Data

Example scripts and tips (replaces Old Scripts & Tips archive)

Moderators: Dorian (MJT support), JRL, Phil Pendlebury

Post Reply
User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Clean up Internet Explorer Data

Post by Marcus Tettmar » Tue Aug 28, 2007 9:10 am

A macro to clean up Internet Explorer data (history, cookies, forms, passwords and temporary files) with a dialog to choose what data to purge.

Contributed by Ed Authier
Forum ID: edauthier

Code: Select all

Dialog>MyDialog
   Caption=Delete Browsing History IE7
   Width=445
   Height=279
   Top=CENTER
   Left=CENTER
   Button=Run Macro,184,198,98,20,3
   Button=Exit Macro,184,146,97,20,2
   CheckBox=msCheckBox1,Clear History,24,56,97,False
   CheckBox=msCheckBox2,Clear Form Data,24,88,97,False
   CheckBox=msCheckBox3,Clear Passwords,24,120,97,False
   CheckBox=msCheckBox4,Clear Temp Internet,24,152,113,False
   CheckBox=msCheckBox5,Clear Cookies,24,184,97,False
   CheckBox=msCheckBox6,Run All Routines,168,64,97,False
   CheckBox=msCheckBox7,Run All Routines + Add Ons,168,96,153,False
   Label=Individual Routines,24,24,true
   Label=Run All Routines,176,24,true
EndDialog>MyDialog

Label>MainLoop
  Show>MyDialog,result
  If>result=2,End
  If>result=3
    if>MyDialog.msCheckBox1=True,Clear_History
    if>MyDialog.msCheckBox2=True,Clear_Form
    if>MyDialog.msCheckBox3=True,Clear_Passwords
    if>MyDialog.msCheckBox4=True,Clear_Temp
    if>MyDialog.msCheckBox5=True,Clear_Cookies
    if>MyDialog.msCheckBox6=True,RunAll
    if>MyDialog.msCheckBox6=True,RunAllPlus
  Endif
Goto>MainLoop

Label>End

SRT>Clear_History
  Run Program>RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1
END>Clear_History

SRT>Clear_Form
  Run Program>RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16
End>Clear_Form

SRT>Clear_Passwords
  Run Program>RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32
End>Clear_Passwords

SRT>Clear_Temp
  Run Program>RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
End>Clear_Temp

SRT>Clear_Cookies
  Run Program>RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
End>Clear_Cookies

SRT>RunAll
  Run Program>RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255
End>RunAll

SRT>RunAllPlus
  Run Program>RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351
End>RunAllPlus
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts