Last Comment Bug 454328 - firefox.exe -setDefaultBrowser does not work
: firefox.exe -setDefaultBrowser does not work
Product: Firefox
Classification: Client Software
Component: General (show other bugs)
: 3.6 Branch
: x86 Windows XP
-- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: 512103 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2008-09-08 19:02 PDT by JJ Bae
Modified: 2012-06-20 11:46 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description User image JJ Bae 2008-09-08 19:02:55 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/2008090820 Minefield/3.0.1 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/2008090820 Minefield/3.0.1 (.NET CLR 3.5.30729)

Hi, I'm trying to set Fx3 the default browser by using
"firefox.exe -silent -setDefaultBrowser" on command line.

Actually it works when I logged in as Administrator.
But usually I log in XP as a user having authority of admin.
It does not work. There are same from Fx1.0 to Fx3.0 if I logged in as the user having admin authority.

It could be fixed by modifying C:\Program Files\Mozilla Firefox\components\nsSetDefaultBrowser.js.
line 63:       shell.setDefaultBrowser(true, true);
              ->shell.setDefaultBrowser(true, false);

There is same appearance on Windows Vista.

Reproducible: Always

Steps to Reproduce:
1. log in XP as a user having admin authority.
2. Window + R or start -> command line
3. Input "firefox.exe -silent -setDefaultBrowser"
4. run
Actual Results:  
The browser icon of Start Menu is changed to Fx.
But a registry key of HKEY_CLASSES_ROOT\http\shell\open\command is not changed to Fx.
So I see the dialog of setting default browser when I click the short cut.

Expected Results:  
Fx does not show me the dialog.

There is same appearance on Windows Vista.

You can succeed to set default browser by under command line on only Fx3.
<"C:\Program Files\Mozilla Firefox\uninstall\helper.exe" /SetAsDefaultAppUser>

referenced by nsWindowsShellService.cpp
Comment 1 User image Tyler Downer [:Tyler] 2010-10-06 14:13:34 PDT
This is a mass search for bugs which are in the Firefox General component, are
UNCO, have not been changed for 500 days and have an unspecified version. 

Reporter, can you please update to Firefox 3.6.10 or later, create a fresh profile,, and test again. If you still see the issue, please update this bug. If the issue is gone, please set the status to RESOLVED > WORKSFORME.
Comment 2 User image JJ Bae 2010-10-14 04:59:33 PDT
I checked this bug after updated Firefox 3.6.10.
But it isn't fixed yet.
I know it's not a major bug. Few people use this command.
But I already suggested how to fix it and it's so simple.
Just change "true" to "false" on javascript.
Comment 3 User image Tyler Downer [:Tyler] 2011-06-03 17:52:54 PDT
Reporter, Firefox 4.0.1 has been released, and it features significant improvements over previous releases. Can you please update to Firefox 4.0.1 or later, and retest your bug? Please also create a fresh profile (, update your plugins (Flash, Java, Quicktime, Reader, etc) and update your graphics driver and Operating system to the latest versions available. 

If you still continue to see this issue, please comment. If you do not, please close this bug as RESOLVED > WORKSFORME

filter: prefirefox4uncobugs
Comment 4 User image Wayne Mery (:wsmwk, NI for questions) 2012-06-20 11:44:56 PDT
worksfor me,current nightly, windows 7
Comment 5 User image Wayne Mery (:wsmwk, NI for questions) 2012-06-20 11:46:08 PDT
*** Bug 512103 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.