Using Administrative Templates
Setting the Registry Using a Script
Getting Started
- Please configure the registry settings for silent activation first.
[Silent Activation] AD -> Windows Chrome / Edge - There are various ways to configure registry settings. If you already have a method for forcing (automatically) installing browser extensions, please use that same method.
- Installing a device management tool agent (e.g., SKYSEA Client View) may add entries to the registry. However, using administrative templates might overwrite those registry entries.
- Please check the current status of the following registry settings beforehand:
HKLM:\SOFTWARE\Policies\Google\Chrome\ExtensionInstallForcelist
HKCU:\SOFTWARE\Policies\Google\Chrome\ExtensionInstallForcelist
HKLM:\SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallForcelist
HKCU:\SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallForcelist - Typical configuration methods are described below.
- If you know which extensions are configured: Configuring Registry Items
- If you already have configurations using administrative templates: Using Administrative Templates
- If you do not know which extensions are configured: Setting the Registry Using a Script
Configuring Registry Items
- Right-click "Group Policy Objects" and select "New".
- Enter a "Name" and click "OK".
- Right-click the saved Group Policy and select "Edit".
- The "Group Policy Management Editor" window will open.
Go to "Computer Configuration" > "Preferences" > "Windows Settings" > "Registry", right-click, and select "New" > "Registry Item". - Configure the settings in the "New Registry Properties" screen as follows. Click "OK" when finished.
Action: Update
Hive: HKEY_LOCAL_MACHINE
Key Path: SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallForcelist
Value name: Any half-width number (a number that does not conflict with other extensions)
Value type: REG_SZ
Value data: hjifncajikcdkhlofdjjlhcjoennmdfc;https://edge.microsoft.com/extensionwebstorebase/v1/crx - Link the Group Policy to the domain/OU. (The target is the computer object)
Right-click the domain/OU to apply, and select "Link an Existing GPO...". - Select the created Group Policy and click "OK".
Using Administrative Templates
*Please complete the silent activation process first.Deploy the extension through "Group Policy Management" in Active Directory.
-
Open the
run.exeapplication. Right-click the Windows icon in the bottom-left corner of the screen and select [Run] from the menu.
-
Open the Group Policy Management console.
Type "GPMC.msc" and select [OK]. -
Create a new Group Policy Object (GPO). Right-click [Group Policy Objects] in the left navigation and select [New] from the menu. Name the policy something easy to understand, such as "josysExtInstall".
-
Right-click the new empty policy and select [Edit].
-
Navigate to [Policies] > [Administrative Templates Policy Definitions (ADMX files) retrieved from the central store] > [Microsoft Edge] > [Extensions].
Next, open the settings for
[Control which extensions are installed silently].
💡 If you cannot find the Edge template, download the ADMX (Windows ARM64 file) from the link below and upload it to the appropriate folder. -
Select [Show...] under [Extension/App IDs and update URLs to be silently installed].
Next, enter the extension ID and the update URL joined by a semicolon.
hjifncajikcdkhlofdjjlhcjoennmdfc;https://edge.microsoft.com/extensionwebstorebase/v1/crxSelect [OK], select Enabled, and then select [Apply]. - Select the target devices and apply the GPO.
Setting the Registry Using a Script
- Save the following script as a .ps1 file with a name of your choice (if saving with Notepad, UTF-8 with BOM is recommended).
*This script configures settings for both Chrome and Edge browsers.
*Edit as necessary.
This script will only leave a log file at the path specified in the script if an error occurs.<# .SYNOPSIS Browser Extension Force Install Configuration Script .DESCRIPTION Adds entries to ExtensionInstallForcelist for Google Chrome and Microsoft Edge. Supports execution with SYSTEM privileges, such as SKYSEA or AD startup scripts. .NOTES Describe the extension information you want to register in $ExtensionList in the configuration area. #> #Requires -Version 5.1 #Requires -RunAsAdministrator # ----------------------------------------------------------- # [Configuration Area] Extensions to install and log settings # ----------------------------------------------------------- # Log file path $LogFilePath = "C:\Windows\Temp\BrowserExtensionInstall.log" # List of target browsers and extension settings # Format: "ExtensionID;UpdateURL" # *Please replace the ID and URL according to your usage $TargetExtensions = @( @{ Name = "Google Chrome" RegPath = "HKLM:\SOFTWARE\Policies\Google\Chrome\ExtensionInstallForcelist" # Example below: Josys ID Value = "moaklgcgokbgplldonjkoochhlefkbjf;https://clients2.google.com/service/update2/crx" }, @{ Name = "Microsoft Edge" RegPath = "HKLM:\SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallForcelist" # Example below: Josys ID Value = "hjifncajikcdkhlofdjjlhcjoennmdfc;https://edge.microsoft.com/extensionwebstorebase/v1/crx" } ) # ----------------------------------------------------------- # Initialization # ----------------------------------------------------------- $script:HasError = $false try { Start-Transcript -Path $LogFilePath -Append -ErrorAction SilentlyContinue } catch { # Continue operation even if log start fails } Write-Host "--- Process Start: $(Get-Date) ---" Write-Host "Execution User: $env:USERNAME" # ----------------------------------------------------------- # Function Definition # ----------------------------------------------------------- function Set-BrowserExtension { param ( [string]$BrowserName, [string]$RegistryPath, [string]$ExtensionData ) Write-Host "`nChecking settings for [$BrowserName]..." try { # 1. Check and create path if (-not (Test-Path $RegistryPath)) { Write-Host " [INFO] Registry key does not exist, creating: $RegistryPath" New-Item -Path $RegistryPath -Force -ErrorAction Stop | Out-Null } # 2. Get existing values $existingProps = Get-ItemProperty -Path $RegistryPath -ErrorAction SilentlyContinue $numericNames = @() $isDuplicate = $false if ($existingProps) { # Duplicate check (compare by value content) foreach ($prop in $existingProps.PSObject.Properties) { if ($prop.Value -eq $ExtensionData) { $isDuplicate = $true Write-Host " [SKIP] Already registered (Entry: $($prop.Name))" break } } # Get existing sequential numbers (extract numeric names only) $numericNames = $existingProps.PSObject.Properties.Name | Where-Object { $_ -match "^\d+$" } | ForEach-Object { [int]$_ } | Sort-Object } # 3. New registration if (-not $isDuplicate) { # Calculate Max Value + 1 $nextNum = 1 if ($numericNames.Count -gt 0) { $nextNum = $numericNames[-1] + 1 } $newValueName = $nextNum.ToString() Write-Host " [ADD] Executing new registration: Name='$newValueName'" New-ItemProperty -Path $RegistryPath -Name $newValueName -Value $ExtensionData -PropertyType String -Force -ErrorAction Stop | Out-Null Write-Host " [SUCCESS] Registration completed" } } catch { Write-Error " [ERROR] An error occurred during processing for $BrowserName: $($_.Exception.Message)" $script:HasError = $true } } # ----------------------------------------------------------- # Main Process # ----------------------------------------------------------- foreach ($target in $TargetExtensions) { Set-BrowserExtension -BrowserName $target.Name -RegistryPath $target.RegPath -ExtensionData $target.Value } Write-Host "`n--- Process End: $(Get-Date) ---" Stop-Transcript # ----------------------------------------------------------- # Cleanup Process (Log deletion check and ExitCode) # ----------------------------------------------------------- if ($script:HasError) { # If there is an error: Keep the log and return exit code 1 (Failure) Write-Warning "An error occurred during processing. Please check the log: $LogFilePath" exit 1 } else { # If there is no error: Delete the log and return exit code 0 (Success) Remove-Item -Path $LogFilePath -Force -ErrorAction SilentlyContinue exit 0 } - Configure the Group Policy so that the saved .ps1 file is executed as a startup script or similar.