How to change the system default browser?

1

How do I change the system default browser? When opening a link , go to my browser with the link already open?

I've already made him recognize the links when starting the browser:

 Public Overrides Sub OnLoad() Handles Me.Load
      If Not (Command = Nothing)
           If (Url.IsWellFormatedUriString(Command, UriKind.Absolute))
                 WebBrowser1.Navigate(Command)
           End If
      End If
 End Sub

Beauty, and now to open a link as default browser (my browser)?

    
asked by anonymous 20.09.2015 / 00:21

1 answer

1

I'm just going to make an alert. Are you going to trade a browser that thousands of extra competent people have worked for years for something you've done? Make yourself comfortable.

The key is to put the right information in the Windows registry to make "your browser" the default system.

I found a code that might help you in a answer in the OS .

    Registry.ClassesRoot.OpenSubKey(@".htm", true).SetValue("", "FirefoxHTML");
    Registry.ClassesRoot.OpenSubKey(@".html", true).SetValue("", "FirefoxHTML");
    Registry.ClassesRoot.OpenSubKey(@".shtml", true).SetValue("", "FirefoxHTML");
    Registry.ClassesRoot.OpenSubKey(@".xht", true).SetValue("", "FirefoxHTML");
    Registry.ClassesRoot.OpenSubKey(@".xhtml", true).SetValue("", "FirefoxHTML");
    Registry.ClassesRoot.OpenSubKey(@"http\shell\open\command", true).SetValue("", "firefox.exe");
    Registry.ClassesRoot.OpenSubKey(@"https\shell\open\command", true).SetValue("", "firefox.exe");
    Registry.CurrentUser.OpenSubKey(@"Software\Classes\http\shell\open\command", true).SetValue("", "firefox.exe");
    Registry.CurrentUser.OpenSubKey(@"Software\Classes\https\shell\open\command", true).SetValue("", "firefox.exe");
    Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice", true).SetValue("progId", "FirefoxURL");
    Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice", true).SetValue("progId", "FirefoxURL");
    Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\Shell\Associations\UrlAssociations\ftp\UserChoice", true).SetValue("progId", "FirefoxURL");  

Obviously in the example FireFox was used, you should switch to what is most appropriate for "your browser".

Of course the software already needs to be installed (at least copied). It may be that the installer allows you to do this in a simpler way. Refer to your installer's documentation.

    
20.09.2015 / 00:48