Icon Cache - Rebuild

ByLine
How to Rebuild the Icon Cache in Vista
Synopsis
This will show you how to delete the icon cache, to clear it, so Vista will rebuild it after a restart.
How to Rebuild the Icon Cache in Vista


information   Information
If you have any icons that are not displaying correctly in Vista, then rebuilding the icon cache will reset them. This will show you how to delete the icon cache, to clear it, so Vista will rebuild it after a restart.

The icon cache is located at the hidden system folder location below:

C:\Users\User-Name\AppData\Local\IconCache.db

Note   Note

  • This does not change the icons. It only clears the icon cache to get rid of any corruption and rebuilds the icon cache with the correct icons again.
  • If this is for a internet URL icons (favicons), in IE7 Favorites for example, then you will need to delete the Temporary Internet Files to reset these icons instead. For how, see: How to Delete the Internet Explorer Browsing History in Vista
Tip   Tip
If you only have problems with a particular file (file extension type) icon, then it may be a default association problem instead. The file extension will show the icon for the program that it is associated to. This happens when a program and file extenstion has lost their default associations with each other, or associated to a wrong program instead. To resolve this, either make sure that you have all of the default associations set for the program that the file extension is for, or make sure that you have the correct default program associated with the file extension type. For how to do this, see: How to Set Default Associations For a Program in Vista or How to Associate a Individual File Extension Type With a Program in Vista





OPTION ONE
Automatically Rebuild the Icon Cache

1. Click on the download button below to download the file below.​
Rebuild_Icon_Cache.bat
download

2. Save the file to your desktop, and run it.​
3. Click/tap on Run when prompted.​
4. Follow the instructions in the command prompt to rebuild the Icon Cache.​
5. Restart your computer to generate a new IconCache.db file.​
6. If the icons are still not displaying properly, then download and merge the ICO option in this tutorial to restore the default associations of .ico (icon) files.​



OPTION TWO
To Manually Rebuild the Icon Cache using the Command Prompt

1. Close and save anything that you are working on. This command will kill explorer and restart the computer when completed.​
2. Open the Start Menu, and type cmd in the search box and press enter.​
3. In the command prompt, Copy and Paste each command line below and press enter after each command.​
WARNING: The last command will restart the computer, so be sure to close and save anything that you are working on first.​
  • taskkill /IM explorer.exe /F
  • DEL "%localappdata%\IconCache.db" /A
  • shutdown /r /f /t 00
4. The IconCache.db file has now been rebuilt.​
5. If the icons are still not displaying properly, then download and merge the ICO option in this tutorial to restore the default associations of .ico (icon) files.​
That's it,
Shawn


 
Last edited:
Shawn Brink

Comments

i have tried everything but nothing is working for me the drive icon for my d drive is a square one with red dots and i want it back to the normal one like other drives but tis not happening i tried the regedit method but no good and tried this one also and everytime i restart my pc the icon cache reappears and i cant do anything plz plz help me out i want my icon back:cry::cry:

Can you post a screen shot?
 
i have tried everything but nothing is working for me the drive icon for my d drive is a square one with red dots and i want it back to the normal one like other drives but tis not happening i tried the regedit method but no good and tried this one also and everytime i restart my pc the icon cache reappears and i cant do anything plz plz help me out i want my icon back:cry::cry:
Hello Noman, and welcome to Vista Forums.

Use the TIP box at the top in the tutorial below to see if you may have a autorun.inf file as described there. If so, delete it.

http://www.vistax64.com/tutorials/111388-drive-icon-change.html

If not, then try using METHOD ONE or TWO in the same tutorial above using the path C:\Windows\System32\imageres.dll,30 for the default C: drive icon.

Hope this helps,
Shawn
 
Hi
Does Method 1 or 2 apply to AllPrograms Icons... and saved Downloads and Documents etc. I have an extHD with app start from All Programs. Upon initial install the ext Drive Software the three options from All Programs had an Icon for each now one has the rectangle box. I imagine they are startup shortcuts to xxx.exe
So, long post - short ...Does 1 or 2 apply to All Programs Icons (thumbnails) and to My Docs - My Downloads etc.

Regards
bjm_
 
well that helped me to get the icon back by deleting the autorun file hidden but now there is some other problem that is the drive which had that problem was D drive and my window is in C drive and as u know the drive in which os is installed is with the window sign above it and others are normal drives icon but now after deleting the autorun.inf file and the icon cache file and after restarting the computer i got the drive icon for my D drive also as the C drive one i mean the os sign on the drive icon dont know why
as a result i got 2 drive icon with os sign above them(C & D) and two with out them(E & F)plz tell what to do
and i want only my C drive to have the os sign above it which actually i have but not on the D drive and want other drives to have normal sign
 
awesome !! it worked like a charm. I almost freaked out when I saw my office files icons changed to some random icons. tried your second fix first and did the trick instantly. thanks a lot :)
 
thanks Brink ..... glad to be here !! and btw it's Lddgnz and not Iddgnz.....don't bother to ask the sense of it ..... just set it up once on some website while creating a username as it was not allowing any other combination and since then I am using it for almost for any account I create on evry othr website :p
 
somehow it wouldn't let me post :P but now i hope it does.

hello there, i realize the last post was at 2009, but i hope you guys are still monitoring it.

1: cmd won't let me enter the first command in Method2.


  • taskkill /IM explorer.exe /F (it says error: the proces explorer.exe/F could not be found)
  • CD /d %userprofile%\AppData\Local
  • DEL IconCache.db /a
  • shutdown /r
2: i was directed here in my quest to reset my dvd/cd drive icons, since windows isn't doing it at the moment.

i would like you to give me a detailed walkthrough of what to type in cmd and how it should look. dos in windows 3.11 has been ages ago for me :P

for example, when i open cmd, the first line is :
C:\Users\Jop>

I hope i gave you enough info.

jsportive.
 
Hello jsportive, and welcome to Vista Forums.

You may have copied the bullet that was in front of the command as well. I removed the bullets, so please try again exactly as it is in the tutorial. You could also do OPTION ONE to run the BAT file that will do it automatically for you instead.

Hope this helps,
Shawn
 
Thnx for the reply.
I couldn't copy/paste into dos, but i typed it (using 2 screens is helping alot there :P )
I tried something else and noticed that i left out a space somewhere :P
Did it, and it went perfectly. Thanx.
 
This is an old thread but I'd like to ask a question related to it and hopefully get some help. I'm using Vista Home Basic, SP2, 32bit.

More often than not, when I delete a file, the file's icon goes away but a "ghost icon" remains behind. Say for example I have a file named 003.wmv in a folder and delete it. Then I move a file named movie_1.wmv into that same folder and try to rename it 003.wmv, I get an error saying "003.wmv already exists" and it won't let me rename it. It doesn't give me an option ot "Replace" or anything, it just says it can't be renamed.

If I rebuild the icon cache with the .bat I downloaded from this tutorial it's all good again, but is there a way to make these "ghost icons" quit happening in the first place. Is this normal for Vista or does it sound like something's wrong with my system?

Thank you. :)
 
Hello Walt,

This may be only helping from the computer being restarted. It sounds like it may be a refresh issue. If you refresh (F5) the desktop, does it also get rid of the ghost icon?

You might see if running a sfc /scannow command may help.

Hope this helps,
Shawn
 
Well, wouldn't ya know it, now it's not doing it, I can't reproduce it at any rate.

I didn't think about F5 but that sounds like a good idea to try if and when it does it again. Thanks a lot Brink. I'll report back when I know something one way or another.
 
That's great news. Hopefully it was just a temporary refresh glitch.
Hi, Brink,
The solution worked great. the manual command prompt. But I would like to know, how this problem come in to being. Is it because of virus or some other thing. Really Help ful article. The link would work, but shown as a generic link, this is the best solution. Thank you
 
Hello jraju,

It's caused by the icon cache getting corrupted. The problem is that anything could corrupt the cache, so it's nothing to worry about unless it keeps happening. If so, then it'll be a matter of trying to figure out (narrowing down) what may be corrupting it. Usually, it would be from something that you just recently changed or installed.
 
Hi Brink
Thank you. I am also seeing your tips and procedures on Windows 7. Excellent piece of advice for newbies to quick soltuions.
The icon cache restored correctly. But what about if one gets a drop menu, while moving cursor in Mozilla firefox startup, and see the Frequent..., the recently visited pages show as generic files and not as program or sites icon. If suppose, i visit the windows sevenforum, normally in the history tab, it shows the sevenforum icon besides the topic i visited. But in the startup menu, in the firefox Frequent..., i get generic icons with the description of the pages visited. Iam having win7, but i think that it will work there also.

Where could i see that the attachment is included in my post? pl

startupicon.jpg
 
Last edited by a moderator:
Top