Created 2.2 Multiple Profiles [Firefox Portable] (markdown)

Thorin-Oakenpants 2017-03-27 18:07:08 +13:00
parent 2e8a6c043c
commit 8e4894de91

@ -0,0 +1,123 @@
How to set up, maintain, rename, delete and run profiles with Firefox Portable. For installed Firefox versions, please refer to [2.1 Multiple Profiles](https://github.com/ghacksuserjs/ghacks-user.js/wiki/2.1-Multiple-Profiles)
### Firefox [Portable] Method 1
You can't use the Profile Manager or controls in `about:profiles` with Firefox Portable. There are two ways to achieve this. Here's the first. NOTE: These secondary profiles are not portable as they contain a single full path in their ini files. The original full portable Firefox remains portable.
Download the [FirefoxPortable2ndProfile](http://downloads.sourceforge.net/portableapps/FirefoxPortable2ndProfile_1.2.paf.exe?redirect_do_not_right_click) from PortableApps and run the file as many times as you need to create as many profiles as you need. Always unpack to the same root directory as your original portable Firefox (i.e `D:/Portable/` and NOT `D:/Portable/FirefoxPortable/`).
```
- FirefoxPortable (full portable Firefox)
- FirefoxPortableHardened (portable profile)
- FireforPortableRelaxed (portable profile)
```
Note: If you want to rename a portable profile from the one you gave it when unpacking (or you moved it), under the Data/Settings directory you will need to amend the `LastProfileDirectory` in the `FirefoxPortableSettings.ini`, and yes, it is not a relative path. Here is the `Hardened` one
```ini
[FirefoxPortableSettings]
LastProfileDirectory=D:\Portable\FirefoxPortableHardened\Data\profile
SubmitCrashReport=0
```
To run concurrent profiles, you will need to add the following line to the FirefoxPortable.ini files.
```
AllowMultipleInstances=true
```
They are in different places: for the main portable Firefox, the location is the root folder and for the portable profiles, it is located in the root of the Data sub-directory e.g.
```
- FirefoxPortable/FirefoxPortable.ini
- FirefoxPortableHardened/Data/FirefoxPortable.ini
- FireforPortableRelaxed/Data/FirefoxPortable.ini
```
To run any profile, run the appropriate portable exe. Create shortcuts for them and rename them.
### Firefox [Portable] Method 2
Here is a second method, and due to the restructuring of the profile locations, this means it is no longer portable.
Here is a typical Firefox Portable profile layout
```
-FirefoxPortable
-App
-Data
-plugins
-profile
-settings\FirefoxPortableSettings.ini
-Other
FirefoxPortable.exe
FirefoxPortable.ini
```
Here is a multiple profile layout
```
-FirefoxPortable
-App
-Data
-default
-plugins
-profile
-settings\FirefoxPortableSettings.ini
-hardened
-plugins
-profile
-settings\FirefoxPortableSettings.ini
-relaxed
-plugins
-profile
-settings\FirefoxPortableSettings.ini
-Other
Firefox.bat
FirefoxPortable.exe
FirefoxPortable.ini
FirefoxPortableDefault.ini
FirefoxPortableHardened.ini
FirefoxPortableRelaxed.ini
```
For each `settings\FirefoxPortableSettings.ini` you will need to modify the `LastProfileDirectory` value. Note that the path is not relative, and this breaks the portability factor. Here is the `relaxed` one
```ini
[FirefoxPortableSettings]
LastProfileDirectory=D:\Portable\FirefoxPortable\Data\relaxed\profile
SubmitCrashReport=0
```
Also, for each ini in the root directory you will need to add the following lines. Note that `AllowMultipleInstances` when true allows you to run concurrent profiles. Here is the `relaxed` one
```ini
AllowMultipleInstances=true
ProfileDirectory=Data\relaxed\profile
SettingsDirectory=Data\relaxed\settings
```
To launch any profile, you run a bat file located in the root directory, which replaces `FirefoxPortable.ini` with the profile one of your choice and then runs FirefoxPortable.exe
```batch
@echo off
echo Which profile:
echo 1 (default)
echo 2 (hardened)
echo 3 (relaxed)
set /p Input=
if /i "%Input%"=="1" (goto Profile1)
if /i "%Input%"=="2" (goto Profile2)
if /i "%Input%"=="3" (goto Profile3)
REM if /i not "%Input%"=="y" (exit /b)
exit /b
:Profile1
copy /Y FirefoxPortableDefault.ini FirefoxPortable.ini
FirefoxPortable
exit /b
:Profile2
copy /Y FirefoxPortableHardened.ini FirefoxPortable.ini
FirefoxPortable
exit /b
:Profile3
copy /Y FirefoxPortableRelaxed.ini FirefoxPortable.ini
FirefoxPortable
exit /b
```