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?
Answer
It's a fault in the shell icon database. Here's how to fix it:
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).
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.
No comments:
Post a Comment