Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install a Chrome extension programmatically?

I've written an extension for Google Chrome that will be released with the next version of our product. I want to understand what properties, paths for extraction, registry entries, etc. should I provide the installer of my product so that the end user doesn't have to install the extension on their own manually, and the installer does the complete job of installing the extension, and also notifies the user that the extension has been installed. As of now, the code that I have written is placed in a folder, and I use the "Load Unpackaged Extension" to load the extension. What should I do to achieve the aforementioned task?

like image 203
Rahul Gulati Avatar asked Apr 18 '12 14:04

Rahul Gulati


2 Answers

Google's current policy on installing extensions via the registry (for Windows machines) is this: Only extensions from the Google Extension Gallery (or Chrome Web Store - CWS) can be installed via the registry.

See this link - https://developer.chrome.com/extensions/external_extensions - for information on how this can be done. Keep in mind the following:

-This technique will still pop-up a msgbox to the user. its not completely silent.

-When using this technique, if the user subsequently removes the extension from her Chrome, the extension gets "blacklisted" on that chrome and will not re-auto-install until the user re-install it manually. refer to Auto-installing a google chrome extension won't work ! for details.

like image 160
FuzzyAmi Avatar answered Sep 21 '22 20:09

FuzzyAmi


Chrome has a couple ways of installing extensions programmatically: http://www.chromium.org/administrators/pre-installed-extensions

Edit: yes, this policy has changed by now, as FuzzyAmi points out.

like image 22
gengkev Avatar answered Sep 23 '22 20:09

gengkev