如何将我的协议添加到 Windows 10 的默认程序中? [英] How to add my protocol into default programs in windows 10?

查看:84
本文介绍了如何将我的协议添加到 Windows 10 的默认程序中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个新协议 URL:myTest,我如何将它添加到 Windows 10 中以便我可以看到它在默认程序中列出?我要在注册表中添加它吗?我究竟如何/在哪里可以做到这一点?

我想将一个程序与此协议相关联.

解决方案

默认程序"的注册位于 SOFTWARE\RegisteredApplications.如果您的应用程序符合 client types 那么你应该将你的 RegisteredApplications 值指向 Software\Clients\%ClientType%\%YourCanonicalName%\Capabilities,否则你可以使用任何键,如 Software\%YourCompany%\%YourApp%\CapabilitiesSoftware\Classes\Applications\%Filename%\Capabilities.

您的案例中最重要的子项是 UrlAssociations.

您还必须在 正常情况下注册您的协议方式.

其中一些在 Windows 10 中发生了变化,我建议您也在 Windows 7 或 8 上进行测试.Windows 10 中已弃用默认程序".

您还应该在 应用程序键,用于与打开方式"对话框集成.

这是纯桌面应用程序的工作方式,我不确定如果您将桌面应用程序转换为 UWP 会发生什么.现代应用在清单中声明其协议.>

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.

解决方案

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.

这篇关于如何将我的协议添加到 Windows 10 的默认程序中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆