One method of performing this task is by using the IE7 GUI.
Open Internet Explorer, and from the Tools menu, open Internet Options.
Go to the General tab, and in the Browser History section, click on the Delete button.
In the Delete Browser History window, click one of the following buttons, based upon your
requirements:Temporary Internet Files > Delete files – To delete copies of web pages, images, and media that are saved for faster viewing.
Cookies > Delete cookies – To delete cookies, which are files stored on your computer by websites to save preferences such as login information.
History > Delete history – To delete the history of the websites you have visited.
Form data > Delete forms – To delete all the saved information that you have typed into forms.
Passwords > Delete passwords – To delete all the passwords that are automatically filled in when you log on to a website you've previously visited.
Delete all – To delete all of the above in one operation.
By using a command
However, sometimes it is much easier to simply run a command line command or batch file to perform the same tasks. I use such a batch file and place it in one of my "special scripts" folder, where I store all my cool stuff. All I have to do is simply double-click on it, and bingo, history, passwords, cookies and offline files are deleted.
Here are the independent commands you can use. Go to Start > Run. Type CMD and press Enter. In the Command Prompt window, type (or copy and paste) the following commands, and press Enter:
Delete Temporary Internet Files
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1
Delete Form Data
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16
Delete Stored Passwords
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255
Delete All with the "Also delete files and settings stored by add-ons" options selected
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351
Now it seems that the interesting bit is that you can combine the numbers to get 2 or more functions at the same time. For example, type:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 9
This will delete the files (+8) and history (+1) in one step. You can incorporate this into a logoff script, and assign it to users by using Group Policy (GPO).
Creating a shortcut
You can create a shortcut and place it on your desktop or Quick Launch toolbar.
Right-click on an empty spot on your desktop, select New > Shortcut.
In the Create Shortcut window, paste one of the above commands.
Give it an appropriate name, and press Finish.
You can also change the shortcut icon by right-clicking on it and selecting Properties. Next press the Change Icon button.
You can use the following file to find some interesting icons for the shortcut: