Clear IE7 Browsing History From the Command Line
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
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
Cookies
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
History
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1
Form Data
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16
Passwords
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32
Delete All
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255
Delete All - "Also delete files and settings stored by add-ons"
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351
These commands should work in Internet Explorer 7 on XP or on Windows Vista.


I add the shortcut "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1″. But it can not clear the IE7 history. If i use the dialog "Delete history", the history can be deleted. Why?
Same here. The 'History' is not deleted, no matter which script I use.
If I do it from command prompt or start..run..cmd a box pops up and says"Error in InetCpl.cpl
Missing entry:ClearMyTracksByProcess"
Anybody know what the hell this means or is?????
nice i like it . it worked out for me
The "By Most Visited" History is not erased.
My history was deleted. using IE7 on Xp Pro
I am now using the CLI window of /ubuntu.
I want to use the i nternet on it.Any body can tell me how Iam able to do that
thanks
Thanks dude
very nice, many thanks finally something that worked
I need something like this for IE 6. Would you have any ideas?
Create a standard txt file and add the following lines of code, save as a batch file (.bat rather than .txt) then simply run.
@ECHO OFF
ECHO * Cleaning Current User's Temp Folders *
FOR /D %%G IN ("C:\Documents and Settings\*.*") DO DEL/S/Q/F "%%G\Cookies\*.*"
FOR /D %%G IN ("C:\Documents and Settings\*.*") DO DEL/S/Q/F "%%G\Local Settings\Temp\*.*"
FOR /D %%G IN ("C:\Documents and Settings\*.*") DO DEL/S/Q/F "%%G\Local Settings\History\*.*"
FOR /D %%G IN ("C:\Documents and Settings\*.*") DO DEL/S/Q/F "%%G\Local Settings\Temporary Internet Files\*.*"
Echo * Done *
PAUSE
CLS
does any one know how to delete off line contents from command line? API? inetcpl.cpl? from ie 6.0?
This worked great for me as well. Now if I could find something similar for IE6. I tried several different things including the batch file posted above by TinnyFusion. They all look like they're deleting files but when I go and check the folders, the cookies and everything else are still there. When I do it from windows, the folder is missing.
Isn't there a rundll32 type option for ie6?
TinnyFusion great stuff . I could simple extend it to clear index.dat and other unwanted files.
What about how to delete history (IE7/VISTA) for a user *other* than the current user? Like for an Administrator to delete a user's history.