Windows RegKey - Default Browser Application Path

后端 未结 4 1322
失恋的感觉
失恋的感觉 2021-01-18 03:13

What RegKey can you get the default browser application\'s path from?

Best way to get to it from C#/.NET?

4条回答
  •  生来不讨喜
    2021-01-18 04:08

    for windows 7 default browser path save in following registry key

     HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\ Associations\UrlAssociations\http
    

    by using c# you can get it as follows -

    RegistryKey regkey = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\shell\\Associations\\UrlAssociations\\http\\UserChoice", false);
    
    string browser = regkey.GetValue("Progid").ToString();
    

提交回复
热议问题