242

Normally, to refresh the icon cache in Windows, we have to reboot.

Is there a way to refresh the icon cache in Windows 7/8 without rebooting?

4
  • 1
    What have you tried? What happened? Why do you need it done? Are you talking about on Windows Explorer, Start Menu, task bar, where? Need more information Nov 3, 2012 at 18:20
  • 1
    Yes I did... And that's why I'm asking for clarification. I saw this in the review queue, so I only read the answers now, but remember that this site is meant to also help visitors from Google or other search engines, as well Nov 3, 2012 at 18:22
  • 1
    Normally, when we refresh the icon cache in Windows, we have to reboot, but my question and answer does it without a reboot. blog.stackoverflow.com/2011/07/…
    – Elmo
    Nov 3, 2012 at 18:27
  • Found this Q via Google in December 2017. Thanks for posting this. I liked the answer where it says to make the short batch file. So in the comments I included the process of doing so. Now my Win8.1 icons are fixed. THANK YOU. EXCELLENT QUESTION.
    – SDsolar
    Dec 1, 2017 at 23:22

10 Answers 10

394

Yes.

You can just run the following command to clear the icon cache:

ie4uinit.exe -ClearIconCache

For Windows 10, use:

ie4uinit.exe -show

Check this video for a demo.

[tip credit]

19
  • 6
    Does not work on Windows 8.1. You have to delete IconCache.db as explained by @Techie007. Jan 19, 2015 at 20:05
  • 5
    Doesn't seem to work for me in Windows 7 Dec 28, 2015 at 9:38
  • 7
    For Windows 10, use the argument "show", mentioned in the same page (tip credit).
    – w32sh
    Apr 7, 2016 at 14:14
  • 8
    @Crazy Is it just a 1 liner? SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL);
    – Elmo
    Apr 16, 2016 at 21:32
  • 5
    ie4uinit.exe -show worked for me in Windows 10, thanks! So much easier than most of the tutorials telling you to go around deleting a bunch of .db files!
    – Jez
    May 24, 2019 at 10:41
58

The following way has worked since Vista; It requires an Explorer restart, but no reboot.

Short version: Stop all explorer.exe instances, delete the user's hidden IconCache.db file, and restart Explorer.

Long Version (there are other ways as well):

  1. Close all Explorer windows that are currently open.

  2. Launch Task Manager using the CTRL+SHIFT+ESC key sequence, or by running taskmgr.exe.

  3. In the Process tab, right-click on the explorer.exe process and select End Process.

  4. Click the End process button when asked for confirmation.

  5. From the File menu of Task Manager, select New Task (Run…)

  6. Type CMD.EXE, and click OK

  7. In the Command Prompt window, type the commands one by one and press ENTER after each command:

    CD /d %userprofile%\AppData\Local
    DEL IconCache.db /a
    EXIT
    
  8. In Task Manager, click File, select New Task (Run…)

  9. Type EXPLORER.EXE, and click OK.

instruction steps source

Warning: It's important that Explorer.exe not be running when you delete the IconCache.db file. If explorer is running, it will simply write out the current (corrupt) icons the next time it is shut down (e.g. when you logoff, shutdown, or restart).

5
  • Awesome, it works for every windows icon, even configuration ones. Other methods only reset iconcs from files and folders
    – mikl
    Mar 16, 2016 at 15:04
  • What I noticed lately is that the IconCache.db often not necessarily exists, but just restarting explorer.exe as described above solves the problem, too.
    – anre
    Feb 3, 2017 at 18:23
  • 1
    This answer deserves all the upvotes and the accepted tick IMO Jul 5, 2018 at 23:03
  • This worked for me. Sep 29, 2022 at 6:59
  • You can use %localappdata% instead of %userprofile%\AppData\Local Nov 27, 2023 at 10:40
30
  1. Open command console with admin privileges
  2. taskkill /IM explorer.exe /F
  3. CD /d %userprofile%\AppData\Local
  4. DEL IconCache.db /a
  5. start explorer.exe via Task Manager
4
  • 1
    worked for me, Win 8.1
    – Spike0xff
    Jun 20, 2017 at 21:00
  • This worked for me with Win 10 Home 1909, while the accepted answer does not.
    – Tigerware
    Jun 6, 2020 at 17:31
  • It stopped working after I closed the command console. The icons disappeared again. Tried it again, IconCache.db not found and more icons disappeared.
    – Tigerware
    Jun 6, 2020 at 17:35
  • Note for those who are NOT running Win10 as admin... these instructions will delete the icons for your admin user, not a standard user.
    – DAG
    Sep 14, 2020 at 18:31
12

Create a .bat file and paste the following lines in it and then run it.

taskkill /f /im explorer.exe
cd /d %userprofile%\AppData\Local
del IconCache.db /a
start explorer.exe
1
  • That's cool. Works fine in Win8.1 Quick and easy. And with the "QuickEdit" and "Run as Administrator" settings in the taskbar CMD icon, I was able to create the bat file by simply copying your text above, then clicking on the CMD icon. Typed copy con clearcache.bat then Enter, then Right-click to paste it in. One more Enter then a Ctrl-Z finishes the job of creating the file. Then I typed clearcache to run it. WIndows blinked and all the icons came back fixed. Took a total of 30 seconds for the whole fix. THANK YOU. EXCELLENT ANSWER.
    – SDsolar
    Dec 1, 2017 at 23:17
8

There's a clean way to close the Explorer.exe instance which shows the taskbar and the Desktop icons.

You have to popup the classic Shutdown dialog window. The only common way I found to accomplish this is:

  1. Leave at least one pixel of Desktop background free of overlapping Windows, then click on it to focus on the Desktop itself (the one with the icons).

  2. Press ALT + F4 keyboard shortcut: then the classic Shutdown dialog will appear.

  3. Now, press and hold CTRL+ALT+SHIFT and click on Cancel.

5
  • Why does this work? What does CTRL+ALT+SHIFT click on Cancel do? Sep 2, 2015 at 15:36
  • 2
    Also this: open the Windows 7 start menu, hold Ctrl-Shift down and right click in the empty space above the Shutdown/Logoff/Restart button (whichever you have configured as the default). A menu appears with "Exit Explorer" as an option. Click it and Explorer terminates.
    – Fran
    Nov 12, 2015 at 15:38
  • If you use the Windows 7 startmenu trick it's important to make sure you close ALL File Explorer windows first! Then you can Exit Explorer from the Windows 7 start menu. First open command prompt. Next click on the start menu, hold Ctrl+Shift and right click right above the Shutdown button to expose the Exit Explorer sub menu option and click it. In the command prompt, type CD /d %userprofile%\AppData\Local then type del IconCache.db /a and last type explorer.
    – Arvo Bowen
    Apr 5, 2016 at 23:26
  • 1
    To get your start menu back, ctrl+alt+del then file: new task and enter explorer.exe
    – jaggedsoft
    Jul 28, 2016 at 21:05
  • Press Win and release it. Then twice Alt+F4. This way is faster and you needn't to see part of the Desktop to open the classic shutdown menu.
    – cdlvcdlv
    Mar 5, 2018 at 10:22
5

If you don't want to make a .bat, copy the line behind, press Win+R, paste it and press Enter.

cmd /c taskkill /f /im explorer.exe & del /a %userprofile%\AppData\Local\IconCache.db & start explorer

You can also paste it in the address bar of an explorer window; and, of course, in a command line window (you don't need the cmd /c then) but you won't have the line to easily repeat it in case you need it again.

CAVEAT:

Don't run this line in an elevated prompt unless you're sure you are the only user in the system or you will kill explorer in all open sessions. Therefore, don't press Shift+Ctrl+Enter in the Run dialog box.

By the way, I don't see the need of the cd /d command I see repeatedly. It seems everybody just copy/paste without considering what are the commands for.

Note:

I use & instead of && just in case one of the commands fails, to ensure explorer is restarted.

3

Though not a userland answer, simple call to

SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL);

does that [1]. Possibly someone would create an utility to do just that; currently, using 7-zip and trying to modify file associations (for all users; without elevating permissions; which would fail and tell that operation failed) calls the notifications and rebuilds the icon cache.

Oh, just saw the comments to the accepted answer, where the call is discussed, and a tool for that is mentioned: https://github.com/crazy-max/IconsRefresh.

[1] https://docs.microsoft.com/en-us/windows/desktop/api/shlobj_core/nf-shlobj_core-shchangenotify

1
  • 1
    You can use winapiexec with these flags: winapiexec.exe shell32.dll@SHChangeNotify 0x08000000 0 0 0.
    – Paul
    Apr 13 at 9:53
2

ie4uinit.exe as suggested by Elmo is a good option because it is available on every system already. I had trouble with it not refreshing sometimes in a complex batch file I have. Nircmd is a great alternative that worked for me.

This is the command I used that worked: nircmd shellrefresh

1
  • I also had the problem that ie4uinit.exe didn't always refresh. I tried Nircmd as well and still no solid success. (sometimes works sometimes not)
    – Elron
    Aug 26, 2021 at 6:45
0

If you want a complete refreshed icon cache, go to the addressbar of windows explorer and type "C:\Users*Username*\AppData\Local" and then delete IconCache.db.

**Note:**It may be a hidden file. So I recommend turning Show Hidden Files on in Folder Option.

1
  • 2
    Please read the question again carefully. Your answer does not answer the original question.
    – DavidPostill
    Sep 4, 2016 at 7:17
-4

Not very beautiful but effective:

C:> tskill explorer

1
  • 4
    That's not enough. You have to delete the icon cache db as well. In any case killing explorer is already covered by the other answers.
    – DavidPostill
    Nov 27, 2016 at 9:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .