萬盛學電腦網

您现在的位置: 萬盛學電腦網 >> 程式設計 >  >> 伺服器教學

Windows 圖示顯示異常?一鍵清理圖示快取批次檔(含通知區域歷史清理)

Windows 使用久了,常出現程式圖示變成白紙、錯誤圖示、或通知區域(系統匣)殘留已移除程式的圖示。這是因為圖示快取資料庫 IconCache.db 損壞或過期。提供兩支現成批次檔,雙擊即可一鍵修復,立竿見影。

批次檔 1:清理圖示快取(修復桌面/工作列/總管圖示異常)

新建文字檔命名為 clean_icon_cache.bat,貼上以下內容並存檔,滑鼠右鍵「以系統管理員身分執行」:

@echo off
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"

rem 清理縮圖快取(Windows 7/8/10/11)
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 重新啟動 explorer
start explorer.exe

批次檔 2:清理通知區域(系統匣)圖示歷史記錄

新建 clean_tray_history.bat,同樣以管理員身分執行:

@echo off
taskkill /f /im explorer.exe

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

start explorer.exe

使用說明

  • 執行過程中螢幕會短暫閃爍(explorer 重啟),屬正常現象。
  • 若執行後圖示仍異常,嘗試重新開機一次。
  • 此法適用 Windows 7 / 8 / 8.1 / 10 / 11。
copyright © 萬盛學電腦網 all rights reserved