如何设置使用C#Windows 8的默认浏览器? [英] How to set default browser in windows 8 using C#?

查看:185
本文介绍了如何设置使用C#Windows 8的默认浏览器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一直以来我们都能够轻松地做到这一点之前的Windows 8(在XP / VISTA / WIN7)在注册一些变化,它已完成。

We all have been easily able to do this prior to Windows 8 (in XP/VISTA/WIN7) with few changes in Registry and it was done.

随着Windows 8就不是那么容易(我还没有弄明白如何)。窗8也必须改变下面提及少数注册表设置,但与此一起还存储用于每一个计算机的唯一哈希。任何机构可以帮助我可能创造这个哈希为每台计算机或微软提供的设置默认浏览器的一些API('SetAppAsDefaultAll'不工作)。下面是注册表项。

With Windows 8 it's not that easy (I'm yet to figure it out how). Windows 8 too has few registry settings to be changed mentioned below, but along with this it also stores a unique Hash for every computer. Can any body help me to possibly create this hash for every computer or with some API provided by Microsoft to set default browser ('SetAppAsDefaultAll' does not work). Following are the registry entries.

Computer\\HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts.htm\\UserChoice
  进程id:IE.AssocFile.HTM哈希:XXXXXXXXXXX

Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.htm\UserChoice Progid : IE.AssocFile.HTM Hash : XXXXXXXXXXX

Computer\\HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts.html\\UserChoice
  进程id:IE.AssocFile.HTM哈希:XXXXXXXXXXX

Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.html\UserChoice Progid : IE.AssocFile.HTM Hash : XXXXXXXXXXX

Computer\\HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts.xht\\UserChoice
  进程id:IE.AssocFile.XHT哈希:XXXXXXXXXXX

Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.xht\UserChoice Progid : IE.AssocFile.XHT Hash : XXXXXXXXXXX

Computer\\HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts.xhtml\\UserChoice
  进程id:IE.AssocFile.XHT哈希:

Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.xhtml\UserChoice Progid : IE.AssocFile.XHT Hash :

Computer\\HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\ftp\\UserChoice
  进程id:IE.FTP哈希:XXXXXXXXXXX

Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\ftp\UserChoice Progid : IE.FTP Hash : XXXXXXXXXXX

Computer\\HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice
  进程id:IE.HTTP哈希:XXXXXXXXXXX

Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice Progid : IE.HTTP Hash : XXXXXXXXXXX

Computer\\HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\https\\UserChoice
  进程id:IE.HTTPS哈希:XXXXXXXXXXX

Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice Progid : IE.HTTPS Hash : XXXXXXXXXXX

提前非常感谢。

推荐答案

有关所有这些等待这个问题的答案。

For all those waiting for answer to this question.

在这里你去,貌似要做到这一点是通过赢8.您的用户提供的DISM.exe应该是本机的管理员虽然方式之一。

Here you go, looks like that one of the way to do it is through DISM.exe provided by Win 8. Your user should be admin of the machine though.

使用C#code,你应该能够使用特定参数运行此DISM.exe。

Using C# code you should be able to run this DISM.exe with specific parameters.

继博客有详细信息。

<一个href=\"http://blogs.technet.com/b/mrmlcgn/archive/2013/02/26/windows-8-associate-a-file-type-or-protocol-with-a-specific-app-using-a-gpo-e-g-default-mail-client-for-mailto-protocol.aspx\">http://blogs.technet.com/b/mrmlcgn/archive/2013/02/26/windows-8-associate-a-file-type-or-protocol-with-a-specific-app-using-a-gpo-e-g-default-mail-client-for-mailto-protocol.aspx

感谢。

这篇关于如何设置使用C#Windows 8的默认浏览器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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