Solved

batch file to delete internet explorer history and cookies

Posted on 2009-05-13
7
581 Views
Last Modified: 2012-05-06
I'm looking for a .bat file that I can run to delete cookies and history in IE.
0
Comment
Question by:JPERKS1985
7 Comments
 
LVL 16

Expert Comment

by:glenn_1984
Comment Utility
0
 
LVL 4

Expert Comment

by:delyan_valchev
Comment Utility
0
 
LVL 17

Expert Comment

by:houssam_ballout
Comment Utility
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 50

Expert Comment

by:jcimarron
Comment Utility
JPERKS1985--You will also want to clear the index.dat file from Content.IE5.  Even though you clear Temporary Internet Files and HIstory, the History still exists in that index.dat file.
This is not as easy to do using a batch file as are the others.
See http://www.onecomputerguy.com/ie_tips.htm and scroll to Misc|Clearing index.dat.
There are lots of software programs to do this.  I use System Security Suite.
http://www.igorshpak.net/
0
 
LVL 11

Expert Comment

by:NaturaTek
Comment Utility
There are numerous app out there to help do the job. My favorite being free is CCleaner. www.ccleaner.com

If you want a batch file, copy the following into notepad and save it as cleanup.bat or anythingyouwant.bat
del /S /Q c:\WINDOWS\Temp

cd\\

cd C:\Documents and Settings\yourusernameHere\Local Settings\

rmdir /S/Q Temp

del /Q Temporary Internet Files

echo Deleting Files

echo Files Deleted

mkdir Temp

exit

Open in new window

0
 
LVL 4

Expert Comment

by:delyan_valchev
Comment Utility
Again I would refer to http://www.howtogeek.com/howto/windows/clear-ie7-browsing-history-from-the-command-line/
Delete all IE history in one line:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255

Open in new window

0
 
LVL 11

Accepted Solution

by:
NaturaTek earned 500 total points
Comment Utility
Let me correct this..you wanted history cleared for sure, I added this and the correct syntax for cd, I used one \ too many, The correct code is here below, enjoy. Close internet explorer when running batch to free any locked file.
del /S /Q c:\WINDOWS\Temp

cd \

cd C:\Documents and Settings\yourusernameHere\Local Settings\

rmdir /S/Q Temp

del /Q Temporary Internet Files

attrib -h -s history

del /q history

attrib +s +h history

echo Deleting Files

echo Files Deleted

mkdir Temp

exit

Open in new window

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now