@echo off echo 关闭Windows Explorer... taskkill /f /im explorer.exe if %errorlevel% neq 0 ( echo Failed to terminate explorer.exe, please ensure it is running and you have sufficient permissions. )
echo 清理图标缓存... if exist "%userprofile%\AppData\Local\IconCache.db" ( attrib -h -s -r "%userprofile%\AppData\Local\IconCache.db" del /f "%userprofile%\AppData\Local\IconCache.db" if %errorlevel% neq 0 ( echo Failed to delete IconCache.db, please check file permissions. ) ) else ( echo IconCache.db not found, skipping... )
echo 清理缩略图缓存... for %%i in (32 96 102 256 1024 idx sr) do ( if exist "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_%%i.db" ( attrib -h -s -r "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_%%i.db" del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_%%i.db" if %errorlevel% neq 0 ( echo Failed to delete thumbcache_%%i.db, please check file permissions. ) ) else ( echo thumbcache_%%i.db not found, skipping... ) )
echo 清理系统托盘图标记忆... for %%k in (IconStreams PastIconsStream) do ( echo y | reg delete "HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v %%k if %errorlevel% neq 0 ( echo Failed to delete registry key %%k, please check registry permissions. ) )