Hello,
Can some one please suggest how to enable the settings (Run in private windows to Allow) programatically? Currently we need to login to individual bots for each bot user. We have 10 vms with 2 users so that takes a lot of time.
check this thread as reference
Please find below options suggested by LLM.
Method 1: Using Windows Registry (for enterprise deployment)
This method is typically used in an enterprise environment where you can deploy settings via Group Policy.
- Open Registry Editor:
- Press
Win + R, typeregedit, and press Enter.
- Navigate to Firefox Policies:
- Go to
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Firefox.
- Create Policies:
- If the
Firefoxkey does not exist, you will need to create it. - Under the
Firefoxkey, create a new key namedExtensions. - Inside the
Extensionskey, create a newStringvalue.
- Set the Value:
- Name the new string value
Install. - Set its value to the path or URL where the UiPath extension is hosted.
- Allow Extensions in Private Windows:
- Create a new
Stringvalue namedPrivateBrowsingAllowed. - Set its value to
true.
Method 2: Automating with a Script (e.g., PowerShell)
You can also automate this process using a script. Below is an example PowerShell script to modify the Firefox profile settings:
# Path to Firefox profile
$profilePath = "C:\Path\To\Your\Firefox\Profile"
# Read prefs.js file
$prefsPath = "$profilePath\prefs.js"
$prefsContent = Get-Content -Path $prefsPath
# UiPath Extension details
$extensionId = "<extension_id>"
$uuid = "<uuid>"
# Add or update the preference
$newPref = "user_pref(\"extensions.webextensions.uuids\", \"{\""$extensionId\"":"\""$uuid\""}\");"
if ($prefsContent -notcontains $newPref) {
Add-Content -Path $prefsPath -Value $newPref
}
# Restart Firefox (if running)
Stop-Process -Name "firefox" -Force
Start-Process "firefox.exe"
Notes:
- Replace placeholders (
<extension_id>,<uuid>,C:\Path\To\Your\Firefox\Profile) with actual values. - Ensure that Firefox is closed before making changes to the
prefs.jsfile to avoid overwriting. - For enterprise deployment, refer to Mozilla’s official documentation on Enterprise Policies.
Thanks,
Ashok ![]()
