General Rebuild Icon Cache in Windows 11


Configuration_banner.png

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


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

reset_icon_cache.png

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.




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 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:
Hello Brink

I had Photos Legacy as the default app for images.
Switching to the Photos app, image files showed the Photos app icon.
Switching back and having Photos Legacy as default, I get the blank white icon again.
Any idea if I can get the icon for Photos Legacy to show?
Do you have thumbnail previews enabled like below so the image file will show the image instead of its default app icon?

 

My Computers

System One System Two

  • OS
    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
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    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,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender
I've turned on Thumbnail Previews for Current User in Folder Options but I don't see any thumbnails?
Is there a way of resetting so that Thumbnail Previews will work?
 

My Computer

System One

  • OS
    Windows 11 Home 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Dell G5 15
I've turned on Thumbnail Previews for Current User in Folder Options but I don't see any thumbnails?
Is there a way of resetting so that Thumbnail Previews will work?
Just to make sure of this issue, go ahead and post a screenshot showing what you're seeing. Is this happening to all image files, or just these two?
 

My Computers

System One System Two

  • OS
    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
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    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,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender
It's happening with all .jpg and .png files.
I have two .jpg files in my documents folder.
I copied and pasted them to desktop.
Preview image is now displayed for those images on desktop but still not from their original documents folder.
 

My Computer

System One

  • OS
    Windows 11 Home 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Dell G5 15
It's happening with all .jpg and .png files.
I have two .jpg files in my documents folder.
I copied and pasted them to desktop.
Preview image is now displayed for those images on desktop but still not from their original documents folder.
Could be an issue with the original Documents folder location since they show in other locations.
 

My Computers

System One System Two

  • OS
    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
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    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,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender
I have two probably very stupid questions due to a knowledge gap:

How do the cache databases (IconCache.db and the multiple IconCache_*.db) actually differ?
And when are these recreated by Windows?
With every reboot? Or "only" with every automatic maintenance?

Many thanks and best regards,
Martin
 

My Computer

System One

  • OS
    Win11 22H2
I have two probably very stupid questions due to a knowledge gap:

How do the cache databases (IconCache.db and the multiple IconCache_*.db) actually differ?
And when are these recreated by Windows?
With every reboot? Or "only" with every automatic maintenance?

Many thanks and best regards,
Martin

Hello Martin, :alien:

I'll try to answer some of that.

Usually, the cache is reloaded upon viewing files with icons. Afterwards, the icons are loaded faster from the cache instead of slowly loaded from the files.

Quoted below from Copilot:
The IconCache.db file and the IconCache_.db* files are both part of Windows' icon caching system, but they serve slightly different purposes:
  1. IconCache.db: This is the main icon cache database file used by Windows to store copies of icons for quick access. When Windows needs to display an icon, it retrieves it from this cache instead of the original application file, which speeds up the process.
  2. IconCache_.db*: These files are additional cache databases that store icons of different sizes (e.g., 32x32, 48x48, 256x256, etc.). Windows uses these files to quickly access icons of various resolutions as needed.
In summary, IconCache.db is the primary cache file, while IconCache_.db* files are supplementary cache files for different icon sizes.
 

My Computers

System One System Two

  • OS
    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
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    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,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender
does this fix issues with icons in task manager?
 

My Computer

System One

  • OS
    windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    user built custom
    CPU
    amd ryzen 5 7600x
    Motherboard
    gigabyte aorus elite ax rev 1.0
    Memory
    CORSAIR - VENGEANCE RGB 32GB (2PK 16GB) 5600MHz DDR5 C36
    Graphics Card(s)
    XFX Speedster SWFT 210 Radeon RX 6600
    Sound Card
    n/a
    Monitor(s) Displays
    AOC Gaming 24G2S 24” Frameless Gaming Monitor
    Screen Resolution
    1920x1080
    Hard Drives
    2x wd black sn770 1tb m.2 drives, one 2tb crucial bx500 ssd
    PSU
    corsair rmx850x
    Case
    corsair airflow 4000d
    Cooling
    4 noctua 120mm case fans, one DeepCool AK400 ZERO DARK PLUS CPU Air Cooler
    Keyboard
    razor black widow v3
    Mouse
    razor basilisk v3
    Internet Speed
    1gb
    Browser
    firefox
    Antivirus
    windows defender
    Other Info
    windows 11: 22h2 os build 22621.3007
does this fix issues with icons in task manager?

Hello mate, :alien:

I'm not sure Task Manager uses the icon cache, but it won't hurt to try.
 

My Computers

System One System Two

  • OS
    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
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    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,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender
I went through all of these steps and could not get previews in my Pictures folder. Photos, app icons, etc. came back just fine. I finally copied everything in Pictures to a new folder (where they showed up with proper previews), then copied the files back, overwriting everything. Voila.
 

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo
I went through all of these steps and could not get previews in my Pictures folder. Photos, app icons, etc. came back just fine. I finally copied everything in Pictures to a new folder (where they showed up with proper previews), then copied the files back, overwriting everything. Voila.
Maybe a OneDrive issue?
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
Maybe. I don't store files on or sync with OneDrive, but it could still be causing mischief.
 

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo
Back
Top Bottom