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?

link|improve this question
feedback

1 Answer

up vote 0 down vote accepted

Got it - it's a fault in the shell icon database. Here's how to fix it.

First, increase the shell icon cache size (this stops the problem recurring in the future):

  1. Navigate to the following key in the registry:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer

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

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

Second, zap the icon cache database so that Windows will rebuild it after rebooting. Open an Admin-elevated CMD prompt and enter the following 4 commands:

  1. taskkill /IM explorer.exe /F

  2. CD /d %userprofile%\AppData\Local

  3. DEL IconCache.db /a

  4. shutdown /r

Job done.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.