Delete IE8 Temporary Data from the CLI

Delete IE8 Temporary Data from the CLI

There are a lot of ways to lockdown Internet Explorer. And, by default IE takes a portion of the free available disk space for its temporary files. The problem I encountered today was that I was running out of disk space on a Windows 2003 server. Removing temporary Internet Explorer files was a logical step, but I was unable to access the IE menu. The usual method of pressing the ALT key to see the menu was not functioning, and I immediately blamed the lockdown for this lack of functionality. Nevertheless, I had a server which was close to crashing: what should I do?

The answer was to delete the IE8 temporary data using the command line. The steps are as follows:

  1. Run a DOS prompt:
    • From the Start button | Run CMD
  2. Type in clear command:
    • RunDLL32.exe InetCpl.cpl,ClearMyTracksByProcess 255
  3. Exit the DOS prompt:
    • exit

The above clears temporary internet files, cookies, browser history, form data, and saved passwords. If you want to only clear temporary internet files then use an 8 instead of 255. For clearing cookies, use a 2. For clearing browser history only, use a 1. For clearing form data only, use a 16. Sending the command with a 32 clears only the saved passwords.

One of my big pet peeves is how even when logged into a machine as the local (or domain) administrator, Internet Explorer is locked down to the point of being completely dysfunctional. It wouldn’t be so terrible if IE wasn’t being used in XP and Windows Server 2003 as the method of running updates — but it is. So, I’m often left in a position of needing to unlock IE7 or IE8 in order to improve the overall security posture by patching.

Enough ranting, now you have a way of clearing non-essential IE data from the command line, even when you cannot access the IE menu.