Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / How to Rebuild (Reset) a Corrupted Icon Cache on Windows 10?

January 27, 2021 Windows 10Windows Server 2016

How to Rebuild (Reset) a Corrupted Icon Cache on Windows 10?

When icons of different applications and file types are displayed in File Explorer, Windows instead of accessing the original files with icons gets copies of the icon images from special files containing icon cache. Due to the fact that the operating system doesn’t need to load original icon files, the performance and rendering of  icon objects in Windows Explorer are improved.

In some cases, if the cache file is corrupted, white blank icons of shortcuts and files may be displayed in Explorer (and on the Desktop), or default Windows icons are displayed instead of application icons. In this case, it is recommended to reset the Windows 10 icon cache.

The screenshot below shows that the Windows 10 Start Menu layout displays default folder icons instead of some application icons.

broken icon cache in Windows 10

Note. When such a bug appears, some users try to reinstall the problem app, which doesn’t often help.

The icon cache in different versions of Windows is one or more db files stored in the user profile folders.

  • In Windows 7, it is IconCache.db in %userprofile%\AppData\Local
  • In Windows 10 and Windows 8.1, these are several files, which names start from iconcache_ (iconcache_16.db, iconcache_32.db, iconcache_48.db, etc. according to the size of the icons in pixels), stored in %userprofile%\AppData\Local\Microsoft\Windows\Explorer
Don’t confuse thumbnail icon cache files with thumbs.db cache, which contain a cache of thumbnail images and videos in a folder.

iconcache_48.db

Refreshing the Icon Cache on Windows Using IE4uinit

In Windows there is a built-in tool ie4uinit (IE Per-User Initialization Utility) that can be used to quickly reset the icon cache database.

  • On Windows 10: ie4uinit.exe -show
  • On Windows 7: ie4uinit.exe -ClearIconCache

This command must be executed through the Win + R -> command -> Enter.

ie4uinit command used to refresh iconcache on windows 10

The commands are absolutely safe, but they don’t help to restore the normal state of the icon cache in all cases.

Script to Rebuild the Icon Cache on Windows

In order to reset the icon cache, it’s enough to delete db cache files. But first you need to end the Explorer.exe process in order to ulock access to the iconcache files. Let’s look at how to reset the icon cache database without rebooting Windows.

  1. Close all running apps;
  2. Open a command prompt window (cmd.exe or powershell.exe) as an administrator;
  3. Start Task Manager: taskmgr.exe
  4. In the Task Manager window, go to the Details tab, find the explorer.exe process and kill it (End Task); windows 10 kill explorer.exe with task manager
  5. You can also kill the process from the command line: taskkill /f /im explorer.exe
  6. Then sequentially execute the following commands to delete the icon cache in the user profile (depending on the OS version):

For Windows 10/ 8.1 (just copy&paste this code to the command prompt window or save as text file reset_icon_windows.bat).

taskkill /f /im explorer.exe
cd /d %userprofile%\AppData\Local\Microsoft\Windows\Explorer
attrib –h iconcache_*.db
del /f IconCache*
del /f thumbcache*
cd /d  %userprofile%\AppData\Local\
attrib –h IconCache.db
del /f IconCache.db
start C:\Windows\explorer.exe

windows10 iconcache reset batch script

In my case, the script failed to delete only the iconcache_idx.db file (access denied error), but this didn’t affect the final result. Icon cache was flushed successfully!

For Windows 7:

cd /d %userprofile%\AppData\Local
del /f /a s IconCache.db
start C:\Windows\explorer.exe

The last command in both cases will restart the Windows Explorer process. Explorer.exe when launched, will recreate icon cache files (according to the configured file associations).

7 comments
3
Facebook Twitter Google + Pinterest
previous post
How to Configure and Connect an iSCSI Disk on Windows Server?
next post
Throttling Network File Transfer Speed on Windows

Related Reading

How to Connect VPN Before Windows Logon

November 14, 2023

Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

November 7, 2023

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

How to Use Ansible to Manage Windows Machines

September 25, 2023

7 comments

Shlomi February 7, 2021 - 10:05 pm

Amazing! Thank you so much

Reply
Jo Smith July 24, 2021 - 8:04 pm

I have an issue when only icons for .url shortcuts on my desktop are missing (steam games etc.).

Following the script process didn’t solve the issue but I did have the iconcache_16.db (along with the iconcache_idx.db) fail to be deleted due to an access denied error.

Reply
blxkvypr August 8, 2021 - 8:29 pm

Your tips and tricks always saved my life, thank you!

Reply
Adam Novakov January 9, 2022 - 1:43 pm

Champion.

Reply
cimerians November 22, 2022 - 2:31 am

This worked! You rock!

Reply
techspecX March 10, 2023 - 12:42 am

Perfect man – incredibly beautiful. Thank you.

Reply
Thornax October 4, 2023 - 3:01 pm

Hey, somehow i can’t delete the icon and thumb caches even tho i am local admin and started my command prompt as administrator.
Also took full ownership of the folder already.
CMD is saying acces is denied

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • How to Connect VPN Before Windows Logon

    November 14, 2023
  • Removing Azure Arc Setup Feature on Windows Server 2022

    November 9, 2023
  • Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

    November 7, 2023
  • Send Emails with Microsoft Graph API and PowerShell

    November 6, 2023
  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Repair EFI/GPT Bootloader on Windows 10 or 11
  • How to Restore Deleted EFI System Partition in Windows
  • Network Computers are not Showing Up in Windows 10/11
  • Updating List of Trusted Root Certificates in Windows
  • How to Create a Wi-Fi Hotspot on your Windows PC
  • How to Sign an Unsigned Device Driver in Windows
  • How to Download APPX File from Microsoft Store for Offline Installation?
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top