I'm running Win7 Ultimate x64, and have Visual Studio 2010 installed. The other day I mis-clicked and deleted the VS2010 program folder; I realised my mistake the next time I started the PC and noticed the VS2010 shortcut icon pinned to the Start Menu and Taskbar had changed to the default 'unknown application' icon.

After a few seconds wondering where the hell the VS2010 folder had gone, I figured-out what I must have done, went to the Recycle Bin, and restored the VS2010 folder to it's original location - but the shortcut icon associations in the Start Menu and Taskbar (or the Start Menu VS2010 subfolder) did not recover to the VS2010 icon.

I tried deleting all these shortcuts and re-adding them, to no avail. If I create a new shortcut on the desktop from the main VS2010 process (devenv.exe) it acquires the correct icon; if I then pin that new shortcut to the Start Menu or Taskbar, the newly-pinned shortcut is drawn with the 'unknown app' icon!

What do I have to do in order that Windows will forgive my mouse-slip and use the VS2010 icon on these shortcuts again?

2 Answers 2


It's a fault in the shell icon database. Here's how to fix it:

  1. Increase the shell icon cache size (this stops the problem from recurring in the future):

    • Open regedit.exe and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer

    • Create a REG_SZ (string value) called "Max Cached Icons" (omit quotes but include the spaces)

    • The default value is way too low (500). Bump it to 4096 (4 MB) or more, I use 8192 (8 MB).

  2. Delete the icon cache database so that Windows will rebuild it after rebooting. Open an elevated command prompt and enter the following four commands:

    taskkill /IM explorer.exe /F
    CD /d %userprofile%\AppData\Local
    DEL IconCache.db /a
    shutdown /r 

Job done.


To rebuild the icon cache database:

  1. Close all folder windows that are currently open.
  2. Launch Task Manager (press Ctrl+Shift+Esc or run taskmgr.exe).
  3. In the Processes 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 following commands one by one and press Enter after each one:

    CD /d %userprofile%\AppData\Local
    DEL IconCache.db /a
  8. In Task Manager, click File and select "New Task (Run…)"
  9. Type EXPLORER.EXE and click OK.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .