Clear Icon Cache

This is a tool I've written that helps with a bug in Windows Vista and Windows 7. The bug affects Windows and Explorer and can affect Opus by proxy.

For example, if you updated from Opus 9 to Opus 10 but still see the Opus 9 icon on your desktop or taskbar, this tool should fix it. It may also help with missing or corrupted file and folder icons either in Opus or Explorer (or both).

Clear Icon Cache will cleanly exit Windows Explorer (and Directory Opus, if you use it), delete the shell icon cache (IconCache*.db) and localized thumbnail cache (ThumbCache*.db) and then restart Explorer (and Opus).

Windows is full of icon-caching bugs which mean it frequently shows incorrect, missing or out-of-date icons for programs and shortcuts on the desktop, taskbar, start menu, etc. When that happens, simply running this tool will usually fix things.

There are lots of guides on the web about how to do this manually but many of them have the details wrong. Even the good guides almost never tell you how to cleanly exit Explorer and are too complex for many users. (As well as using Task Manager and/or Command Prompts, it is vital that you stop Explorer, delete the file, then restart Explorer in the correct order; mixing up the steps means nothing happens.) With Clear Icon Cache you just double-click the program and it takes care of the details for you.
Clear Icon Cache is for Windows Vista, Windows 7, Windows 8 and Windows 10 (and hopefully above). If you are using Windows XP, you can use TweakUI instead.

To prevent message-boxes telling you if the program succeeded or failed, run ClearIconCache.exe /QUIET

History

  • 1.1.0.0 (12/Mar/2016): Updated to find new icon cache location used by Windows 8 and Windows 10. Now also deletes the shell thumbnail cache.
  • 1.0.0.2 (02/Nov/2012): Now restarts Directory Opus (if you are using it) in addition to Windows Explorer.
  • 1.0.0.1 (02/May/2011): Initial release.

Clear Icon Cache has been updated so that it will restart Directory Opus in addition to Windows Explorer. You no longer have to manually restart Opus after clearing the cache.

(The tool still works for people who don't use Opus. It will only try to restart Opus if it detects it is already running.)

New version 1.1.0.0: Updated to find new icon cache location used by Windows 8 and Windows 10. Now also deletes the shell thumbnail cache.

Thank you! I rarely (never) encountered icon cache problems myself, but I know some people that did. I do not use windows themes (Win7), maybe that's why? Anyway, I hope to remember this thread next time I see it happening for others. This tool needs some more promotion it seems. It's probably the best of all, but it only shows up on page 4 when searching for "clear icon cache windows" in google! o)

This is being blocked by Windows 10 and many AVs recently as alternative here is a batch script that does the job nicely.

Make sure to save any work you are doing as this will restart the system. Run as admin.Clear_Icon_Cache.zip (308 Bytes)

@echo off
taskkill /IM explorer.exe /F
DEL /A /Q "%localappdata%\IconCache.db"
DEL /A /F /Q "%localappdata%\Microsoft\Windows\Explorer\iconcache*"
shutdown /r /f /t 00

Or stop using garbage antivirus which blocks things for absolutely no reason (including Defender, which is atrocious lately). :smiley:

1 Like

Not only by Defender but It has also been blocked by Kaspersky Internet Security recently and a few others.

The exe hasn't changed in 4.5 years (and the version on the server is unmodified, I just checked). It doesn't do anything suspicious. Looking at VirusTotal, it's almost all heuristic algorithm matches, not specific threats, and the different vendors wrongly detecting it don't agree on any specific threat.

Trash antivirus causes more problems than it solves.

Your replacement batch file won't shutdown Opus and won't tell you if it failed to delete the files before rebooting the PC (which isn't necessary). But if it works for you, great. Personally, I'd use a better antivirus rather than replace one tool with something worse. The same trigger-happy antivirus will cause other problems down the road.

1 Like

It is not always an option to not use "garbage" anti-virus as you so eloquently put it. Some users might be forced by their companies' polices in regard to which antivirus must be installed on work computers for example as it comes bundled with work laptops/desktops.

Same goes with governments' and hospitals' computers and even some universities' IT departments force their students to install a certain solution in order to access some online functionalities.

The exe hasn't changed in 4.5 years.

No it hasn't but the anti-virus landscape has changed. An unsigned executable removing files and killing processes without user prompt will struggle to go through by most AVs no matter how many times it has been used or how long its been around. Especially in 2020 with the increased reliance on heuristics approach. I could guess you like ESET the most, but they have their very own downsides, are "garbage" in many other use-cases and I would not deploy them on my machines for that.

AFAIK, anything that could be solved with a batch file should not be bundled as an unsigned executable. It is counterintuitive in most cases.

The batch I posted was not meant to be a superior "replacement" but as I have originally stated an alternative to consider and a harmless addition that I have no idea how it sparked an argument :smiley:

Greetings Leo, great program.
One ting, can it be run silently so the message below does not pop up?

image

Apparently there is:

To prevent message-boxes telling you if the program succeeded or failed, run ClearIconCache.exe /QUIET

Cool, that's what I needed. Are there any more command line options?

Everything about it is on the web page for the tool. I haven’t needed to look at the code in about 10 years, so that’s the best place to find out.

1 Like