Icon cache corruption may happen sometimes, causing wrong icons to show up for certain programs or in certain areas of the Windows shell, or no icons at all.
My earlier post Incorrect icon shown for a file type tells you how to refresh the shell icons using Default Programs. In case the solution posted in that link does not help, you may want to completely clear and rebuild icon cache database. This post explains how to do so, using a Script I wrote, or manually, for all versions of Windows including Windows 10.
Automatically Clear the Icon Cache Using Script
To clear the icon caches for Windows Vista, 7, 8 and Windows 10, download the zip file below, unzip and run Vbscript file cleariconcache.vbs.
If any other programs are using the icon cache, the cache cannot be cleared. Save all your work, and close all programs and then double-click the script.
Click Yes when you’re prompted to restart the shell.
If the Icon Cache database files can’t be deleted, some programs are using it. Close all applications and try running the script again.
After clearing the cache, Explorer shell should start automatically, and rebuilds fresh set of icon caches.
Rebuilding the Icon Cache Database Manually
1. Close all folder windows that are currently open.
2. Launch Task Manager using the CTRL+SHIFT+ESC key sequence, or by running taskmgr.exe.
3. In the Process tab, right-click on the Explorer.exe process and select End Process.
4. Click the End process button when asked for confirmation.
5. From the File menu of Task Manager, select New Task (Run…)
6. Type CMD.EXE, and click OK
7. In the Command Prompt window, type the commands one by one and press ENTER after each command:
CD /d %userprofile%\AppData\Local
DEL IconCache.db /a
This should clear the icon cache in Windows Vista, 7, 8, and 10.
Additionally, in Windows 8 and Windows 10, icon cache database is also stored in %userprofile%\AppData\Local\Microsoft\Windows\Explorer. To clear them, you must close all running applications, and run these commands in the Command Prompt. If you receive Access is Denied error when running the deleting the IconCache*.db files, then one or more of the open programs is using the icon cache database. Close all programs and try again, or try clearing them from Safe mode.
DEL IconCache*.db /a
8. In Task Manager, click File, select New Task (Run…)
9. Type EXPLORER.EXE, and click OK.
Editor’s note: Instead of using Task Manager to exit Explorer.exe, even better way to do this is to terminate the Explorer.exe Shell cleanly using the method described in article Terminate and Restart Explorer.exe Process Cleanly in Windows 7 & Windows Vista, or if you’re using Windows 8 or Windows 10, check the article How to Exit Explorer and Restart Explorer in Windows 10 and Windows 8?.
About the author
Ramesh Srinivasan founded Winhelponline.com back in 2005. He is passionate about Microsoft technologies and has a vast experience in the ITeS industry — delivering support for Microsoft's consumer products. He has been a Microsoft MVP [2003 to 2012] who contributes to various Windows support forums.