Windows Explorer Icon Cache is broken. How to solve it?

96 views Asked by At

I always see broken icons on .lnk and .exe after compiling, renaming, updating executables, etc. I even tried to re-install Windows to solve the problem. Is there a faster way to solve it other than killing and restarting explorer.exe?

1

There are 1 answers

0
Louis55 On BEST ANSWER

By creating a `.bat` file with the following commands, you can solve it under a second through opening it.


' rebuild-icon-cache.bat ':

del "%localappdata%\IconCache.db" /f /q
taskkill /f /im explorer.exe
del "%localappdata%\IconCache.db" /f /q
ping 127.0.0.1 -n 2 > nul
start "" explorer.exe
:pause