Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: removing the index.dat - Windows 7

16 Nov 2010   #11

windows 7

I wanted something a little more automatic than having to manually clean the index.dat virus. Since the index.dat is a hidden system file and it can't be edited w/o changing the attributes every time (you can remove -h and -s attributes manually but the next time you log on they are reapplied) I wrote a simple batch file and put it in the folder where index.dat is located, and put a shortcut to it in my profile startup folder:
attrib -h -s index.dat
date /t > index.dat
time /t >> index.dat
Then I put a shortcut to index.dat on my desktop. When I open it, I can verify that the only thing in the file is the date and time when I last logged on.

The only problem with this is when the batch file tries to run at logon, I get a security warning dialog each and every time that I have to OK before it will run. Surely there is a way to make windows recognize this as a safe file to run ?

My System SpecsSystem Spec
16 Nov 2010   #12

windows 7
found a solution

" Surely there is a way to make windows recognize this as a safe file to run ?"

You have to give windows the OK to run bat files without the security warning first. Of course this will diminish the intended security settings of Windows 7 but in my case I run batch and vb scripts pretty regularly.

Open regedit and drill down to HKEY_CURRENT_USER\ Software \ Microsoft \ Windows \ CurrentVersion \ Policies
and add a new key "Associations" (if it's not already there) and in this new key, change or add a string value "LowRiskFileTyes" and set the value with the file extensions you want Windows to recognize as safe. Seperate the file extensions with a semicolon .vbs;.bat;.exe

Then close regedit and reboot.

Attached Images
removing the index.dat - Windows 7-reg.jpg 
My System SpecsSystem Spec
16 Nov 2010   #13

Windows 7 & Windows Vista Ultimate

Hi, grizzly.

If you're serious about cleaning temp files, I suggest occasionally running TFC by Old Timer.

TFC (Temp File Cleaner) will clear out all temp folders for all user accounts (temp, IE temp, java, FF, Opera, Chrome, Safari), including Administrator, All Users, LocalService, NetworkService, and any other accounts in the user folder. It also cleans out the %systemroot%\temp folder and checks for .tmp files in the %systemdrive% root folder, %systemroot%, and the system32 folder (both 32bit and 64bit on 64bit OSs). It shows the amount removed for each location found (in bytes) and the total removed (in MB).

Before running, it will stop Explorer and all other running applications. When finished, if a reboot is required the user must reboot to finish clearing any in-use temp files.
-- TFC only cleans temp folders.
-- TFC will not clean URL history, prefetch, or cookies. Depending on how often someone cleans their temp folders, their system hardware, and how many accounts are present, it can take anywhere from a few seconds to a minute or more. TFC will completely clear all temp files where other temp file cleaners may fail.

Following are the instructions:

Download TFC by Old Timer from here (direct download):
  • First, save any files as TFC will close ALL open programs including your browser!
  • Double-click on TFC.exe to run it. If you are using Vista/Windows 7 right-click on the file and choose Run As Administrator.
  • Click the Start button to begin the cleaning process and let it run uninterrupted to completion.
  • Important! If TFC prompts you to reboot, please do so immediately. If not prompted, manually reboot the machine anyway to ensure a complete clean.

TFC requires a reboot immediately after running. Be sure to save any unsaved work before running TFC.
My System SpecsSystem Spec

16 Nov 2010   #14

windows 7

Thanks Corrine. I don't know anything about TFC and I'm sure it probably does a good job removing temporary files, but the index.dat is a different kind of file. Very few utilities including temporary file removers will do anything to the index.dat and that's the file I want cleaned. My batch file is handling it very well and automatically at every logon without any manual steps on my part. As far as I can tell, these files are nothing more than viral-like infestations, tracking viruses, that Microsoft, for whatever reason, includes in Windows. They retain almost all of your internet and other computer use history long after all of your temporary files, cookies and browsing history has been deleted. They are a little more difficult to clean or get rid of.
My System SpecsSystem Spec
28 Mar 2011   #15

W7 64 Bit

Quote   Quote: Originally Posted by Loganman67 View Post
this is easy to do
1. Restart in "Safe Mode with Command Prompt"
2. type "cd.." (without quotes) as many times as needed to get to the root of C
3. type: del index.dat /s
4. type shutdown -r

system will restart normally with a new (and clean) index.dat file
The above method is the smartest method. Good job Loganman67.
forward slash after cd.

2. type cd/
My System SpecsSystem Spec
28 Jul 2011   #16

windows 7 64 bit

i went throught the steaps, and it's telling me it can't find index.dat files. is there any other way to delete index files in Win 7 64 bit? or did it actually delete them?
My System SpecsSystem Spec
13 Sep 2013   #17
Gerald X

windows 7 home premium

Do not attempt to remove the Index.dat file in Windows 7. There is not one Index.dat file. There are several buried away in different locations. In Windows XP it was easy. There is a program called Index Dat Suite. Index Dat Suite when run located all the Index.dat files and created a batch file which kicked in on the next bootup. On the reboot the batch file deleted all the Index.dat files before Windows took over. Very simple. Windows XP once loaded recreated its Index.dat files. but all your previous browsing history was gone. I tried this in Windows 7 and it led to untold problems later on. Flashget my download manager failed to function anymore. I tried a reinstallation. I tried installing different versions. No luck! Suffice to say Microsoft Windows 7 is always in control. Any attempts to remove or modify its Index.dat files are doomed to failure. Safe mode and a series of DOS commands doesn't work. There are too many Index.dat files buried away in too many locations for the user to access. I strongly advise not to mess around with Windows 7.
My System SpecsSystem Spec
13 Sep 2013   #18
Gerald X

windows 7 home premium

There are several Index,dat files in Windows 7 but the main body of data is contained in one large one. Tweak Now 7.26 (Freeware) detects this and safely remove it after a reboot.
My System SpecsSystem Spec
24 Nov 2013   #19

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
How to delete index.dat file

Here's a free and easy solution that works for me. Perhaps you'd like to do your own research on it before deciding if you'd like to use it.

I installed a utility called MRU Blaster from (link not provided). I usually run it with admin rights from an elevated shortcut.

To delete the main index.dat file run the program and from the main window choose "Settings" then "Go to plugins"

On the "temporary internet file cleaner menu" you'll find options to select file deletion and to run now.

If you choose to run now - the index.dat file will be deleted on reboot.

If you wish to remove the index.dat file for privacy reasons be aware that copies of the file will exist in volume shadow copies.

Note: Be careful what you're selecting in the main settings window as it will delete items that you might not want to be deleted.

Attached Images
removing the index.dat - Windows 7-mru-blaster-plug-control-panel.jpg removing the index.dat - Windows 7-temporary-internet-files-cleaner.jpg 
My System SpecsSystem Spec
24 Nov 2013   #20

Windows 7

Edit: I've been had. It looks like someone here just bumped a necro-post.
Oh well. if anyone sees this in the future maybe it will help them.

Before I make my point, I'd like to point out that I've ALWAYS been told IE is a terribly insecure browser, I see many users with viruses who use IE as their primary browser, and from my experience it's always the slowest. I personally prefer Google Chrome, but I've always heard Firefox and Opera have good security- I can't vouch for that, but I would stay clean from IE personally.

This is just speculation- but maybe it will work for you:

Try disabling UAC. I've always been able to run batch files on boot up without any nag prompts when i have UAC disabled, this may make your system more vulnerable to viruses though. You can disable it in User Account Controls.

Perhaps taking ownership of the folder containing the said file would prevent the nag prompt.

To do this:
You'll want to take ownership of the parent folder of folder index.dat is located within, according to you that's:
"C:\Users\[username]\AppData\Local\Microsoft\Windows\Temporary Internet Files\Low\Content.IE5"
Locate Content.IE5 -> Right Click -> Properties -> Security (tab) ->Advanced -> Owner (tab) -> Edit (Button) ->

If your username is available from the list, click it and hit apply, otherwise click "Other users or groups" and type in your username.

You should now get a message that says if you took ownership of the file to close and reopen properties, so do that. Close it and right-click properties on the folder again.

Properties-> Security(tab) -> Advanced -> Change Permissions -> Click your username (Not Administrator unless it is the actual built-in administrator account) -> Uncheck "Include inheritable permissions from this objects parent" -> Remove -> Edit ->

It's really your choice what you set, but you want to make sure "delete" is checked on allow, and NOT checked on deny, furthermore, make sure "apply to" has any setting containing "files", as that will still allow you to delete files contained within this folder, manually or through batch script, or any other way. or at least, I think it should.

If you do try this, I'd love to hear your results, unfortunately i don't appear to have the path specified on my machine (perhaps due to a lack of internet explorer updates.) so I cannot test it myself. If it as a matter of permissions and not a matter of "In use" this should solve the problem.
My System SpecsSystem Spec

 removing the index.dat - Windows 7

Thread Tools

Similar help and support threads
Thread Forum
Windows Experience Index
My Index is 5.5, can I get any better? If yes, what next??? Alvin
Performance & Maintenance
Windows 7 Pro Experience Index
My Windows experience index is 5.5, can I increase it? My Computer is an Intel DH67BL_ Motherboard Intel i7 2600 3.4GHz CPU 16 GB of memory, 500 GB Seagate SATA hard drive, running Windows 7 Pro 64bit. Let me Know! Alvin
Performance & Maintenance
Windows 7 Index Search
Why does Windows 7 automatically reindex my index search file when I reboot the computer. I have 300,000 files on my computer and it takes two days to rebuild the index. I leave my computer on all the time because I am afraid that by turning it off and on again will cause the indexing function...
General Discussion
windows 7 index help
Hi i am new to this site so are say sorry now ! i have just got my new PC together all going OK i have windows 7 pro with phenom II x4 965 are get back to yo with my mother board but my index score on my CPU is ony 3.7 when it should be 6 ish any thoughts on this .
Performance & Maintenance
Windows index
Just wondering if anyone had any idea why when i was using the rc 7100 build my index score for my HD was 7.8 but yesterday i installed the release of ultimate and my HD score is now 5.9. Was anything changed from the RC build to the release to make my score go down?
Performance & Maintenance

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 01:33.
Twitter Facebook