Answered browser type using C#

  • Wednesday, December 23, 2009 5:38 AM
     
     

    I want to find the browser type in C# Windows Applcaition. Please help.
    Thanks.

Answers

All Replies

  • Wednesday, December 23, 2009 7:41 AM
     
     

    and what do you mean by "browser type" ? Atleast your expected set of output from this c# program. [IE/Firefox/Opera/Safari.. is that what you want ?]
    Thanks

    My BlogMy Facebook
  • Wednesday, December 23, 2009 8:27 AM
     
     
    yes Omie,
    i need to know whether user has IE / Firefox / opera /safari...
    i am writting an windows applciation , not asp.net .
  • Thursday, December 24, 2009 8:26 AM
    Moderator
     
     Answered

    Hi, Coder_Cool:

      Maybe you could refer to the following 3 registry entries to get the default brower setting info.

      “HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\ Associations\UrlAssociations\[ftp|http|https]\UserChoice“

      On my box, I installed IE8, Chorme and Firefox side by side. And when I change my default browser type, the default key value of the  above 3 registry entries changes accordingly, respectively they are:

      IE8: IE.FTP/IE.HTTP/IE.HTTPS
      Chrome: ChromeHTML/ChromeHTML/ChromeHTML
      Firefox: FirefoxURL/FirefoxURL/FirefoxURL

      For a detailed narration, refer to this article.

      About how to manipulate registry in C#, here are some refs:

      1. Registry In's and Out's Using C#
        http://www.developerfusion.com/article/4640/registry-ins-and-outs-using-c/2/
      2. Registry Class
        http://msdn.microsoft.com/en-us/library/microsoft.win32.registry(VS.71).aspx

    Sam
    Thanks.

     

  • Wednesday, January 13, 2010 10:06 AM
     
     
    Hi ,
    thanks for helping to get the browsers installed int he machine,
    Is it possible to get the version of the browers installed in the machine?
    Please help