Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在Vista/Win7上设置默认浏览器_C#_.net_Browser - Fatal编程技术网

C# 在Vista/Win7上设置默认浏览器

C# 在Vista/Win7上设置默认浏览器,c#,.net,browser,C#,.net,Browser,我想将一个程序设置为“默认浏览器”,例如,当地址为http://google.com/被其他程序或窗口打开。 起初我认为这与XP相同(通过HKCR),但我发现您需要使用Vista[+]的“默认程序”功能。我认为,相关的密钥存储在HKEY\U CURRENT\U USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice,但对我来说,这只是“FirefoxURL”,我假设它映射到其他地方的某个

我想将一个程序设置为“默认浏览器”,例如,当地址为
http://google.com/
被其他程序或窗口打开。 起初我认为这与XP相同(通过
HKCR
),但我发现您需要使用Vista[+]的“默认程序”功能。我认为,相关的密钥存储在
HKEY\U CURRENT\U USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice
,但对我来说,这只是“FirefoxURL”,我假设它映射到其他地方的某个较大的密钥。

如何正确地做到这一点

我还发现,您可以使用
iaapplicationassociationregistration
,但它周围没有任何.NET包装,我一辈子也找不到如何使用它


非常感谢您提供有关其他程序如何执行此操作的任何信息或仅是正确方向的提示。

您基本上处于正确的位置:

  • HKEY\U CURRENT\U USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations
“明白了”是指需要设置一组子键: