Solved

batch file to delete internet explorer history and cookies

Posted on 2009-05-13
7
582 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
ID: 24379869
0
 
LVL 4

Expert Comment

by:delyan_valchev
ID: 24379887
0
 
LVL 17

Expert Comment

by:houssam_ballout
ID: 24379897
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 50

Expert Comment

by:jcimarron
ID: 24380465
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
ID: 24383011
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
ID: 24383027
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
ID: 24383054
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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your system is showing symptoms of browser hijacks or 'google search redirects' check out my other article (http://rdsrc.us/u3GP7A) first and run the tool TDSSKiller (http://rdsrc.us/GDBBs4) to get rid of the infection. Once done, and if the …
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.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

912 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

23 Experts available now in Live!

Get 1:1 Help Now