Pages

May 13, 2011

Clear Browsing history through batch script

If you like to build batch files to automate cleanup on your computer, you'll probably want to include at least one of these commands in your batch script. You can automate any one of the functions on the Internet Explorer 7 Delete Browsing History dialog.


Here's the dialog that you are probably used to seeing:

And here's the commands that correspond to the different buttons. The most important one from a cleanup perspective is the first, which will delete just the temporary internet files that are cluttering up your computer.
To use these commands, just run them from the command line, the start menu search box in vista, or a batch file.



Temporary Internet Files

Code:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8Cookies
Code:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2History
Code:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1Form Data
Code:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16Passwords
Code:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32Delete AllCode:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255Delete All - "Also delete files and settings stored by add-ons"
Code:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351These tweaks should work in Internet Explorer 7 on Windows XP (SP2) and Windows Vista (all versions)

No comments: