Firefox - profiles

Jollier

Professional
Messages
1,127
Reputation
6
Reaction score
1,103
Points
113
Let me show you an example of how to save time and space on the harddrive when you write several dozens/hundreds of selftags via firefox portables.

I prefer the Firefox Nightly build, https://download.mozilla.org/?product=firefox-nightly-stub&os=win&lang=en-US

But everything works with the standard build as well.

FF has such a handy feature as user profiles. One profile is a separate working environment, where cookies, history, bookmarks, plugins are stored individually. Like a separate copy of the browser.

All this can be done by simple copying of folders with portable browser, but 1) it takes longer, 2) it eats up more space.

So, first we need to set up a profile-template, from which we're going to copy.

Let's add FF icon on desktop of our virtual machine (or basics, who works with what), and add -P -no-remote in target properties.

b9c9286895f68dac5d0c5.png


Run it, a window appears with the choice of profile, choose default.

In the default profile we configure the browser as usual: add the necessary plugins, such as user-agent switcher, disable webrtc in about:config and so on. It was many times described in other articles.

Next. For fast copying I've made a .bat script, which automatically creates new FF profile, based on default one, and creates shortcut on desktop to start it. The shortcut can then be moved to wherever you want.

Code:
@echo off

:: arg profileName should be 245_John_Doe
set profileName=%1
if not defined profileName (
    echo profile name is not defined, example: script 245_John_Doe
    exit /B
)

"c:\Program Files (x86)\Firefox Nightly\firefox" -CreateProfile %profileName%
echo %profileName% created
echo copying default config..

for /f "delims=" %%a in ('dir c:\Users\MrBright\AppData\Roaming\Mozilla\Firefox\Profiles\*default* /AD /B') ^
do set defaultDirectoryName=%%a
    
for /f "delims=" %%a in ('dir c:\Users\MrBright\AppData\Roaming\Mozilla\Firefox\Profiles\*%profileName%* /AD /B') ^
do set newDirectoryName=%%a

xcopy c:\Users\MrBright\AppData\Roaming\Mozilla\Firefox\Profiles\%defaultDirectoryName% ^
c:\Users\MrBright\AppData\Roaming\Mozilla\Firefox\Profiles\%newDirectoryName% /E /Y

echo default config for profile %profileName% copied

:: creating shortcut for profile
set TARGET='C:\Program Files (x86)\Firefox Nightly\firefox.exe'
set SHORTCUT='C:\Users\MrBright\Desktop\%profileName%.lnk'
set PWS=powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile
set ARGUMENTS='-P %profileName% -no-remote'

%PWS% -Command "$ws = New-Object -ComObject WScript.Shell; $s = $ws.CreateShortcut(%SHORTCUT%); $S.TargetPath = %TARGET%; $S.Arguments = %ARGUMENTS%; $S.Save()"

:end
echo done

Save this code to the file "createProfile.cmd" (instead of MrBright in the script, substitute your login)

Open cmd, go to the directory with the script, run it:

C:\Users\MrBright\Desktop> createProfile.cmd 29_John_Snow

You will create a new profile named 29_John_Snow and a shortcut on your desktop to it with all plugins and settings from the default profile. All subsequent changes made in it, history, cookies, saved passwords, etc. will remain only in this profile.

Then repeat the same thing N times:

createProfile.cmd 30_Alex_Smith

createProfile.cmd 31_Jack_Vorobey

createProfile.cmd 32_Ivy_Rain

createProfile.cmd 33_Summer_Sauls

createProfile.cmd 34_Anna_Petrova

I have the ask in the format number_name_name, you can write just a number, or just a name, whichever is convenient.

This is it. Good luck to all!
 
Top