Win7 圖示顯示異常(空白、錯誤圖示、黑色方塊)通常是圖示快取損毀或登錄檔殘留導致。提供兩種修復方式:自動化批次檔與手動清除快取,任選其一即可。
將以下程式碼複製到記事本,另存為 重建Win7圖示快取.bat(存檔類型選「所有檔案」),以系統管理員身分執行:
rem 關閉 Windows 殼程式 explorer
taskkill /f /im explorer.exe
rem 清理系統圖示快取資料庫
attrib -h -s -r "%userprofile%\AppData\Local\IconCache.db"
del /f "%userprofile%\AppData\Local\IconCache.db"
attrib /s /d -h -s -r "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\*"
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"
rem 清理系統托盤記憶的圖示
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
rem 重啟 Windows 殼程式 explorer
start explorer
%USERPROFILE%\AppData\Local 按 Enter。IconCache.db 刪除。適用於 Windows 7 / Vista / 2008。
若圖示變成黑色方塊,通常是 Shell Icons 登錄檔殘留。將以下碼存為 桌面圖示黑塊修復器.bat 執行:
@echo off
title win7桌面圖示黑塊修復工具
reg delete "hkcu\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" /f
reg delete "hklm\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" /f
taskkill /f /im explorer.exe & start explorer.exe
執行後桌面會閃一下(explorer 重啟),圖示即恢復正常。以上兩法可徹底解決 Win7 圖示快取問題。更多系統維護技巧,歡迎關注本站教學專區。