[wpkg-users] Make Firefox the default browser?

Jean-Jacques Moulis jj at isy.liu.se
Tue May 2 08:38:00 CEST 2006

On Mon, 01 May 2006 16:40:21 -0400 Matt Miller <mmiller at solutionsforprogress.com> wrote:

MM> I'm having a lot of trouble with this...
MM> Google got me a script that almost works, but I think there are more 
MM> registry keys to make Firefox the default browser. When you run Firefox 
MM> it still thinks it's not the default browser, non-admin level users 
MM> can't set it as default, and there a few html files that still want to 
MM> open in Notepad when double clicked.
MM> Anyone want to help with this?

After installing Firefox with:

"%WpkgRoot%\Packages\Firefox\Firefox Setup" -ms



copy %Wpkgroot%\Files\nsBrowserContentHandler.js "%ProgramFiles%\Mozilla Firefox\components"
"%ProgramFiles%\Mozilla Firefox\firefox.exe" -CreateProfile default
"%ProgramFiles%\Mozilla Firefox\firefox.exe" -setDefaultBrowser -silent


Add lines 330 331 in the original nsBrowserContentHandler.js

326:	    if (cmdLine.handleFlag("preferences", false)) {
327:	      openPreferences();
328:	      cmdLine.preventDefault = true;
329:	    }
330:		if (cmdLine.handleFlag("silent", false))
331:		cmdLine.preventDefault = true;
332:	  },
334:	  helpInfo : "  -browser            Open a browser window.\n",

diff nsBrowserContentHandler.js nsBrowserContentHandler.js.orig
<       if (cmdLine.handleFlag("silent", false))
<       cmdLine.preventDefault = true;

The modification of nsBrowserContentHandler.js restore the -silent flag that have been removed.
As I understand it it will be back "out of the box" in
This solution works at least with

credits to Dié in this message:


wpkg-users mailing list
wpkg-users at lists.wpkg.org

More information about the wpkg-users mailing list