Skip to content

Instantly share code, notes, and snippets.

@ty0x2333
Created July 10, 2016 03:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ty0x2333/ea517ad2c88916c7d5cb8580f582fd51 to your computer and use it in GitHub Desktop.
Save ty0x2333/ea517ad2c88916c7d5cb8580f582fd51 to your computer and use it in GitHub Desktop.
set iconcache=%localappdata%\IconCache.db
rem Close explorer
taskkill /f /im explorer.exe
rem Remove Icon Cache
attrib -h -s -r "%iconcache%\IconCache.db"
del /f "%iconcache%\IconCache.db"
attrib /s /d -h -s -r "%iconcache%\Microsoft\Windows\Explorer\*"
del /f "%iconcache%\Microsoft\Windows\Explorer\thumbcache_32.db"
del /f "%iconcache%\Microsoft\Windows\Explorer\thumbcache_96.db"
del /f "%iconcache%\Microsoft\Windows\Explorer\thumbcache_102.db"
del /f "%iconcache%\Microsoft\Windows\Explorer\thumbcache_256.db"
del /f "%iconcache%\Microsoft\Windows\Explorer\thumbcache_1024.db"
del /f "%iconcache%\Microsoft\Windows\Explorer\thumbcache_idx.db"
del /f "%iconcache%\Microsoft\Windows\Explorer\thumbcache_sr.db"
rem Clean Tray Icon Cache
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 start explorer
start explorer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment