Subscribe to How-To Geek

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.

| More
This article was originally written on 02/12/07 Tagged with: Firefox & Web, Vista Tips & Tweaks, Windows, Windows Vista

Daily Email Updates

You can get our how-to articles in your inbox each day for free. Just enter your name and email below:


Name:
Email:

Comments (28)

  1. Karn

    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?

  2. JT

    Same here. The ‘History’ is not deleted, no matter which script I use.

  3. cody

    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?????

  4. tom

    nice i like it . it worked out for me

  5. JT

    The “By Most Visited” History is not erased.

  6. RD

    My history was deleted. using IE7 on Xp Pro

  7. Netsanet

    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

  8. Exuroo

    Thanks dude

  9. LMO

    very nice, many thanks finally something that worked

  10. Samson

    I need something like this for IE 6. Would you have any ideas?

  11. TinnyFusion

    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

  12. eduardo

    does any one know how to delete off line contents from command line? API? inetcpl.cpl? from ie 6.0?

  13. moe

    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?

  14. Silva

    TinnyFusion great stuff . I could simple extend it to clear index.dat and other unwanted files.

  15. Angela

    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.

  16. Bob Mason

    It is many years since I wrote a batch file (Win 98 SE I think) could anyone use one the above command line scripts and give an example of how to write one for Vista please

  17. Dakota

    I was wondering if there is a way to put a password on my browsing history so it can not be deleted unless the password is put in? or something of that nature.
    Thanks

  18. Angela

    Dakota,

    What I do is restrict the user from deleting their own history using Group Policy. See my comment above. I fixed it so only Administrators can delete the user’s history with a batch file. That idea might be what you are looking for.

  19. russell

    I have run the delete all script (and done it manually) using the delete browsing history dialogue box – but it doesnt complete – the window comes up and runs for ages and ages – and doesnt seem to do anything, so I close it (using task manager) as thats the only way. I have re-booted. Any ideas what is causing this to fail?

  20. jono

    There must be a command line missing. I googled something, closed IE7 and ran a .BAT file containing all the commands you listed. When I reopened IE7 and searched Google using the same terms, the results showed links I had previously clicked on, coloured purple, which indicates that all history was not deleted.

    When you run “Delete All” from IE7 and revisit the Google terms you searched for, the results show links in blue, indicating that your search history was deleted from the previous session.

    Anyone knows how to correct this problem? Anyone know what the missing command line is that would delete previous Google searches? Better yet, does anyone know how to run “Delete All” automatically, like Firefox’s “Clear Private Data”, which deletes all session history simply by closing the browser?

  21. Nibbs

    >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?????

    I got this too – The reason I was getting it was because the ClearMyTracksByProcess is case sensitive (s^&tty). ~nibbs

  22. Shashank

    Good option. Before I used to go to %temp% and delete it.

  23. John

    Guyz,

    Need help..i will like to see the internet explorer history on the command prompt line..A friend of mine mention that even though u delete all the history,cookies,temporary internet files from the tools option..it still can be trace on the command prompt. can anyone provide me the command for it..and how do i permanantly delete all the information. Please help..Thanx

  24. clerison

    Hi,
    How can we set the Internet Explorer 7 to offline mode using command prompt statements.
    I have found enough information is given for clearing the history and changing the proxy server settings using command prompt. But I am unable to find out the command prompt statement to change the IE 7 to offline mode. Thanks for any help.

  25. TheRedQueen

    This is now one of my favorite toys. Thank you.

  26. Kirsty

    hey all!

    I am working for this company who keep trying to block me from social networking sites. Threy are using Open DNS and have manually blocked each pc by rerouting to the sites DNS address. I then deleted this address and had access to the sites however some brainiac has decided to block it from the server now which i can still unblock but im pretty sure this open DNS site is forwarding the browsing history….isnt there someway I can delete my history from the server before it gets to the open dns site??? I have full access to the server. thanks x x

  27. JJH

    I’ve included the command line to delete temp. internet files in IE7 in our organization’s Active Directory logon scripts. Anyone know if it’s possible to have it run in the background (so the end user doesn’t see the box that pops up)?

  28. vivek bahuguna

    These are path of browsing history of important browsers in Windows Vista:

    Mozzilla Firefox:

    Cookies:
    C:\Users\%Userprofile%\AppData\Roaming\Microsoft\Windows\Cookies

    Temporary internet files:
    C:\Users\%Userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files

    Bookmarks
    C:\Users\%Userprofile%\AppData\Roaming\Mozilla\Firefox\Profiles\uume24e5.default\places.sqlite

    History:
    C:\Users\%Userprofile%\AppData\Local\Microsoft\Windows\History

    Typed Url:
    C:\Users\%Userprofile%\AppData\Local\Mozilla\Firefox\Profiles\uume24e5.default\cache

    Cache:
    C:\Users\%Userprofile%\AppData\Local\Mozilla\Firefox\Profiles\uume24e5.default\cache

    Internet Explorer:

    Cookies:
    C:\Users\%Userprofile%\AppData\Roaming\Microsoft\Windows\Cookies
    C:\Users\%Userprofile%\AppData\Roaming\Microsoft\Windows\Cookies\low

    Temporary internet files:
    C:\Users\%Userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files
    C:\Users\%Userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\low

    Favorites C:\Users\%Userprofile%\Favorites

    History:
    C:\Users\%Userprofile%\AppData\Local\Microsoft\Windows\History

    Typed Url:
    C:\Users\%Userprofile%\AppData\Local\Microsoft\Windows\History\History.IE5

    Opera:(7x)

    Cookies:
    C:\Users\%Userprofile%\AppData\Roaming\Opera\Opera75\Profile\cookies4.dat
    C:\Users\%Userprofile%\AppData\Roaming\\Microsoft\Windows\Cookies

    Temporary internet files:
    C:\Users\%Userprofile%\AppData\Roaming\Opera\Opera75\Profile\cache4
    C:\Users\%Userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files

    Cache:
    C:\Users\%Userprofile%\AppData\Roaming\Opera\Opera75\Profile\cache4

    History:
    C:\Users\%Userprofile%\AppData\Roaming\Opera\Opera75\Profile\global.dat

    Bookmark:
    C:\Users\%Userprofile%\AppData\Roaming\Opera\Opera8\Profile\Opera6.adr
    C:\Users\%Userprofile%\AppData\Roaming\Opera\Opera8\Profile\Opera6.adr.bak

    Typed Url
    C:\Users\%Userprofile%\AppData\Roaming\Opera\Opera8\Profile\opera.dir

    Opera:(8x)

    Cookies:
    C:\Users\%Userprofile%\AppData\Roaming\Opera\Opera8\Profile\cookies4.dat
    C:\Users\%Userprofile%\AppData\Roaming\\Microsoft\Windows\Cookies

    Temporary internet files:
    C:\Users\%Userprofile%\AppData\Roaming\Opera\Opera8\Profile\cache4
    C:\Users\%Userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files

    Cache:
    C:\Users\%Userprofile%\AppData\Roaming\Opera\Opera8\Profile\cache4

    History:
    C:\Users\%Userprofile%\AppData\Roaming\Opera\Opera8\Profile\global.dat

    Bookmark:
    C:\Users\%Userprofile%\AppData\Roaming\Opera\Opera8\Profile\Opera6.adr
    C:\Users\%Userprofile%\AppData\Roaming\Opera\Opera8\Profile\Opera6.adr.bak

    Typed Url
    C:\Users\%Userprofile%\AppData\Roaming\Opera\Opera8\Profile\opera.dir

    Opera:(10.10 beta)

    Cookies:
    C:\Users\%Userprofile%\AppData\Roaming\Opera\Opera 10.10 Beta\cookies4.dat

    Temporary internet files:
    C:\Users\%Userprofile%\AppData\local\Opera\Opera 10.10 Beta\cache

    Bookmarks:
    C:\Users\%Userprofile%\AppData\Roaming\Opera\Opera 10.10 Beta\bookmarks.adr

    Netscape Navigator 9.0

    Temporary Internet Files:
    C:\Users\%Userprofile%\AppData\Local\Netscape\Navigator\Profiles\dim38g61.default\Cache

    Cookies:
    C:\Users\%Userprofile%\AppData\Roaming\Netscape\Navigator\Profiles\dim38g61.default\cookies.txt

    History:
    C:\Users\%Userprofile%\AppData\Roaming\Netscape\Navigator\Profiles\dim38g61.default\history.dat

    Favorites:
    C:\Users\%Userprofile%\AppData\Roaming\Netscape\Navigator\ Profiles\dim38g61.default\bookmarks.html
    C:\Users\%Userprofile%\AppData\Roaming\Netscape\Navigator\Profiles\dim38g61.default\bookmarks.bak

    Typed URL’s:
    C:\Users\%Userprofile%\AppData\Roaming\Netscape\Navigator\Profiles\dim38g61.default\localstore.rdf

    Flock(2.5):

    Temporary internet files:
    C:\Users\%Userprofile%\AppData\Local\Flock\Browser\Profiles\en6k2exm.default\Cache

    Cookies:
    C:\Users\%Userprofile%\AppData\Roaming\Flock\Browser\Profiles\en6k2exm.default\cookies.txt

    History:
    C:\Users\%Userprofile%\AppData\Roaming\Flock\Browser\Profiles\en6k2exm.default\history.dat

    Favorites:
    C:\Users\%Userprofile%\AppData\Roaming\Flock\Browser\Profiles\en6k2exm.default\bookmarks.html

    Typed URL’s:
    C:\Users\%Userprofile%\AppData\Roaming\Flock\Browser\Profiles\en6k2exm.default\localstore.rdf

    MSN explorer:

    Cookies:
    C:\Users\%Userprofile%\AppData\Roaming\Microsoft\Windows\Cookies

    Temporary internet files:
    C:\Users\%Userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files

    Favorites:
    C:\Users\%Userprofile%\AppData\Roaming\MSN6\Userdata\{}\favorites.xml

    History:
    C:\Users\%Userprofile%\AppData\Local\Microsoft\Windows\History

    Typed URL’s:
    MSN Server

    AOL explorer:

    Cookies:
    C:\Users\%Userprofile%\AppData\Roaming\Microsoft\Windows\Cookies

    Temporary internet files:
    C:\Users\%Userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files

    History:
    C:\Users\%Userprofile%\AppData\Local\Microsoft\Windows\History

    Favorites: AOL server

    Typed URL’s: AOL server

    Safari(3.0):

    Cookies:
    C:\Users\%Userprofile%\AppData\Roaming\Apple Computer\Safari\Cookies.plist

    Temporary internet files:
    C:\Users\%Userprofile%\AppData\Local\Apple Computer\Safari\Cache.db

    History:
    C:\Users\%Userprofile%\AppData\Roaming\Apple Computer\Safari\History.plist

    Bookmarks:
    C:\Users\%Userprofile%\AppData\Roaming\Apple Computer\Safari\Bookmarks.plist

    Typed URL’s:
    C:\Users\%Userprofile%\AppData\Roaming\Apple Computer\Safari\History.plist
    C:\Users\%Userprofile%\AppData\Roaming\Apple Computer\Safari\bookmarks.plist


Leave a Comment




Leave your friendly comment here.

If you have a computer help question, click here to leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Our Friends
Getting Started


About How-To Geek
What Is That Process?
svchost.exe
jusched.exe
dwm.exe
ctfmon.exe
wmpnetwk.exe
mDNSResponder.exe
wmpnscfg.exe
rundll32.exe
wfcrun32.exe
Ipoint.exe
Itype.exe
Wfica32.exe
Mobsync.exe
conhost.exe
Dpupdchk.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. All Rights Reserved.