What is the current (modern/Windows 10) way to associate file types (like txt, html, php) files with one's app?
What if I want to add an 'Edit with CSS HTML Validator' to the File Explorer context menu for .html files? For example, if you install Notepad++ then it adds 'Edit with Notepad++' to the context menu. How is it doing this? My application is only listed in the 'Open with' submenu, which is good, but what if I also want to add a more direct menu option like 'Edit with CSS HTML Validator'?
But in my registry, here are some of the instances of Notepad++ that I could find:
HKCR\*\shellex\ContextMenuHandlers, includesANotepad++64, which includes(Default)={B298D29A-A6ED-11DE-BA8C-A68E55D89593}. But if I go to that handler
atHKCR\CLSID\{B298D29A-A6ED-11DE-BA8C-A68E55D89593}\InprocServer32, I see(Default)=C:\Program Files (x86)\Notepad++\NppShell_06.dll– so it’s a reference to a DLL, rather than an .exe… maybe you missed that one for conversion from x86 to 64bit.
- also found in
HKLM\SOFTWARE\Classes\*\shellex\ContextMenuHandlers\ANotepad++64andHKLM\SOFTWARE\Classes\CLSID\{B298D29A-A6ED-11DE-BA8C-A68E55D89593}\InprocServer32– I believe if you change the first, the HKLM version will automatically update (or vice versa)- you may have other CLKID associated with it, as well…
- You probably found
HKCR\Applications\notepad++.exeand all it’s subkeys and data/value pairs- I have some instances in
HKCR\Local Settings\Software\Microsoft\Windows\Shell\MuiCache, but they all include thenotepad++.exe, so you probably found them (and MuiCache just lists recently used applications, which shouldn’t affect anything anyway)HKCR\SystemFileAssociations\...hierarchy has some subkeys with notepad++.exe:...\text\,...\txtfileHKCU\Software\Classes\Applications\notepad++.exe\has a hierarchy you’ll want to checkHKCU\Software\Microsoft\Windows\CurrentVersion\ApplicationAssociationToastsmentions withnotepad++.exewith some extensions, as do theHKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.***\OpenWithList, where.***matfches the extensions from the Toasts…
A CLSID is a globally unique identifier that identifies a COM class object. If your server or container allows linking to its embedded objects, you need to register a CLSID for each supported class of objects.