How do I set the Windows default browser, for a custom application, like foobar.exe?

6

2

I have a custom application that I'd like to use in order to handle default browser requests; how do I configure Windows to use my application instead of the current default browser?

Nick Bolton

Posted 2010-04-13T23:36:57.080

Reputation: 2 941

Answers

3

I'm also rather interested in knowing the answer to this. I've been looking for an app or some script that I can stick in as the 'default browser' that intercepts links and then prompts me what to do (open with browser A, B, or C, run custom app, etc). That would be so awesome.

According to this article, http://support.microsoft.com/kb/224816

When you select Make this the default browser in Internet Explorer and in later versions of Netscape, the browser registers itself into all of the following keys to make itself the default browser (among other entries that are written).
HKEY_CLASSES_ROOT.htm HKEY_CLASSES_ROOT.html HKEY_CLASSES_ROOT\http\shell\open\command HKEY_CLASSES_ROOT\http\shell\open\ddeexec\Application HKEY_CLASSES_ROOT\ftp\shell\open\command HKEY_CLASSES_ROOT\ftp\shell\open\ddeexec\Application HKEY_CLASSES_ROOT\gopher\shell\open\command HKEY_CLASSES_ROOT\gopher\shell\open\ddeexec\Application

EDIT

I have since found this awesome tool for windows: http://browserchooser.codeplex.com/

Anthony Hatzopoulos

Posted 2010-04-13T23:36:57.080

Reputation: 244

Hah, turns out I accidentally wrote a clone of Browser Chooser, though mine wasn't nearly as good. https://github.com/nbolton/chweb

– Nick Bolton – 2015-05-03T02:02:20.877

1

Looks like this is what I needed: http://msdn.microsoft.com/en-us/library/dd203067(VS.85).aspx

Update: I hacked together a quick registry script for this: http://pastebin.com/KPYyGcaV

Nick Bolton

Posted 2010-04-13T23:36:57.080

Reputation: 2 941

Hmm, actually no. I was close; but this is just for the start menu. What I need is the system-wide default browser. – Nick Bolton – 2010-04-13T23:49:26.553

You forgot to define FoobarHTML under HKEY_CLASSES_ROOT. – lilydjwg – 2018-01-09T11:47:04.517

Any chance you have (or have found) a Windows 10 version of this reg script? I have a browser that isn't showing up in the default programs list but so far can't get your script working in Windows 10 (keeps reverting back to Edge) – Chris Emerson – 2019-05-15T09:48:36.680

1

Hugh Allen

Posted 2010-04-13T23:36:57.080

Reputation: 8 620