Rebuild icon cache to fix incorrectly displayed icons

The icons used in Windows are saved in an icon cache, which has been invented to optimize the display of icons, so it doesn't have to open every exe-/dll-files and scan for icon images all the time.

This caching can become corrupted and lead to garbled/fuzzy/wrong icons:
  • An icon are changed to a different random icon
  • Several icons are drawn on top of each other
  • An icon becomes all black
There are different solutions that might help:
  • Restarting the computer will solve the problem for most people
  • Recreate the Icon-Cache by changing icon size (Another way is to Rebuild Icons in Tweak UI):
    1. Open Control Panel and double click Display-applet
    2. Select Appearance-tab and in Item-dropdown select Icon
    3. Increase Size and press Apply-button
    4. Decrease Size back to old value and press Apply-button
    5. Press Ok-button

  • Increase the limitation for the iconcache with this STRING value:

    [HKEY_LOCAL_MACHINE \Software \Microsoft \Windows \CurrentVersion \Explorer]
    Max Cached Icons = "2048" (Range = "100"-"4096", Default = "512")

  • Recreate the Icon-Cache file by deleting it
    1. Delete the hidden file ShellIconCache (Win9x/NT4/2k):

      C:\Windows\ShellIconCache or C:\Winnt\ShellIconCache

      Note in WinXP each user has their own file that is called Iconcache.db:

      C:\Documents and Settings\Your User Name\Local Settings\Application Data\Iconcache.db

      Note in Vista each user has their own file that is called Iconcache.db:

      %USERPROFILE%\AppData\Local\Iconcache.db

    2. Close down all explorer.exe processes using the Task Manager (Or else it will create a faulty file during logoff/restart)
    3. Use the Task Manager (CTRL+SHIFT+ESC) to launch the explorer.exe again (Or press CTRL+ALT+DEL to perform a restart/logoff)
    4. When the Windows Explorer (explorer.exe) starts again, it will recreate a correct Icon-Cache file

  • Uninstall Tweak UI (If installed) using the Add/Remove applet in the Control Panel.

    To uninstall by command line (WinNT+):

    rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultUninstall 4 %Windir%\Inf\Tweakui.Inf

    To uninstall by command line (Win9x):

    rundll.exe setupx.dll,InstallHinfSection DefaultUninstall 4 C:\Windows\Inf\Tweakui.Inf

More Info MS KB132668
More Info MS KB133733
More Info MS KB146213
More Info MS KB199152
More Info MS KB216165

Updated: 28 February 2010

Comments:

  1. James says:

    Thank you! I was having this problem with Windows XP -- some icons in the start menu were broken along with some on the desktop.

    I noticed that if I changed the Properties > Target to remove quotes, it helped with a few. But was incomplete.

    I appreciate the time you took to put this article up!

    Thanks,

    James

  2. Dorene says:

    My icons were corrupt and I went to MS website but it did not help. But your advice fixed it. Thank you!

  3. Ian says:

    Hi My C Drive Icon has gone not the icon just the picture i have tried all of the above and none work ie deleting the IconCache Data Base file but it dose not replace itself on restart.
    I'm running XP Home Version 2002 with Service Pk 2 Please help me

  4. Geoff says:

    Great works and very concise instuctions

    Thanks

    Geoff

  5. MajorV says:

    Thanks a million, Snakefoot! Your solution to this problem in Vista was by far the most clear, easy to implement and effective that I came across. I owe you one.

  6. someone says:

    here are a couple things to do. first check the root of the c drive
    for a file with the name autorun.inf. if it exists delete or move it
    somewhere else. this file is used for the autorun feature on cds but
    will in some cases get copied to the hard drive. if that is not the
    case download tweakui from microsoft's xp website at the following
    location and install it.

    http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx

    this should add a powertoys option to your start menu. in that sub
    menu launch tweakui. the last option in the tree on the left is
    repair. click it and the click the rebuild icons button on the dialog
    to the right.

  7. Vinicius says:

    Mandei meu PC p/ formatar, qdo voltou fui ver se havia perdido algum arquivo... Havia arquivo oculto, fiz a opção na configuração de "mostrar arquivos oculto", para minha surpresa não apareceu os arquivos ocultos, mas na barra de informações mostrava que havia "X" (nº) de arquivo ocultos. Voltei na ferramentas e notei que não estava mais marcado "mostrar arquivos oculto" foi aí que notei dentro do modo de exibição que havia opção a mais que não havia antes da formatação " ICON CACHE SIZE", não gostei dessa opção, tem como mostrar os arquivos ocultos? Como? Win. XP. Grato

  8. sareesh says:

    thanks a lot.......

  9. Marco says:

    Recreate the Icon-Cache file by deleting it

    1. Delete the hidden file ShellIconCache (Win9x/NT4/2k):

    C:\Windows\ShellIconCache or C:\Winnt\ShellIconCache

    Note in WinXP each user has their own file that is called Iconcache.db:

    C:\Documents and Settings\Your User Name\Local Settings\Application Data\Iconcache.db

    Note in Vista each user has their own file that is called Iconcache.db:

    %USERPROFILE%\AppData\Local\Iconcache.db

    2. Close down all explorer.exe processes using the Task Manager (Or else it will create a faulty file at logoff)
    3. Rerun explorer.exe is enough

  10. Snakefoot says:

    Marco wrote:
    3. Rerun explorer.exe is enough

    I have updated the article so it also includes this option

  11. roberto says:

    Folks,
    I had the same problem: missing, or better to say, neutralized icons (as for non-associated filetypes) for most of the common files:
    Office (DOC, XLS, you name it)
    PDF
    GIF
    ...
    even some program shortcuts!

    Tried everything above, none worked :(
    But then I found some notes about something and I realized: it was all MY FAULT!

    In order to save some HD-space, a couple of days ago I was clever enough to delete the
    C:\Windows\Installer
    folder, assuming that there was only junk from previous installations!

    Alas, the funny thing is, many programs get their icon cache from there! So, if you deleted it and it is gone, you are screwed like me ;)
    But if you have a second computer and similar installations, you can copy over the whole Installer folder, and you are saved like me :)

    Hope this helps somebody.

    Peace!
    R

  12. Lars says:

    Recreating the icon-cache file by deleting it worked for me on an XP SP 2 box - thanks for the great info!

  13. Peter says:

    LOL - Many years after your hints... Many Thanks, was getting corrupt icons after a BSOD, running w2k. Problem fixed using your last method: del shellicons, launch taskmanger close explorer.exe, run app explorer again via taskmanger.
    Prob. solved. :)

  14. siang hwee says:

    thanks a lot... it solve my problem

  15. Luiz O says:

    Clearing and Rebuilding Icon Cache:

    To automate this process open notepad and paste the code below, save it to desktop as RefreshIcons.bat, double click on the file and you are all set. You can do this every time the icon cache needs to be rebuilt. Make sure all your applications are closed whenever you run this.

    taskkill /F /IM explorer.exe
    cd /d %userprofile%\AppData\Local
    attrib –h IconCache.db
    del IconCache.db
    start explorer

  16. nerdant says:

    thank you! thank you! thank you! thank you! thank you! thank you! thank you! thank you! thank you! thank you! thank you! thank you!

  17. Iudith says:

    Hello all,

    My machine is WinXP SP3 and sometimes some of the icons are garbaged, always the same ones, namely:
    - the MyMusic, My Video, Favorites, Control Panel, DVD drive
    - the icons for TXT and DLL files
    while other icons are ok.
    Also, when this happens, trying to change any existing icon of a desktop shortcut with one from the shell32.dll file results in an error stating that "the shell32.dll file does not contain any icons", which is a "fake" error, because it does not come back after the icon problem is corrected.

    The solution with deleting IconCache.db worked for me, but only temporarily, after some time the problem is back.

    Rebooting the machine does not solve the problem if it exists before the restart.
    I also tried using TweakUI and sometimes it worked,
    but the last time it worked only AFTER a reboot (when the problem existed before and after the reboot).

    My questions are:
    1. Related to the above posts, why is it important to kill the
    explorer.exe using the TaskManager instead of simply closing it ? and also why to restart it using TaskManager ?
    2. As far as I understand, deleting the IconCache.db and stopping/restarting the explore.exe is supposed to rebuild the file WITHOUT performing each time a reboot.
    Is this correct ?
    3.
    Does anybody know of any solution, registry setting, a.s.o. which can solve this method PERMANENTLY, without having to use any of the tricks times and times again ?

    Thanks a lot & Happy New Year to everybody !
    Iudith

  18. Steve says:

    Thank you!!! Changing the icon size & then back again did the trick. Now my Windows 2000 icons display properly again.

  19. Marcus says:

    Probly never visit here anymore Marco but you saved my day worked like a charm im useing Windows 7 if anyone with win 7 finds this site and has same issue

  20. Don says:

    My Malwarebytes Icon on my desktop got corrupted I guess with a virus. It will no longer operate. Tried to delete it and re download it but does the same thing. I do not know how to fix it. Any ideas

  21. TwoHawks says:

    Hi All,
    I find there are many people still struggling to sort out a solution for the Icon Cache related issue ...when it continues to fail even after applying proper fixes...

    Couple points, and here's the deal...
    - proper datatype is String (REG_SZ)

    - if you are using known good solutions and they fail, or
    - if you are setting it the correct way and it reverts from a String (REG_SZ) to a Dword (REG_DWORD) datatype and keeps failing, or
    - if it just seems broken or wrong to begin with (when you first look it up in the registry),
    ..., there is an explanation, and a solution, for this.

    It could be because of a third party element that is rewriting the registry key "Max Cached Icons"
    - Widcom Broadcom BlueTooth Drivers have been known to do this.
    They were informed about it, fixed it, and some of their drivers have been known to have been fixed...
    - but I have the latest drivers and they are 'broken' again...

    No matter what the deal may be that is "undoing" this for you, I finally figured a workaround.
    I posted about it here:
    http://www.experts-exchange.com/articles/OS/Microsoft_Operating_Systems/IconCache-Max-Cached-Icons-DataType-Reverting-Incorrectly-from-STRING-to-DWORD-SOLUTION.html

    ...complete with proper credit where its due.

    Its long because its detailed and thorough.
    I hope its helpful to those who may find it.
    Thanks to the host for providing ability to post and share here ;^)

    Cheers,
    TwoHawks

  22. Snakefoot says:

    TwoHawks wrote:
    Couple points, and here’s the deal…
    - proper datatype is String (REG_SZ)
    - It could be because of a third party element that is rewriting the registry key “Max Cached Icons”

    Thank you for the update. I have re-read the Microsoft article, and have now changed the datatype from DWORD to STRING.

    Very annoying that 3rd party applications modifies those registry settings for the Windows Explorer. Hope others in your situation will benefit from your experiences.

  23. ellery says:

    Hi all,
    congratulation for the good page.

    Same problem, XP Home, after a convert from FAT32 to NTFS.
    all Office and Adobe icons disapeared.

    These icons are connected to the so called "advertised shortcuts" (http://www.google.com/search?q=advertised%2Bmsi%2Bshortcuts), in short those strange shortcuts without a path to the exe.

    The icons are connected to the content of the "windows\installer" folder (system, hidden) that for some strange reason was not converted by convert.exe procedure.

    Fortunately I had a backup that I made before the conversion. After a restore of the installer folder the and a restart of explorer.exe (terminated ad re-executed from task manager), every icon was back in place.

    I hope its helpful to those who may find it.
    Thanks to the host for providing ability to post and share without formalities...

    Cheers,
    Ellery

  24. Anonymous says:

    thank you.

  25. Miss Discipline says:

    I have an old version of RegSeeker, it's 1.55 and I have Windows XP. In RegSeeker click on tweaks you will see a button to click that says "rebuild icon cache" and it does it for you. Simple. Always make a back up before changing anything or go in and make a date in system restore just in case.

  26. Martin says:

    Increase icon size - Apply.
    Decrease icon size - Apply.

    Worked brilliantly.

    Thanks

  27. Fer says:

    Thanks man! really worked!

  28. Jasbir Singh says:

    I just want to say... THANK YOU...
    If I did not come to this page... i would be reinstalling the
    windows again.

  29. PONNARASU says:

    thanks for your tips its very usefull for me thanks

  30. LoneWolf1038 says:

    Just wanted to say thank you!!!! Been struggling 3 days trying to a way to reset my icons so they weren't "generic".

    Making the icon size larger and then smaller did the trick!

    THANK YOU!

  31. zschlu00 says:

    u kick a _ _
    thanks for the recovery

  32. Yann says:

    @roberto: finally, 1 year later your comment helped me in understanding it was in deed nobody's fault but mine!. As you did, I deleted "install" folders (in order to save some HDD space too) and was screwed in a row 'cause alas ain't got no sibling computer... but I can now stop searching why this icons-napping occured :)
    Anyway thank you all for your contributions, you make the web usefull, don't ever doubt it guys !

  33. Lucian says:

    For me it didn't work... I've deleted the old IconCache.db but no new file was created :((

  34. gopimano says:

    Thank you
    I got what i wanted..
    it worked for me as i did exactly what is said above.

  35. Tyler says:

    You have no idea how much I want to thank you! My heart was racing when I saw the icon had reappeared properly :D

  36. kiko says:

    if you deleted the file "IconCache.db" and try rerunning the explorer.exe but there was no new IconCache.db created,

    1.you should have copied the file on other destination first before deleting it (you should always have a backup),
    2.end explorer.exe and rerun it, if there are no new IconCache.db icon created, paste the old IconCache.db to it's original location
    3.end and rerun explorer.exe and that's it. it worked for me. my icons were back to normal.

  37. GC says:

    Thanks a lot! It worked for me.

  38. chandra says:

    thanks.. very much.. |:-)

  39. Sreejith says:

    yo it worked.......... thnx guys

  40. Paranormus says:

    Sometimes it happens that a few shortcut icons (not all) in the start/Programs menu show as generic. How did I manage to solve this issue?

    E.g., I have an XP Sp3 Pro Running on a P4P-800-E Deluxe and have tghe system installed on a WD 5ooGB HDD. Suddenly, i can't recall when it happened, Adobe Acrobat & Acrobat Distiller shortcuts icons in the start/program folder showed as Generic icons.

    They worked just fine (pointing to the right target) but the original icon wasn't showing, it showed generic indeed.
    I googled the issue and have been reading about a lot of tweaks and tricks to fix the problem but, like for many others, none would help.

    So I decided to go my own way. I decided to share my fix with everyone so I'll try to explain it here.

    STEP 1)
    I made sure I created a restore point and backed my registry. I also chose to back up the Iconcache.db (copied its position to another HDD) but did not delete/rename it like the Task Manager solution suggests (Stop/restart explorer.exe).

    STEP 2)
    Next I simply opened the folder where the two target files (i.e., Acrobat.exe & Acrodist.exe) are supposed to be located. I then copied the location/folder (i.e., C:\Program Files\Adobe\Acrobat 9.0\Acrobat) displayed in the address bar.

    STEP 3)
    Then I went on the icons menu that were showing generic in the start/programs and right clicked on them (doing this procedure one file at the time) then chose Properties.
    - In the properties dialog box you'll see that the change icon tab (on the bottom) is grayed out but you shall also see a blank input box named "Start in:" which is the one you should fill with the copied folder address (STEP 2).

    STEP 4)
    Hit Apply and then Ok.

    STEP 5)
    Repeat STEP 2-Step 3-Step 4 for all the missing icons in the start/programs menu.

    That's all.

    It worked as a charm for me and I hope it will for you as well. If not ... well there's always the 'hammer' solution!!! :D

    Stay Blessed.

    P.S.: I hope I managed to be as clear as possible for everyone to understand. On the contrary accept my apologies.

  41. BlondeDuddess says:

    TwoHawks,

    I really appreciate everyone´s input as well as your massive contribution. Must add mine after I solved the "Perfectly Good Icon Murder Mystery". It took me hours trying nearly everything, and then some, including running MS Office fix tool and re-installing it, to no avail.

    1) The Problem Core (here): Some programs simply set themselves as "default" on the registry. Once such program is uninstalled, Icons go bad and nothing can overwrite the default setting. My case was Open Office.

    2) Solution found for Windows XP SP3:
    a) Make a list of extensions whose icons are corrupted (mine were all MS Office products)
    b) Click start -> Run-> Type Regedit -> Hit Enter
    c) In the Class file, click on all extensions to be fixed and see if there is a
    program already uninstalled set as default and simply delete the line.

    DONE. Icons magically appeared in their best behavior.

    Jest,
    BlondeDuddess

  42. jr says:

    your tips suck. one can't eve n follow those lousy instructions as they are not verified on the computer.

  43. LeToine says:

    Thanks a lot for the "%USERPROFILE%\AppData\Local\Iconcache.db" trick. It does the job perfectly on a RDS Session for an only user who had lost MS Office icons (only)...

  44. Pedro says:

    Saved me with the “%USERPROFILE%\AppData\Local\Iconcache.db” erasing tip. Thanks!

  45. Mike says:

    Thank you! Even in 2013 this came up big.

  46. Bea says:

    Thanks, that worked well. Very easy directions well described.

  47. Lydie says:

    After trying all the methods in the post without success, and reading through all the comments and trying several solutions mentioned including the RestoreIcons.bat, I finally hit on the solution to restore Adobe Reader icon on my Windows 8 laptop. At some point, perhaps after a Paint Shop Pro update, the Adobe Reader icon got replaced by the PSP shortcut, very annoying as both programs are heavily used. The only thing that worked for me was to replace the icon by hand.
    Go to: C:\ProgramData\Microsoft\Windows\Start Menu\Programs
    Scroll down below the folders to find the shortcuts and there find the bad one and delete it.
    The Go to:
    C:\Program Files (x86)\ Adobe (in my case)
    Find the exe. Right-click and create a shortcut. Copy the shortcut to C:\ProgramData\Microsoft\Windows\Start Menu\Programs in place of the one you deleted.
    Done!
    Kind of laborious, but effective.
    Best Regards

  48. zord says:

    None of these worked. XP SP3, just .dll icons gone missing after these steps.

  49. Anand Kamal sachdeva says:

    Thanks for suggesting, I just change icon size and apply and resolve my problem.

  50. John of Western Australia says:

    I had wrong icons on every picture file. It was set to open in Windows Picture and fax, but had an MGI Photosuite icon. Tried the fix here, but didn't work.
    Then I went to my computer, tools, folder options, file types.
    Click new then type the extension you want the icon to change, mine was JPG.
    It will ask to un-associate the file with what is there now, then you can associate the file with what you want it to open with. Icon changed and looks good.

  51. harsh vardhan says:

    i having a problem in my laptop, there is icon name(my picture) is showing in all drives of my computer and it doesn't get deleted ,it comes again and again even after deleting it, if i insert any pen drive it automatically goes in the pen drive and doesn't get deleted from there also,it gets spreads everywhere.

  52. raj says:

    Thanks. It worked for me

  53. pari says:

    thank you so much :) changing icon size solved the problem :))

  54. Rubel Hossen says:

    The icons are connected to the content of the “windows\installer” folder (system, hidden) that for some strange reason was not converted by convert.exe procedure.

  55. Bhagyashri says:

    Hi,

    I am having the problem with my laptop for window 8.0-- Icons of all display software on "start" menu & Desktop software has been changed in torrent icon.

    So can you please provide me solution for that. Its very important for me. I am preparing for online exam.

    Please do the needful...

  56. Nastia says:

    John of Western Australia: THANK YOU very-very much!
    I tried almost all the methods mentioned here but it was yours that helped.
    Thanks!

  57. Paul Caswell says:

    Hi,
    I have tried all of the various icon 'tweaks' in theses threads but still have a 'black icon' problem. It seems to be slightly different to most asked about here.
    I have 2 Win 7 pro systems. On the 'OK' one I have folders containing all my custom icons. I have copied this to my 2nd system to apply the same icons to duplicated folders.
    All worked well until a few months ago. The 2nd system is gradually being built to mirror the 1st - and will take over soon as it is a better spec' overall. Without having installed anything extra the folder containing my icons decided to show some as ok and some as black squares. The preview shows the correct icon [but with a black outline.
    If I copy a black square to the desktop the icon is visible - again with the black outline.
    I have tried deleting the folder and re-copying but the 2nd system refuses to show all icons in the folder correctly.
    I have one or two sub-folders where the problem is duplicated - some look OK, some are black squares.

    Any suggestions that can cure this would be greatly appreciated.

  58. Flavis says:

    any of those solutions worked for me.... finally my solution was:

    1. edit the iconcache.db
    2. check WHERE is supposed to be the office's icon files (wordicon.exe, pptico.exe and xlicons.exe)
    3. since that folder does not exist, I created it and copied those files from office14 folder

    now it is working fine

    I also had .PDF file with same issue and same solution for it.

    I hope this can help anyone.

  59. Troy says:

    Thank you soooo much! After an hour of searching this is the only webpage where I've found a working solution!!!

    I think the key for me was to close down Explorer.exe after IconCache.db is deleted. Previously I tried restart machine directly after deletion and it didn't work.

Leave a Reply

Your email address will not be published. Required fields are marked *