General Rebuild Icon Cache in Windows 11

  • Staff
configuration_banner.png

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.
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.


Contents






OPTION ONE

Refresh Icons using Command


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.

ie4uinit.exe-show.png






OPTION TWO

Rebuild Icon Cache using BAT file


1 Click/tap on the download button below to download the BAt file below.

Rebuild_Icon_Cache.bat


(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
If exist del /A /F /Q "%iconcache%"
If exist del /A /F /Q "%iconcache_x%"
start explorer.exe
echo.
echo IconCache database files have been successfully deleted.
goto restart


:restart
echo.
echo.
echo You will need to restart the PC to finish rebuilding your icon cache.
echo.
CHOICE /C:YN /M "Do you want to restart the PC now?"
IF ERRORLEVEL 2 goto no
IF ERRORLEVEL 1 goto yes

:yes
shutdown /r /f /t 00

:no
exit /B

2 Save the BAT 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 and restarting the PC.

4 Unblock and run the BAT file.

5 Follow the instructions in the command prompt to rebuild the icon cache. If you do not restart the PC now, you will need to later to finish rebuilding the icon cache. (see screenshot below)

reset_icon_cache.png

6 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.





OPTION THREE

Rebuild Icon Cache in Command Prompt


1 Close and save anything that you are working on before proceeding. The next steps will involve killing explorer and restarting the PC.

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 /Q "%localappdata%\IconCache.db"

DEL /A /F /Q "%localappdata%\Microsoft\Windows\Explorer\iconcache*"

shutdown /r /f /t 00

The last command will instantly restart the computer.


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

  • configuration.png
    configuration.png
    5.3 KB · Views: 14
  • Rebuild_Icon_Cache.bat
    1.3 KB · Views: 19
Last edited:

Wisewiz

Speaks Ancient Geek
Power User
VIP
Local time
9:36 PM
Posts
737
Location
Ontario, Canada
@Brink

Hi :giggle:

I've looked at the bat file for W10 and this one for W11, and I see no difference at all. Am I missing sthg, or does the rebuilding process work exactly the same way in both 10 and 11?

Thanks,

Dan
 

My Computers

System One System Two

  • Operating System
    11 Pro 21H2 (22000.318)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Lenovo ThinkCentre M920S SFF
    CPU
    i5-8400 @ 2.80MHz
    Motherboard
    Lenovo
    Memory
    16GB DDR4 @ 2666MHz
    Graphics Card(s)
    Intel HD 630 Graphics onboard
    Sound Card
    Realtek HD Audio
    Monitor(s) Displays
    LG E2442
    Screen Resolution
    1920x1080
    Hard Drives
    2 x Samsung 870 EVO SSD
    Case
    Lenovo SFF
    Keyboard
    Microsoft Wired 600
    Mouse
    LogiTech M510 wireless
    Internet Speed
    Fast (for satellite!)
    Browser
    Chrome
    Antivirus
    Malwarebytes Premium & Defender (working together beautifully!)
  • Operating System
    11 Pro 21H2 (22000.318)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Lenovo ThinkCentre M910S SFF
    CPU
    i7-7700 @ 3.60MHz
    Motherboard
    Lenovo
    Memory
    16GB DDR4 @ 2400MHz
    Graphics card(s)
    Intel HD 630 Graphics onboard
    Sound Card
    Realtek High Definition Audio onboard
    Monitor(s) Displays
    LG FULL HD (1920x1080@59Hz)
    Screen Resolution
    1920 x 1080
    Hard Drives
    2 x Samsung 870 EVO SSD
    Mouse
    LogiTech M510 wireless
    Keyboard
    Microsoft 600 wired
    Internet Speed
    Fast (for satellite!)
    Browser
    Chrome
    Antivirus
    Malwarebytes Premium and MS Defender

Brink

Administrator
Staff member
MVP
Thread Starter
Local time
8:36 PM
Posts
1,941
@Brink

Hi :giggle:

I've looked at the bat file for W10 and this one for W11, and I see no difference at all. Am I missing sthg, or does the rebuilding process work exactly the same way in both 10 and 11?

Thanks,

Dan

Hello Dan, :)

Correct. It's the same process as in Windows 10.
 

My Computers

System One System Two

  • Operating System
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    16 GB (8GBx2) G.SKILL TridentZ DDR4 3200 MHz
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 980 PRO M.2,
    1TB Samsung 970 EVO Plus M.2,
    6TB WD Black WD6001FZWX
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    Linksys EA9500 router,
    Motorola MB8611 cable modem,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S20 Ultra 5G phone
  • Operating System
    Windows 11 Pro for Workstations
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 2in1
    CPU
    i7-1065G7 3.9 GHz
    Memory
    16 GB LPDDR4-3200
    Graphics card(s)
    Intel Iris Plus
    Sound Card
    Intel SST
    Monitor(s) Displays
    13.3" 4K UWVA AMOLED multitouch
    Screen Resolution
    3840 x 2160
    Hard Drives
    512 GB PCIe NVMe M.2 SSD
    Browser
    Google Chrome
    Antivirus
    Windows Defender and Malwarebytes Premium

ege914

Member
Local time
5:36 AM
Posts
13
Can i recommend alternative way, First one is for Windows 11 and Windows 10 , second one is for lower windows versions:

ie4uinit.exe -show
ie4uinit.exe -ClearIconCache
 

My Computer

System One

  • Operating System
    Windows 11 Custom Edited
    Computer type
    Laptop
    CPU
    i7 9750
    Memory
    32GB
    Graphics Card(s)
    1660ti
    Hard Drives
    Samsung 980 Evo Plus
Top Bottom