This tutorial will show you how to rebuild the icon cache to clear and reset it for your account in Windows 10 and Windows 11.
The icons that display for files in Windows are saved in an icon cache so they can be displayed quickly instead of having to manually scan and slowly load them each time.
The icon cache can sometimes become corrupted causing the icons of files to display incorrectly or distorted. When this happens, the icon cache needs to be deleted to reset and automatically recreate it.
Rebuilding the icon cache will not help with the following icon issues:
- The icon of a shortcut not displaying properly due to the target source of the shortcut was moved or deleted. You may need to recreate a new shortcut directly from the source (ex: program's exe) file to replace it instead.
- All icons for a specific file extension display the wrong icon. This may be due to setting the wrong association for what app to open the file type instead. If so, restoring the default association of the file extension will fix this issue.
- Thumbnails of pictures, videos, and documents.
Contents
- Option One: Refresh Icons using Command
- Option Two: Rebuild Icon Cache using BAT file
- Option Three: Rebuild Icon Cache in Command Prompt
1 Open Windows Terminal, and select either Windows PowerShell or Command Prompt.
2 Copy and paste the
ie4uinit.exe -show
command into Windows Terminal, and press Enter. (see screenshot below)3 If the refresh doesn't sort the icons, you can try Option Two or Option Three.
1 Click/tap on the download button below to download the file below.
Rebuild_Icon_Cache.zip
(Content of BAT file for reference)
Code:
@echo off
set iconcache=%localappdata%\IconCache.db
set iconcache_x=%localappdata%\Microsoft\Windows\Explorer\iconcache*
echo.
echo The explorer process must be temporarily killed before deleting the IconCache.db file.
echo.
echo Please SAVE ALL OPEN WORK before continuing.
echo.
pause
echo.
If exist "%iconcache%" goto delete
echo.
echo The %localappdata%\IconCache.db file has already been deleted.
echo.
If exist "%iconcache_x%" goto delete
echo.
echo The %localappdata%\Microsoft\Windows\Explorer\IconCache_*.db files have already been deleted.
echo.
exit /B
:delete
echo.
echo Attempting to delete IconCache.db files...
echo.
ie4uinit.exe -show
taskkill /IM explorer.exe /F
timeout /t 2 >nul
del /A /F /Q "%iconcache%"
del /A /F /Q "%iconcache_x%"
start explorer.exe
2 Save the ZIP file to your desktop.
3 Save and close anything that you are working on before proceeding. The next steps will involve killing the explorer process while rebuilding the icon cache.
4 Unblock the ZIP file.
5 Extract the BAT file from the ZIP file.
6 Run the BAT file.
7 Follow the instructions in the command prompt to rebuild the icon cache. (see screenshot below)
8 If the icons are still not displaying properly after rebuilding the icon cache, then download and merge the .reg file for the .ico (ICO) option here to restore the default associations of .ico (icon) files in Windows.
1 Close and save anything that you are working on before proceeding. The next steps will involve killing the explorer process while rebuilding rebuild the icon cache.
2 Open Windows Terminal, and select Command Prompt.
3 Copy and paste each command below one at a time into Windows Terminal, and press Enter after each command.
ie4uinit.exe -show
taskkill /IM explorer.exe /F
DEL /A /F /Q "%localappdata%\IconCache.db"
DEL /A /F /Q "%localappdata%\Microsoft\Windows\Explorer\iconcache*"
4 If the icons are still not displaying properly after rebuilding the icon cache, then download and merge the .reg file for the .ico (ICO) option here to restore the default associations of .ico (icon) files in Windows.
That's it,
Shawn Brink
Attachments
Last edited: