3

I have two profiles. A and B I have made shortcuts to start each profile as follows:

"C:\Program Files\Mozilla Firefox\firefox.exe" -p A
"C:\Program Files\Mozilla Firefox\firefox.exe" -p B

Also, I have set the profile B as default using ProfileManager

What I want to do is start another but the default profile, when I open a specific filetype.

The current association for the .html file is:

C:\Program Files\Mozilla Firefox\firefox.exe

and command line arguments as follows:

-requestPending -osint -url "%1"

This opens the specified url (from inside outlook for example) as the default firefox profile (B in my case). I want to open each .html extension using the A profile.

Mozilla, states that -p and -requestPending -osint cannot be used at the same time.

How do I open another profile for a specific filetype?

2
  • 1
    %appdata%/mozilla/firefox/profiles.ini lists profiles, Default=1 is a line that marks a section like [Profile0] as a default profile. If in [General], StartWithLastProfile=1 is set, I think it starts the default profile. Now in theory you could write a wrapper batch file that in the first line executes a script, to be written, that sets the default profile in this ini and on the second line passes all arguments to firefox.exe. I would use python's ConfigParser.SafeConfigParser to write the lacked script.
    – n611x007
    Jul 7, 2013 at 12:08
  • Currently a solution to this question is here: superuser.com/questions/767871/… Jul 6, 2014 at 4:13

2 Answers 2

1

Easier way to do that is create forwarding rules in Browser Tamer: https://www.aloneguid.uk/projects/bt/

1
  • So after 11 years there is a good answer! Thanks Ivan
    – Odys
    Jan 10, 2023 at 14:45
0

The simplest solution is to use a batch file. The following was tested and confirmed to work with Firefox 30.0.

Associate .HTML Files With a Specific Firefox Profile

Create a batch file with something like the following — for instance, for a web development profile called "Dev":

"C:\My Programs\FF30\firefox.exe" -P Dev -no-remote

You should omit any non-Firefox command line switches in the .bat file commands (i.e. do not put in -osint -url "%1"). If you have never create a batch file, simply open a text file, type the appropriate command(s) and save. Then rename the file extension from .txt to .bat.

Assuming your are using Windows XP, navigate to My Computer and select the Tools -> Folder Options -> File Types tab. You need to change this file type association:

  • Firefox HTML Document

To be clear, to create a link only for actual .html files, just the first item needs to edited. Select the Advanced button, then Edit the default "open" action. Under the field marked "Application used to perform action:" paste the path to your .bat file e.g.

"C:\Documents and Settings\UserName\Desktop\Firefox.bat" "%1"

Make sure to use double quotes as above. Press OK, OK to finalize your changes.

You should, of course, copy the original entry in the field "just in case" and set it aside in case you want to reverse your changes at a later time. The basic form should be:

"C:\Path\To\Browser\firefox.exe" -osint -url "%1"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .