How to add my protocol into default programs in windows 10?

spspli picture spspli · Feb 23, 2017 · Viewed 11.3k times · Source

Hi I have a new protocol URL:myTest, how can I add it in windows 10 so I can see it listed in default programs? Shall I add it in registry? How/Where exactly could I do that?

I want to associate a program with this protocol.

Answer

Anders picture Anders · Feb 24, 2017

The registration for "Default Programs" is in the registry under SOFTWARE\RegisteredApplications. If your application fits one of the client types then you should point your RegisteredApplications value to Software\Clients\%ClientType%\%YourCanonicalName%\Capabilities, otherwise you can use any key like Software\%YourCompany%\%YourApp%\Capabilities or Software\Classes\Applications\%Filename%\Capabilities.

The most important subkey in your case is UrlAssociations.

You must also register your protocol in the normal way.

Some of this changed in Windows 10 and I would recommend that you test on Windows 7 or 8 as well. "Default Programs" has been deprecated in Windows 10.

You should also register yourself in the Applications key for integration with the "Open with" dialog.

This is the way it works for pure desktop apps, I'm not sure what happens if you convert a desktop app to UWP. Modern apps declare their protocol in the manifest.