At least on Windows 7, you can create a custom protocol as long as you add a URL Protocol
value of type REG_SZ
to the key. It doesn't need an actual value, just needs to be present. Here's a simple example of an "Echo Protocol" I just created which works in explorer.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTecho]
"URL Protocol"=""
@="Echo Protocol"
[HKEY_CLASSES_ROOTechoshell]
[HKEY_CLASSES_ROOTechoshellopen]
[HKEY_CLASSES_ROOTechoshellopencommand]
@="C:\WINDOWS\SYSTEM32\CMD.EXE /Q /C (echo %1) && pause"
I've found it will also work in the keys HKCUSoftwareClasses
and HKLMSoftwareClasses
too. It isn't listed in the Control PanelProgramsDefault ProgramsSet Associations
list however. Other keys might need to be updated or it would have to be registered with Windows somehow.
I imagine it is the same or similar in older versions of Windows XP and up.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…