windows 如何将自定义协议添加到 Vista“设置关联”列表?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/186723/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to add custom protocol to Vista "Set Associations" list?
提问by
I've registered custom protocol "xyz" on Windows Vista:
我已经在 Windows Vista 上注册了自定义协议“xyz”:
HKEY\_CLASSES\_ROOT\xyz = "URL:Extensions Protocol"
It works OK with my application.
它适用于我的应用程序。
Open "Control Panel -> Programs -> Default Programs -> Set Associations", scroll the list to the end. Here is the list of protocols. I would like to see my custom protocol associated with my application.
打开“控制面板 -> 程序 -> 默认程序 -> 设置关联”,将列表滚动到最后。这是协议列表。我想查看与我的应用程序关联的自定义协议。
回答by Adrian
If you can't find the extension you are looking for in the Set Associations
, then first open Command
prompt and type
如果在 中找不到您要查找的扩展名Set Associations
,请先打开Command
提示并键入
assoc .abc=
where .abcis the extension you want to associate. This will add the extension (in this example .abc) to the list of extensions in Set Associations. Then choose the program you want to use for opening files of that type in Set Associations. I haven't tested myself if this works for protocols as well but I don't see any reasons why it wouldn't.
其中.abc是您要关联的扩展名。这会将扩展名(在本例中为 .abc)添加到设置关联中的扩展名列表中。然后在“设置关联”中选择要用于打开该类型文件的程序。我还没有测试自己是否也适用于协议,但我没有看到任何原因。