Windows图标显示错误解决方法(清理图标缓存BAT脚本)
使用Windows过程中经常会遇到程序图标显示异常,重启也无法解决;其实这个是图标缓存出现错误了,由于一些意外错误的发生可能导致缓存过程出错、缓存文件损坏等情况导致这种图标显示异常。其实解决起来很简单,清理图标缓存即可,一个脚本就可以解决问题,而且立竿见影,十分好用。
这个脚本也是我从网上找到的,作者是谁已经不可考,总之分享出来吧:
代码如下:
rem 关闭Windows外壳程序explorer</p> <p>taskkill /f /im explorer.exe</p> <p>rem 清理系统图标缓存数据库</p> <p>attrib -h -s -r "%userprofile%/AppData/Local/IconCache.db"</p> <p>del /f "%userprofile%/AppData/Local/IconCache.db"</p> <p>attrib /s /d -h -s -r "%userprofile%/AppData/Local/Microsoft/Windows/Explorer/*"</p> <p>del /f "%userprofile%/AppData/Local/Microsoft/Windows/Explorer/thumbcache_32.db"
del /f "%userprofile%/AppData/Local/Microsoft/Windows/Explorer/thumbcache_96.db"
del /f "%userprofile%/AppData/Local/Microsoft/Windows/Explorer/thumbcache_102.db"
del /f "%userprofile%/AppData/Local/Microsoft/Windows/Explorer/thumbcache_256.db"
del /f "%userprofile%/AppData/Local/Microsoft/Windows/Explorer/thumbcache_1024.db"
del /f "%userprofile%/AppData/Local/Microsoft/Windows/Explorer/thumbcache_idx.db"
del /f "%userprofile%/AppData/Local/Microsoft/Windows/Explorer/thumbcache_sr.db"</p> <p>rem 重启Windows外壳程序explorer</p> <p>start explorer
新建一个 clean_icon_cache.bat 批处理文件,右击点击编辑,然后将以上内容复制进去并保存,然后双击执行即可。
顺带附送一个清理右下角托盘图标历史的脚本:
代码如下:
rem 关闭Windows外壳程序explorer</p> <p>taskkill /f /im explorer.exe</p> <p>rem 清理 系统托盘记忆的图标</p> <p>echo y|reg delete "HKEY_CLASSES_ROOT/Local Settings/Software/Microsoft/Windows/CurrentVersion/TrayNotify" /v IconStreams
echo y|reg delete "HKEY_CLASSES_ROOT/Local Settings/Software/Microsoft/Windows/CurrentVersion/TrayNotify" /v PastIconsStream</p> <p>rem 重启Windows外壳程序explorer</p> <p>start explorer