{"id":1192,"date":"2012-10-26T11:33:49","date_gmt":"2012-10-26T06:03:49","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/?p=1192"},"modified":"2021-06-04T11:42:39","modified_gmt":"2021-06-04T06:12:39","slug":"refresh-icon-cache-windows-7-quickly","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/refresh-icon-cache-windows-7-quickly\/","title":{"rendered":"Wrong icon for file type; how to refresh the icons quickly"},"content":{"rendered":"<p><em>Summary: Incorrect icon shown for a file type, desktop shortcut, or taskbar icons in Windows. This article tells you how to fix it.<\/em><\/p>\n<p>Recently I received a query wherein the user has installed Foxit Reader. Later, he set accidentally associated the .zip file type with Foxit Reader via the Open with dialog. They got the association problem straightened out by running the .zip association fix from the <a href=\"https:\/\/www.winhelponline.com\/blog\/file-association-fixes-windows-10\/\">File association fixes<\/a> page.<\/p>\n<p>However, the .zip file type was still showing the Foxit Reader icon, although the association settings were correct.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9836\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/03\/incorrect-icon-shown-file-type.png\" alt=\"incorrect icon shown for a file type in windows\" width=\"701\" height=\"104\" \/><\/p>\n<p>Whenever the file association settings are changed or a new association is created via the registry or script, the system might not be aware of the change. Programs use the <code>SHChangeNotify<\/code> API call specifying the <code>SHCNE_ASSOCCHANGED<\/code> event, in order to refresh the icons without requiring a reboot.<\/p>\n<p>This article explains the different ways to quickly refresh the icons in Windows 7, 8, and 10 without rebuilding the Windows <a href=\"https:\/\/www.winhelponline.com\/blog\/how-to-rebuild-the-icon-cache-in-windows\/\">icon cache<\/a> or restarting Windows.<!--more--><\/p>\n<div id=\"toc\">\n<strong>Refresh shell icons in Windows<\/strong><\/p>\n<ol>\n<li><a href=\"#ie4uinit\">Using IE4UINIT.EXE<\/a><\/li>\n<li><a href=\"#default_apps\">Using Default Apps<\/a><\/li>\n<li><a href=\"#nircmd\">Using NirCmd.exe<\/a><\/li>\n<li><a href=\"#script\">Using VBScript and ASSOC command<\/a><\/li>\n<\/ol>\n<\/div>\n<h2>How to Refresh the Icons<\/h2>\n<p>After a file association change or shortcut icon modification, the icon should refresh immediately or after a restart. If that does not happen, you can force a shell icon refresh by performing a task that triggers the <code>SHChangeNotify<\/code> API.<\/p>\n<p>Follow one of these methods:<\/p>\n<h3><a id=\"ie4uinit\"><\/a>1) Using IE4UINIT<\/h3>\n<p>Using IE4Uinit.exe (Internet Explorer Per-User Initialization Utility), you can quickly refresh the shell icons.<\/p>\n<p>Press <kbd>WinKey<\/kbd> + <kbd>R<\/kbd> to bring up the Run dialog.<\/p>\n<p>Run the following command (for Windows 10) and hit <kbd>Enter:<\/kbd><\/p>\n<pre>ie4uinit.exe -show<\/pre>\n<p>For Windows 8 and earlier, run this command instead:<\/p>\n<pre>ie4uinit.exe -ClearIconCache<\/pre>\n<p>Here is a small video clip to demonstrate this.<\/p>\n<p><iframe loading=\"lazy\" title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/DSDI1MlR3fM\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><br \/>\n<i>(Incorrect .txt file icon, fixed immediately after running the above command.)<\/i><\/p>\n<div class=\"rp\"><strong>RELATED:<\/strong> <a href=\"https:\/\/www.winhelponline.com\/blog\/fix-missing-shell-icons-windows-ui\/\">Missing or Incorrect Icons Showing up in the Windows UI<\/a><\/div>\n<hr \/>\n<h3><a id=\"default_apps\"><\/a>2) Using Default Apps<\/h3>\n<p>You can use Default Apps and change the program defaults for any random program (e.g., Google Chrome or Edge as the default), and revert to the original setting. This is to force the Windows shell to refresh the taskbar icons, desktop shortcut icons, and other icons in the Windows user interface.<\/p>\n<ol>\n<li>Open Settings, Default Apps<\/li>\n<li>Click on the Photo viewer and select a different program from the list<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8813\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2015\/12\/w10-windows-photo-viewer-default-apps.png\" alt=\"windows photo viewer default apps - settings\" width=\"735\" height=\"617\" \/><\/li>\n<li>Again, click on the Photo viewer and select your preferred program this time.<\/li>\n<\/ol>\n<p>This refreshes the shell icons automatically.<\/p>\n<p>In Windows 8 and earlier, use the Default Programs applet.<\/p>\n<ol>\n<li>Click Start \u2192 Default Programs \u2192 Set your default programs<\/li>\n<li>Select your web browser, email client, or any other item in the list.<\/li>\n<li>Click the <strong>Set this program as default<\/strong> button, and click OK.<\/li>\n<\/ol>\n<div class=\"rp\"><strong>RELATED:<\/strong> <a href=\"https:\/\/www.winhelponline.com\/blog\/fix-overlapping-icon-windows-7-vista\/\">Desktop Icons Covered with Black Squares or Generic White Overlay in Windows<\/a><\/div>\n<hr \/>\n<h3><a id=\"nircmd\"><\/a>3) Using NirCmd<\/h3>\n<p>If you&#8217;re using the excellent <a href=\"https:\/\/www.winhelponline.com\/blog\/tag\/nircmd\/\">NirCmd<\/a> console utility (from <code>Nirsoft.net<\/code>), it can be used to refresh the shell icons. It supports two options to refresh the icons.<\/p>\n<ol>\n<li>The &#8220;<code>Nircmd.exe sysrefresh<\/code>&#8221; command initiates a general system refresh. You can use this command to refresh your system after changing your system settings in the Registry (e.g., Changing desktop icons size, environment variables, etc.,)\n<div class=\"newline\"><code>{Refresh Type}<\/code> is optional. You can specify one of the following values: &#8220;<code>environment<\/code>&#8221; &#8211; for refreshing the environment variables, &#8220;<code>policy<\/code>&#8221; &#8211; for policy settings, &#8220;<code>intl<\/code>&#8221; for locale settings.<\/div>\n<p><strong>Examples:<\/strong><\/p>\n<pre>nircmd.exe sysrefresh\u00a0\r\n\r\nnircmd.exe sysrefresh environment\u00a0\r\n\r\nnircmd.exe sysrefresh policy\r\n<\/pre>\n<\/li>\n<li>The &#8220;<code>Nircmd.exe shellrefresh<\/code>&#8221; command initiates a general refresh for Explorer shell (user interface). This command can be useful if you make a change in the registry related to the shell file types (e.g., change file type icons, taskbar icon), and you want that your changes will take effect immediately even without <a href=\"https:\/\/www.winhelponline.com\/blog\/exit-explorer-restart-windows-10-8\/\">restarting the Explorer shell<\/a>.<\/li>\n<\/ol>\n<p>This should fix the incorrect file type icons issue.<\/p>\n<p><i><b>Note:<\/b> If you&#8217;re looking for information on how to completely clean and <strong>rebuild<\/strong> the icon cache, check out this post <a href=\"https:\/\/www.winhelponline.com\/blog\/how-to-rebuild-the-icon-cache-in-windows\/\">How to Rebuild the Icon Cache in Windows<\/a>.<\/i><\/p>\n<hr \/>\n<h3><a id=\"script\"><\/a>4) Using a Script<\/h3>\n<p>You can use the following VBScript to refresh the icons quickly. This script resets the file association settings for <code>.txt<\/code> file type using the ASSOC command. This triggers the <code>SHCNE_ASSOCCHANGED<\/code> event, which instructs the Shell to invalidate the icon and <a href=\"https:\/\/www.winhelponline.com\/blog\/clear-thumbnail-cache-windows\/\">thumbnail cache<\/a>. This causes Windows to refresh the shell icons.<\/p>\n<p><script src='https:\/\/gist.github.com\/ce703f7a536fa819250ced3c839efe10.js'><\/script><br \/>\n<noscript><\/p>\n<pre><code>\r\n'File: refreshicons.vbs\r\n'From Winhelponline.com\r\n'Forces a refresh of the shell icons by resetting .txt file association\r\nIf WScript.Arguments.length = 0 Then\r\n   Set objShell = CreateObject(\"Shell.Application\")\r\n   objShell.ShellExecute \"wscript.exe\", Chr(34) & _\r\n   WScript.ScriptFullName & Chr(34) & \" uac\", \"\", \"runas\", 1\r\nElse   \r\n   Dim WshShell\r\n   Set WshShell = WScript.CreateObject(\"Wscript.Shell\")\r\n   sCmd = \"cmd.exe \/c assoc .txt=textfile\"\r\n   WshShell.Run sCmd,0,True\r\n   sCmd = \"cmd.exe \/c assoc .txt=txtfile\"   \r\nEnd If\r\n<\/code><\/pre>\n<p><\/noscript><\/p>\n<h4>How to Use<\/h4>\n<ol>\n<li>Download the above script or copy the above lines to Notepad and save the file as <code>refreshicons.vbs<\/code><\/li>\n<li>Double-click <code>refreshicons.vbs<\/code> to run it.<\/li>\n<\/ol>\n<p>Alternately, you can run these commands manually (instead of script) from the admin Command Prompt.<\/p>\n<pre>assoc .txt=textfile\r\n\r\nassoc .txt=txtfile<\/pre>\n<p>I hope that helps you refresh the stale\/outdated or incorrect icons in Windows.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Incorrect icon shown for a file type, desktop shortcut, or taskbar icons in Windows. This article tells you how to fix it. Recently I received a query wherein the user has installed Foxit Reader. Later, he set accidentally associated the .zip file type with Foxit Reader via the Open with dialog. They got the &#8230; <a title=\"Wrong icon for file type; how to refresh the icons quickly\" class=\"read-more\" href=\"https:\/\/www.winhelponline.com\/blog\/refresh-icon-cache-windows-7-quickly\/\" aria-label=\"Read more about Wrong icon for file type; how to refresh the icons quickly\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[7],"tags":[335],"class_list":["post-1192","post","type-post","status-publish","format-standard","hentry","category-windows","tag-nircmd"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":309,"url":"https:\/\/www.winhelponline.com\/blog\/enable-or-disable-thumbnail-preview-for-pdf-files\/","url_meta":{"origin":1192,"position":0},"title":"[Fix] PDF Thumbnail and Preview Not Showing Up in File Explorer","author":"Ramesh","date":"May 29, 2008","format":false,"excerpt":"In your Windows computer, File Explorer may not display PDF thumbnails, and instead, show only the default icon assigned for PDF files. This might happen even if you have the option Always show icons, never thumbnails unchecked in the View tab of the Folder Options dialog. Also, in Microsoft Outlook\u2026","rel":"","context":"In &quot;Microsoft Edge&quot;","block_context":{"text":"Microsoft Edge","link":"https:\/\/www.winhelponline.com\/blog\/category\/edge\/"},"img":{"alt_text":"Edge PDF Preview Handler - Microsoft PDF Previewer","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/05\/edge-preview-handler.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/05\/edge-preview-handler.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/05\/edge-preview-handler.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/05\/edge-preview-handler.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":26798,"url":"https:\/\/www.winhelponline.com\/blog\/repair-jar-file-association-windows\/","url_meta":{"origin":1192,"position":1},"title":"How to Fix .JAR (Executable Jar File) File Association in Windows","author":"Ramesh","date":"July 1, 2022","format":false,"excerpt":"Jar (Java ARchive) or \"executable Jar file\" is executed by Java Runtime Environment (javaw.exe) program. On Windows, the Java Runtime Environment's setup will register a default association for Jar files so that double-clicking a Jar file on the desktop will automatically run it with \"javaw.exe -jar\" command-line argument. A third-party\u2026","rel":"","context":"In &quot;Utilities&quot;","block_context":{"text":"Utilities","link":"https:\/\/www.winhelponline.com\/blog\/category\/utilities\/"},"img":{"alt_text":"repair .jar file association settings using ftype and assoc commands","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/07\/jar-asso-fix-commands.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/07\/jar-asso-fix-commands.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/07\/jar-asso-fix-commands.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/07\/jar-asso-fix-commands.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":1538,"url":"https:\/\/www.winhelponline.com\/blog\/restore-missing-compressed-zipped-folder-option-to-the-send-to-menu\/","url_meta":{"origin":1192,"position":2},"title":"Fix: &#8220;Compressed (zipped) Folder&#8221; Missing in Send To Menu","author":"Ramesh","date":"February 26, 2006","format":false,"excerpt":"This article tells you how to restore the missing \"Compressed (Zipped) Folder\" item to your \"Send to\" menu in all versions of Windows, including Windows 10 and 11. Cause If the Compressed (Zipped) folder doesn't appear in the Send To menu, it can be due to one of the reasons:\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"zip missing sendto menu","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2006\/02\/zip-sendto-fix-cmd.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2006\/02\/zip-sendto-fix-cmd.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2006\/02\/zip-sendto-fix-cmd.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":9810,"url":"https:\/\/www.winhelponline.com\/blog\/word-docx-doc-files-show-generic-white-icon\/","url_meta":{"origin":1192,"position":3},"title":".Docx\/Doc Files Not Showing Word Icon but Only White Plain Icon","author":"Ramesh","date":"June 16, 2019","format":false,"excerpt":"Many users have reported that the Word icons are not showing up for .docx and .doc files on their systems. Instead, they show up with a generic (unknown) or plain white icon even though the files open in Word when double-clicked (i.e., the file association settings are intact.) Cause Blank\u2026","rel":"","context":"In &quot;Office&quot;","block_context":{"text":"Office","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/office\/"},"img":{"alt_text":"word .docx and .doc files show generic white icon - repair office","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/06\/office-repair.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":4939,"url":"https:\/\/www.winhelponline.com\/blog\/extract-missing-zip-files-right-click-menu-fix\/","url_meta":{"origin":1192,"position":4},"title":"Restore Missing &#8220;Extract All&#8221; Option to Zip Right-Click Menu","author":"Ramesh","date":"December 24, 2016","format":false,"excerpt":"When you right-click on a .zip file (Compressed Folder) and click \"Extract All\", it extracts the contents of the .zip file to a folder, and automatically opens the folder. Extract All option may be missing because of incorrect .zip file association setting, especially after installing and uninstalling a 3rd party\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"restore extract all to the right-click menu for .zip files","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/12\/w10-zip-selection-asso.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/12\/w10-zip-selection-asso.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/12\/w10-zip-selection-asso.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":1282,"url":"https:\/\/www.winhelponline.com\/blog\/file-asso-fixes-for-windows-8\/","url_meta":{"origin":1192,"position":5},"title":"File Association Fixes for Windows 8","author":"Ramesh","date":"December 3, 2013","format":false,"excerpt":"Some file association settings got mangled in your system? This page contains the default file association settings (.reg files) for some common file types. These fixes are applicable for Windows\u00ae 8 systems only. AVI BAT BMP COM EXE GIF HTM\/HTML ICO JPE\/JPEG\/JPG JS LNK MP3 MPE\/MPEG\/MPG MSC PNG REG SCR\u2026","rel":"","context":"In &quot;Windows 8&quot;","block_context":{"text":"Windows 8","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-8\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/1192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/comments?post=1192"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/1192\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=1192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=1192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=1192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}