I have made a program to handle http links. How do I set the default browser to my exe? I only need to change the http protocol, not file associations. I have already setup command line argument handling. I do not want to use a .reg file since it asks the user about adding keys.
How to set the default browser to my application?
3k views Asked by msbg At
3
There are 3 answers
0
On
@TomTom Sorry, I don't have enough rep to comment. ;)
Just because Firefox and a couple of other browsers are popular does not mean that it is somehow "special" in that it can ask you if you want to change the setting. There is NO reason why a custom-made application cannot do the same.
@msbg, since you commented there, you likely already found your answer at how do i change default browser using c# or batch file
There's another answer at How to find all the browsers installed on a machine which refers to http://msdn.microsoft.com/en-us/library/dd203067%28VS.85%29.aspx
You could run regedit in silent mode ("/S").
Or run cmd script:
(for registered http handler - overwrite an existing empty parameter in a "\shell\open\command" key).
Update Also you can experiment with default browser (HKEY_CURRENT_USER\SOFTWARE\Clients\StartMenuInternet) as per MSDN article. But you'd also handle local files as well.