Recently, Vista’s Explorer decided that my .DOCX file icons should be Purple Palace icons instead. While I’m all for pre-K games, it was a little disconcerting when looking for a particular file. Additionally, many of my other icons were screwed up as well. The weird part is that double clicking on any of the files with the wrong icons started the correct program. Since I actually do look at the file icons in Explorer, I was dismayed to find that the old file icon association dialog we’d known and loved in XP was gone. Thus began my quest to make everything right in my icon land.

In the old, old days, if the file icons were messed up, you’d just have to delete the icon cache in the Windows directory. It’s been a while, but I was sure the shell icon cache wasn’t there any more. After some time with search engines, I stumbled across James Finnigan’s post on how to delete the cache per user for Vista:

  1. Kill all instances of Explorer.exe. Use PSKILL from Mark Russinovich to make that easy.
  2. Open a CMD.EXE window and enter “cd %USERPROFILE%AppDataLocal” (no quotes)
  3. Unhide the icon cache, with “attrib –h IconCache.db” (no quotes)
  4. Delete the icon cache with “del IconCache.db” (no quotes)
  5. Restart explorer “explorer”

Unfortunately, even after restarting Vista, which is something I rarely do, the appropriate icons still didn’t show up. To get the correct icons to show up, I did the following steps:

  1. Right click on a file with the broken icon
  2. If Open With… was present, select that menu and choose the top item, which is the associated program. After the file was opened, Explorer normally refreshed and updated the icon
  3. If the Open With… menu was not present, or the step above didn’t work, right click on a broken icon file again and choose Properties
  4. In the General tab, click the Change button
  5. In the Open With dialog, ensure the correct program is selected, and click OK.

While it was a little tedious because I had 20-30 broken file icons, I was able to get them all back with the above steps. Just thought I’d share what worked for me if someone else was running into the same issues.