Closed
Bug 324023
Opened 20 years ago
Closed 20 years ago
Command line method of setting the default browser
Categories
(Firefox :: Shell Integration, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: mike, Assigned: robert.strong.bugs)
References
Details
(Keywords: fixed1.8.0.4, fixed1.8.1)
Attachments
(1 file)
911 bytes,
patch
|
benjamin
:
review+
benjamin
:
approval-branch-1.8.1+
timr
:
approval1.8.0.4+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051007 Debian/1.7.12-1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051007 Debian/1.7.12-1
I have a build environment for machines which automatically installs an operating system image and applications. As part of this process, where Firefox is installed on a machine I want to be able to silently set is as the default browser for all users on the machine.
I can achieve the effect I want by logging into the machine as Administrator, and setting FF to be the default browser through "Set Program Access and Defaults". I cannot find any way to automate this from the command line easily.
With IE, I can make it take over as the default browser by the simple expedient of running "shmgrate.exe OCInstallReinstallIE", but I can't find any way to go in the other direction, and make Firefox silently become the machine's default browser.
This isn't really a bug, but having an analogous capability added to FF would make network management an awful lot easier for me, and might make it more popular in other business environments.
Reproducible: Always
Steps to Reproduce:
![]() |
Assignee | |
Comment 1•20 years ago
|
||
Per the MS spec on this
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_adv/registeringapps.asp
we should be able to do this without being interactive and it appears that at one point we had a -silent flag to accomplish this which is no longer working. The following shows the reg entry we make to provide this functionality via "Set Program Access and Defaults"
http://lxr.mozilla.org/seamonkey/source/browser/installer/windows/ab-CD.jst#264
Severity: enhancement → normal
![]() |
Assignee | |
Updated•20 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
![]() |
Assignee | |
Updated•20 years ago
|
Assignee: nobody → robert.bugzilla
![]() |
Assignee | |
Comment 2•20 years ago
|
||
Simple fix that should be all that is needed. I'm going to think on this for a couple of days before requesting review.
Note: nsBrowserContentHandler.js has
const dch_contractID = "@mozilla.org/browser/final-clh;1";
but http://lxr.mozilla.org/seamonkey/source/toolkit/components/commandlines/public/nsICommandLineHandler.idl#58
references @mozilla.org/browser/clh-final;1 (e.g. final-clh instead of clh-final).
![]() |
Assignee | |
Comment 3•20 years ago
|
||
Comment on attachment 209644 [details] [diff] [review]
patch (adds handleFlag -silent to nsBrowserContentHandler.js)
Benjamin, it appears that xpfe still handles -silent but toolkit apps don't though we still set reg values on win32 to use -silent for this sanme purpose. Anyways, I set this as the last flag to be checked in nsBrowserContentHandler.js with this patch.
Attachment #209644 -
Flags: review?(benjamin)
![]() |
Assignee | |
Comment 4•20 years ago
|
||
bah... forgot to add the url to the xpfe code
http://lxr.mozilla.org/seamonkey/source/xpfe/bootstrap/nsAppRunner.cpp#888
Updated•20 years ago
|
Attachment #209644 -
Flags: review?(benjamin) → review+
![]() |
Assignee | |
Comment 5•20 years ago
|
||
Fixed on trunk
Mike - this adds back the -silent command line argument for the executable. There is already the -setDefaultBrowser command line argument which sets the default browser and along with the -silent switch you will be able to accomplish in future version of the app what you outlined in comment #0.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 6•20 years ago
|
||
Will the use of -silent and -setDefaultBrowser set FF as the default for the machine, or only for the user executing the application? I typically install from the local system account, not from the user account.
![]() |
Assignee | |
Comment 7•20 years ago
|
||
(In reply to comment #6)
> Will the use of -silent and -setDefaultBrowser set FF as the default for the
> machine, or only for the user executing the application? I typically install
> from the local system account, not from the user account.
It is system wide... for per user on the OS / SP combinations that support it (e.g. XP Pro SP1 and Win2K SP3 I believe) there is bug 256566 which would require the ability to support the per user registry keys.
![]() |
Assignee | |
Updated•20 years ago
|
Attachment #209644 -
Flags: branch-1.8.1?(benjamin)
Updated•20 years ago
|
Attachment #209644 -
Flags: approval-branch-1.8.1?(benjamin) → approval-branch-1.8.1+
Comment 9•19 years ago
|
||
*** Bug 332481 has been marked as a duplicate of this bug. ***
Comment 10•19 years ago
|
||
Hi. I see that this has been fixed on MOZILLA_1_8_BRANCH. Forgive my ignorance, but does this mean that it will be applied to future 1.5.0.x builds, or only to future 2.x builds?
I have trouble keeping track of those details... THanks.
![]() |
Assignee | |
Comment 11•19 years ago
|
||
Comment on attachment 209644 [details] [diff] [review]
patch (adds handleFlag -silent to nsBrowserContentHandler.js)
It is only fixed on the branch that will become Firefox 2.0 and the trunk for future releases. I'll request approval for 1.5.0.3 but I believe it may be too late for that at this time.
Attachment #209644 -
Flags: approval1.8.0.3?
Comment 12•19 years ago
|
||
Comment on attachment 209644 [details] [diff] [review]
patch (adds handleFlag -silent to nsBrowserContentHandler.js)
Will aid deployment of this release. a=timr for drivers
Attachment #209644 -
Flags: approval1.8.0.3? → approval1.8.0.3+
![]() |
Assignee | |
Comment 13•19 years ago
|
||
Checked in to MOZILLA_1_8_0_BRANCH for Firefox 1.5.0.3
Keywords: fixed1.8.0.3
![]() |
Assignee | |
Comment 14•19 years ago
|
||
Actually, this will be available in Firefox 1.5.0.4
![]() |
Assignee | |
Comment 15•19 years ago
|
||
*** Bug 304104 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•