You are currently viewing How to deploy a Chrome extension

How to deploy a Chrome extension

  • Post category:SCCM
  • Post comments:0 Comments

Your company has created an extension for the Chrome browser or simply wants to deploy one of the many existing extensions. You could tell me that the user just has to install it from the Chrome extension store, that would be much faster. But we are starting from a context where the user does not have the rights to install extensions himself. In addition to this, we can supervise the deployment on the target computers and force its installation.

You will see that it is possible to deploy a Chrome extension very easily with a well placed Powershell script.

First, you need to download the extension in .crx format in order to use it, go to http://chrome-extension-downloader.com/. You will need to know the ID of your extension. If you don’t know it, install the extension on a test station and go to the menu, click on “Extensions” and activate the “developer mode”. You will see all the extension IDs in the right hand corner.
Then define where to store your extension on the target workstations. You can for example store it in “c:\Program Files\GoogleExtensions“.
Now let’s move on to the registry. You must create a new key with the ID of the application as its name in “HKLM\SOFTWARE\Google\Chrome\Extensions“. Create beforehand the key “Extensions” if it is not already present.
You must then create 2 strings type “Reg_SZ“:
The first one will be named “Path” and will have the value “c:\Program Files\GoogleExtensions.crx” .
The second one, “version“, where we will indicate as a value theā€¦ version of the extension!
And that’s all! Here is the Powershell script for the creation of the application. We assume that the script is in the same folder as the :

$executingScriptDirectory = Split-Path -Parent -Path $MyInvocation.MyCommand.Definition
Copy-Item "$executingScriptDirectory\Extension.crx" "c:\Program Files\Google\Extensions"
cmd /c "reg add "HKLM\SOFTWARE\Google\Chrome\Extensions\ID_extension""
cmd /c "reg add "HKLM\SOFTWARE\Google\Chrome\Extensions\ID_extension" /v "Path" /d "c:\Program Files\Google\Extensions\extension.crx" /f"
cmd /c "reg add "HKLM\SOFTWARE\Google\Chrome\Extensions\ID_extension" /v "version" /d "version_extension" /f"

You should know that there will be 2 different behaviours depending on the situation. If you install it through a master drop, your extension will be automatically activated on the browser. On the other hand, if it is a deployment, the user will be warned by Chrome that an extension is installed and that he will have to activate it to be able to use it.

Your extension is now deployable, only SCCM does not know how to inventory them. Find out now how to inventory your Chrome extensions.

Leave a Reply