Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Xml file edit context menu error

08 Nov 2014   #1
zdzdz

Windows 7 Ultimate 64bit
 
 
Xml file edit context menu error

Hello,
My PC has Windows 7 Ultimate x64

Here is my problem:

I want to edit an xml file by right clicking on it and choosing "Edit" from the context menu.



What I expect is Notepad to open the xml file. But in fact there is an error:

This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel.



The Default Program chosen to open and edit xml files is MS XML Editor. As I want it to be.

Here is my registry:

HKCR\.xml
Code:
Windows Registry Editor Version 5.00

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

[HKEY_CLASSES_ROOT\.xml\OpenWithList]

[HKEY_CLASSES_ROOT\.xml\OpenWithList\vsta.exe]
@=""

[HKEY_CLASSES_ROOT\.xml\OpenWithList\winword.exe]
@=""

[HKEY_CLASSES_ROOT\.xml\OpenWithProgids]
"InfoPath.Document.3"=""
"VSTA.xml.8.0"=""
"XamarinStudio.5.1.4.0"=""

[HKEY_CLASSES_ROOT\.xml\PersistentHandler]
@="{7E9D8D44-6926-426F-AA2B-217A819A5CCE}"
HKCR\xmlfile
Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\xmlfile]
@="XML Document"
"EditFlags"=hex:00,00,01,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]
@=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\shell]
@="open"

[HKEY_CLASSES_ROOT\xmlfile\shell\edit]

[HKEY_CLASSES_ROOT\xmlfile\shell\edit\command]
@="\"C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE14\\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\\OFFICE14\\MSOXMLED.EXE\" /verb open \"%1\""

[HKEY_CLASSES_ROOT\xmlfile\shell\Open\ddeexec]
@="\"file:%1\",,-1,,,,,"

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

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

[HKEY_CLASSES_ROOT\xmlfile\ShellEx]

[HKEY_CLASSES_ROOT\xmlfile\ShellEx\IconHandler]
@="{AB968F1E-E20B-403A-9EB8-72EB0EB6797E}"
Open and Edit menues are as I want them:
Code:
[HKEY_CLASSES_ROOT\xmlfile\shell\edit\command]
@="\"C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE14\\MSOXMLED.EXE\" /verb edit \"%1\""

[HKEY_CLASSES_ROOT\xmlfile\shell\Open\command]
@="\"C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE14\\MSOXMLED.EXE\" /verb open \"%1\""
I want MSOXMLED.exe to check the xml file for specific headers and if any to open them with the specified program. And likewise if there are no headers to use the default programs.

It looks like if there are no headers (<?mso-application progid="something"?>) MSOXMLED.exe chooses the default program from XEV.GenericApp:

Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\XEV.GenericApp]
"EditFlags"=hex:01,00,00,00

[HKEY_CLASSES_ROOT\XEV.GenericApp\DefaultIcon]
@="C:\\Windows\\SysWow64\\msxml3.dll,0"

[HKEY_CLASSES_ROOT\XEV.GenericApp\shell]

[HKEY_CLASSES_ROOT\XEV.GenericApp\shell\open]

[HKEY_CLASSES_ROOT\XEV.GenericApp\shell\open\command]
@="\"C:\\Program Files (x86)\\Internet Explorer\\IEXPLORE.EXE\" -nohome"

[HKEY_CLASSES_ROOT\XEV.GenericApp\shell\open\ddeexec]
@="\"file:%1\",,-1,,,,,"

[HKEY_CLASSES_ROOT\XEV.GenericApp\shell\open\ddeexec\application]
@="IExplore"

[HKEY_CLASSES_ROOT\XEV.GenericApp\shell\open\ddeexec\topic]
@="WWW_OpenURL"
This works when I choose Open from the context menu.
MSOXMLED.exe /verb open leads to XEV.GenericApp's Open command and the xml file is being opened with IE as specified.

But when I choose Edit from the context menu, there is an error for file association.

I have another PC with Win7 Ultimate x64. When click Edit from the context menu the xml file is opened with Notepad as I wish. No errors. I checked these registry keys there and the were the same as mine.

I found a workaround. If I create a key named Edit with command ["C:\Windows\Notepad.exe" "%1"] under XEV.GenericApp, then everything works as I want it. Because the command under xmlfile\shell\edit is:
...MSOXMLED.exe /verb edit
Code:
[HKEY_CLASSES_ROOT\XEV.GenericApp\shell\edit]

[HKEY_CLASSES_ROOT\XEV.GenericApp\shell\edit\command]
@="\"C:\\Windows\\NOTEPAD.EXE\" \"%1\""
But the problem is I don't want such a workaround.
I want to know why it's not working on my PC but on another it is finctioning just fine.

Perhaps there are other registry keys for default opening of xml files? Can somebody help me?


My System SpecsSystem Spec
.
09 Nov 2014   #2
A Guy

Microsoft Community Contributor Award Recipient

Windows 7 Home Premium x64 SP1
 
 

Welcome to Seven Forums zdzdz. I would try the xml reg file in this tutorial

Default File Type Associations - Restore

See if that helps. A Guy
My System SpecsSystem Spec
09 Nov 2014   #3
zdzdz

Windows 7 Ultimate 64bit
 
 

I tried that. It doesn't help. These default keys are basicaly the same as mine.

Edit options results in error only when MS XML Editor is chosen as default opening program for xml files. When I choose other default program like IE, Notepad, Wordpad, etc. then EDIT menu opens notepad. Strange.
My System SpecsSystem Spec
.

09 Nov 2014   #4
zdzdz

Windows 7 Ultimate 64bit
 
 

Miraculously everything turned out well. I don't know how but suddenly the Edit option in the context menu works like charm. The default program is MS XML Editor. XML opens with IE and it's edited with Notepad.

I don't know how this happened. I just started to choose different default programs one by one. And suddenly Edit works. Windows registry is big mystery for me.
My System SpecsSystem Spec
09 Nov 2014   #5
A Guy

Microsoft Community Contributor Award Recipient

Windows 7 Home Premium x64 SP1
 
 

Lol, sometimes you just have to kick it Glad you got it working

A Guy
My System SpecsSystem Spec
11 Feb 2015   #6
nixxon108

Windows 7 Ultimate x64
 
 

I noticed similar issue recently and cured it with a repair install of Microsoft Office 2007 Pro.

Repair found corrupt registry entries.

XML files now go to Notepad when EDIT button is Right-Clicked.
My System SpecsSystem Spec
Reply

 Xml file edit context menu error




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
NEW Context Menu - Edit for Desktop
How to Edit the Desktop "NEW" Context Menu in Windows 7 This tutorial shows you how to do this BEFORE AFTER
Tutorials
Cannot edit txt files using windows 7 context menu .. .
I get a: "This file does not have a program associated with it for performing this action" whenever i select Edit in windows 7's context menu .. . associating txt files to my notepad "ted notepad" placed in system32 doesn't help .. . & this editing option for txt files is used before...
General Discussion
Is there a way to edit the context menu without additional software?
Windws 7 Pro SP1 with IE v8. I recently had to install Windows Live and 3 new entries were added to the context menu in Internet Explorer. 1) Blog with Windows Live 2) Email with Windows Live 3) Translate with Bing I want them gone. I've looked through the usual registry keys like:
Browsers & Mail
Can I edit the Context Menu?
Hello! I have a little question for you guys here. I am wondering if it's possible to edit the Context Menu in Windows 7 (when you right click on a file or folder)? I want to delete "Play with vlc" and "scan with bla bla" etc. Simpleness is the key to success! I also want to delete or disable...
Customization
Edit folder context menu?
http://wimg.co.uk/z5Z.jpg Can it be done? I haven't had much luck with ShellExView I don't want to uninstall WMP since I use it for it's Play-To feature.
Customization
Can't fully edit context menu
Been able to zap some items from the New context menu, but a few still remain. I've read the tutorials here, searched the registry, I've got ShellExView, ShellMenuView and Glary Pro. They've helped, but not the 7 things below the red bar here, which is what I want to eliminate: ...
Customization


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 05:27.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App