UiPath Firefox extension enable in private

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.

@usha.mukkanagoudar

check this thread as reference

@usha.mukkanagoudar,

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.

  1. Open Registry Editor:
  • Press Win + R, type regedit, and press Enter.
  1. Navigate to Firefox Policies:
  • Go to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Firefox.
  1. Create Policies:
  • If the Firefox key does not exist, you will need to create it.
  • Under the Firefox key, create a new key named Extensions.
  • Inside the Extensions key, create a new String value.
  1. Set the Value:
  • Name the new string value Install.
  • Set its value to the path or URL where the UiPath extension is hosted.
  1. Allow Extensions in Private Windows:
  • Create a new String value named PrivateBrowsingAllowed.
  • 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.js file to avoid overwriting.
  • For enterprise deployment, refer to Mozilla’s official documentation on Enterprise Policies.

Thanks,
Ashok :slight_smile: