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

ぐ巨炮叔叔 提交于 2019-12-07 07:08:38

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/42426870/how-to-add-my-protocol-into-default-programs-in-windows-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!