Make copy of Browsers(Firefox, chromium based browsers) - profiles

CreedX

Unknown
Messages
232
Reputation
4
Reaction score
226
Points
43
Firefox Browser

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
Нет(Russian) means No(English)
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_Rai
createProfile.cmd 33_Summer_Sauls
createProfile.cmd 34_Anna_Petrova

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

That is how firefox profile are made are made.
 

CreedX

Unknown
Messages
232
Reputation
4
Reaction score
226
Points
43
Chromium Based Browsers
you can use it for chrome and brave
To create a profile
Create a folder on your computer, say C:\chrome-dev-profile. This folder will hold the data for the new profile.

Make a copy of the Google Chrome shortcut on your desktop. (Right-click, then Copy.) Name the new shortcut something like Chrome Development.

Right-click the Chrome Development shortcut, choose Properties, and paste --user-data-dir=C:\chrome-dev-profile at the end of the Target field. The result might look like this:

"C:\Documents and Settings\me\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" --user-data-dir=c:\chrome-dev-profile

Start Google Chrome by double-clicking the Chrome Development shortcut. This creates the profile data.

To use the profile
Just start Google Chrome by double-clicking the Chrome Development shortcut. Yep, it's that easy.

To clear the profile
You might want to clear the profile if you're testing, and you want to start from scratch. Here's how:

Close Google Chrome.

Delete the contents of your profile folder — the folder you specified with --user-data-dir (for example, C:\chrome-dev-profile).

That all
 
Top