How to fix broken taskbar icons in Windows 7

I have a program pinned to the taskbar. After I upgraded the program (I think) the icon broke. What I get now is what you see below; that ugly default application icon thing.

Broken icon

If I unpin it, I get the correct icon. If I then right-click on it, the icon breaks again. If I pin it again, still the broken icon. Unpin again and back to good icon. Very annoying. How can I fix this?


Based on @dash17291's answer, here is a slightly faster procedure (no reboot) that worked for me:

  1. Open Windows Explorer, go to %userprofile%\AppData\Local, delete IconCache.db. (This file is hidden, so it you don't see it, you will need to adjust your Windows Explorer settings to show hidden files.)

  2. Open Task Manager, go to Processes tab, highlight explorer.exe, and click End Process. Your desktop will "disappear."

  3. Still in Task Manger, select File > New Task (Run...), type explorer.exe, and click OK. Your desktop should reappear, with the previously missing icons.


Rebuild the Icon Cache:

Source: How to Rebuild the Icon Cache in Windows (http://www.sevenforums.com/tutorials/49819-icon-cache-rebuild.html)

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 a command prompt in Windows 7 or Windows 8.

  3. In the command prompt, Copy and paste each command line below exactly as is one at a time 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.

    • ie4uinit.exe -ClearIconCache
    • 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 for Windows 7 or Windows 8 to restore the default associations of .ico (icon) files.