Generally I prefer to use Notepad++ to edit xml files, but when right-clicking on one in Windows and just selecting Edit, I still prefer for it go to Notepad anyway, which is the usual on Windows machines. But recently my Windows 7 machine has started trying to edit it with Word instead, and there doesn't seem to be an option to really make it go back to Notepad.
This is not the same as choosing the default program. When you double-click on it in Windows, on most machines, it will open up in IE or Edge. If you right-click and select Edit, it'll go to Notepad. These are two different settings.
On my machine the default program is showing as Microsoft Application Virtualization Virtual Process Launcher, which makes sense, and it is still opening it in IE upon doube-clicking. However switching it to Notepad causes it to open in Notepad when double-clicking as well as when selecting Edit. When going to HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\xml in regedit, the two values are as follows:
(Default) (value not set)
PerceivedType document
So how do you change just the Edit option to point to Notepad, without changing the double-click option?
EDIT - Consolidating information about the duplicated question, Notepad vs. Notepad++, and a few different file formats:
This was somewhat of a duplicate of How to make notepad++ the default editor for a Windows batch file?, as mentioned in the comments. That being said, to go from Notepad to Notepad++ for batch files, the answer there suggests making the following change in the registry HKEY_CLASSES_ROOT\batfile\shell\edit\command:
old value: %SystemRoot%\System32\NOTEPAD.EXE %1
new value: "C:\Program Files (x86)\Notepad++\notepad++.exe" %1
To use Notepad with xml files, this value worked on my machine in the registry HKEY_CLASSES_ROOT\xmlfile\shell\edit\command:
C:\Windows\System32\notepad.exe %1
(Using either %SystemRoot% or %windir% seemed to have a little trouble working on my machine.)
For text files, there did not appear to be anything called edit under HKEY_CLASSES_ROOT\textfile\shell.