How to fix missing icons in the taskbar and start menu? [duplicate]

I installed Visual Studio 2012 yesterday and during the install my path somehow got screwed up1. Since then, the icons for applications that are part of Windows are the default "unknown" icon, but other icons are fine. The applications that the shortcuts link to launch fine when the icons are clicked on.

Taskbar:

Taskbar

Start Menu:

Start Menu

I have fixed my path, but the icons still show incorrectly.

Any ideas on how to flush what appears to be a set of cached icons?


1Something took a path of A;B;C;D; and turned it into A;B;C;D;A;B;C;D;E;F; - duplicating a large part of it to that point that no more characters were available to type in the edit box in system properties. This had the side-effect of Windows reporting that it couldn't find %windir%.


I have solved the icon issue by:

  1. Starting the Task Manager
  2. Ending the explorer.exe process (Right click on explorer.exe -> End process)
  3. Opening a command line window (File -> New Task (Run...) -> Type cmd.exe)
  4. In the cmd window type
    cd %userprofile%\appdata\local
  5. Now you need to delete the iconcache.db file
    del iconcache.db /a 
  6. Exit the cmd window by typing
    exit
  7. Starting the explorer again (File -> New Task (Run...) -> Type explorer.exe)

Now you should be able to see the restored icons.


for me the pin and unpin function of the taskbar did the trick


I eventually solved this by following the advice given here, although not the advice in the article but the advice in one of the comments:

change momentarily the screen color depth to 16 bits, for example, and, when Windows asks you whether you want to keep the changes or not, click "No" to restore the original settings.

The advice in the main body of the article (about changing the view hidden folders and files setting) didn't work.