5

My XML files are showing the unknown programs icon.

Why can't I change the icon? I looked it up in the registry, but I found no error. Look at the following:

Windows Registry Editor Version 5.00 

[HKEY_CLASSES_ROOT\.xml] 
@="xmlfile" 
"Content Type"="text/xml" 
"PerceivedType"="text" 

[HKEY_CLASSES_ROOT\.xml\PersistentHandler] 
@="{7E9D8D44-6926-426F-AA2B-217A819A5CCE}" 

Windows Registry Editor Version 5.00 

[HKEY_CLASSES_ROOT\xmlfile] 
@="@C:\\Windows\\System32\\msxml3r.dll,-1" 
"EditFlags"=hex:00,00,00,00 
"FriendlyTypeName"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,\ 
  00,6f,00,6f,00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,\ 
  32,00,5c,00,6d,00,73,00,78,00,6d,00,6c,00,33,00,72,00,2e,00,64,00,6c,00,6c,\ 
  00,2c,00,2d,00,31,00,00,00 

[HKEY_CLASSES_ROOT\xmlfile\BrowseInPlace] 

[HKEY_CLASSES_ROOT\xmlfile\CLSID] 
@="{48123BC4-99D9-11D1-A6B3-00C04FD91555}" 

[HKEY_CLASSES_ROOT\xmlfile\DefaultIcon] 
@="C:\\Windows\\System32\\msxml3.dll,0" 

[HKEY_CLASSES_ROOT\xmlfile\shell] 
@="open" 

[HKEY_CLASSES_ROOT\xmlfile\shell\edit] 

[HKEY_CLASSES_ROOT\xmlfile\shell\edit\command] 
@="\"C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE11\\MSOXMLED.EXE\" /verb edit \"%1\"" 

[HKEY_CLASSES_ROOT\xmlfile\shell\Open] 

[HKEY_CLASSES_ROOT\xmlfile\shell\Open\Command] 
@="\"C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE11\\MSOXMLED.EXE\" /verb open \"%1\"" 

[HKEY_CLASSES_ROOT\xmlfile\shell\Open\ddeexec] 
@="" 

[HKEY_CLASSES_ROOT\xmlfile\ShellEx] 

[HKEY_CLASSES_ROOT\xmlfile\ShellEx\IconHandler] 
@="{AB968F1E-E20B-403A-9EB8-72EB0EB6797E}" 

Can you find something wrong? Or can you paste your registry values?

I need default registry values about xml which is with the default associated exe.

1
  • We could also call this question Why did my XML icon go blank? (This would have helped in my searching.)
    – palswim
    May 10, 2012 at 22:00

4 Answers 4

4

Yes this time it has nothing to do with the icon cache. As this post correctly pointed out to me: http://www.sevenforums.com/microsoft-office/152972-no-icon-xml-files.html#post1315413

the problem is due to the IconHandler, apparently installed by some Office suite version. So it's enough to remove the IconHandler sub-key from xmlfile key, and leave a reasonable predefined string value in DefaultIcon key (like the one you already have).

2
  • of course backup your IconHandler key before deleting ;)
    – superjos
    Apr 17, 2011 at 7:53
  • After hours of searching and trying multiple tools to track changes in registry I saw this post and fixed the issue in seconds. Computer crashed while uninstalling office and corrupted several file associations. So Thanks again.
    – trenten
    Jul 10, 2019 at 20:35
2

Office uses a 32-bit Icon Handler, which breaks the XML icon on 64-bit systems.

To stop Office from trying to serve your icons for XML files, you can use this registry script:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\xmlfile\DefaultIcon]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,73,00,\
  78,00,6d,00,6c,00,33,00,2e,00,64,00,6c,00,6c,00,2c,00,30,00,00,00

[-HKEY_CLASSES_ROOT\xmlfile\ShellEx\IconHandler]

This sets the DefaultIcon key's default value to %SystemRoot%\System32\msxml3.dll,0 and removes the IconHandler key.

Before using this registry script, ensure you want that default key (I think Windows Vista/7/8 use that value by default), and optionally back up your IconHandler key.

2
  • 2
    This provides much the same data as a previous answer, but my system had "%1" in the DefaultIcon key, so I wanted to provide a quick and complete answer for those in my situation.
    – palswim
    Mar 9, 2015 at 22:49
  • This did not work for me
    – Adsy2010
    Oct 2, 2017 at 10:14
1

It should display the right icon, but you can try to rebuild the icon cache. A simple way is to delete the file IconCache.db witch is found in your user path under Local (in Win XP) or \AppData\Local (Vista/7). (you can restart after you delete this file)

1
  • um!thanx ,but i meet some problems like this! it has nothing to do with iconcache!hehe!
    – user37255
    May 17, 2010 at 14:12
0

I had the same problem and for me it worked to simply delete the registry key HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.xml.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.