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:
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 do not need to install multiple versions of Firefox to do this. If you want to have two shortcuts, one which launches the default profile and one which launches a profile named "Research", your two shortcuts should point to:
[path to firefox]\firefox.exe
[path to firefox]\firefox.exe -P Research -no-remote
It does not matter which shortcut you launch first.
Opening a new instance of your Mozilla application with another profile:
Never use -no-remote
to start the "default" profile (the one that is set to open without asking when you launch Firefox). That's because when you launch Firefox, for example, by clicking a link in your mail program, you will get a "Firefox is already running but is not responding" message if the default profile is already in use. The solution is to always start the default profile normally and launch all others with -no-remote. Then it will work.
Best Answer
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":
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.
Depending on OS, the steps you want to take differ from here.
Windows XP
Navigate to My Computer and select the Tools -> Folder Options -> File Types tab. You need to change 4 file type associations.
To be clear, to create a link only for actual .html files, just the first item needs to edited. The Firefox URL (.url) is a separate type of file and the remaining two items are for opening external links in programs such as Outlook (e.g. you wish to click a link in your email and have your .bat file handle that link).
For each of these, you will need to 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.
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:
Please be aware that while changing all four options should not cause issues generally, the way any one program interprets a URL link or HTML page could be affected. Regarding comments by @Odys, there were no issues with links in Outlook Express 6, but extensive testing of other programs for linking issues has not be done.
Windows 7
Select any file ending in .html, right-click and select Properties -> General tab -> Change button. From the "Open with" menu, click the Browse button and a from the Selection dialog, find your batch file and click the Open button.
Note that this can be done from
as well.
Note, however, that if you attempt to change the protocols for links (HTTP and HTTPS respectively) at the bottom of this list (after file associations), there is no option to Browse for a program. This means that for Windows 7, you cannot associate links (e.g. in a mail client) with particular profile. It might be possible to change this somehow with registry editing, but this hasn't been tested.
In any case, you have now created a link between the .html file extension and your executable .bat that opens Firefox under a specific profile.
Notes
You may have to install a copy of Firefox outside the "Progams Files" or "Programs Files (x86)" folders (similar to the example .bat file command) to avoid permission issues in both XP and Windows 7.
Don't forget that to automatically log in to a profile, you will need to enable that option in the Firefox Profile Manage window (firefox.exe -P or -ProfileManager). A picture of the profile manager with the correct option checked is here.
Since Firefox uses whatever profile was last active when starting, you will likely want to create links to other .bat files to different profiles (e.g. to switch back to default from Dev, etc.)
Remember that every profile contains data about add-ons, themes, etc. so you will likely have to select these when creating new profiles (this is especially important to remember if you use the ProfileSwitcher add-on below.)
Links
Firefox Command Line Options are here. I noticed you have a small -p switch and its now officially a big -P for current versions (30.0+) of Firefox. I would check the other switches as well for proper syntax and support.
ProfileSwitcher -- An add-on to help verify which profile is currently active if you can't tell otherwise. Despite the comments regarding FF 29 compatibility, this does work with FF 30.0 as of version 1.6.2.