20

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?

Rahul Gulati
  • 363
  • 1
  • 4
  • 16

3 Answers3

17

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.

Community
  • 1
  • 1
FuzzyAmi
  • 7,543
  • 6
  • 45
  • 79
  • It works great from an installer if a user has rights to HKLM, but if he does not, this does not work at all. – Tony BenBrahim Jun 03 '15 at 23:05
  • From https://developer.chrome.com/apps/external_extensions: "Both ways support installing an extension hosted at an update_URL. On Windows and Mac, the update_URL must point to the Chrome Web Store where the extension must be hosted.". So it looks like it's possible only on Linux if the extension is not hosted on Chrome Web Store. – cprcrack Feb 22 '19 at 20:20
7

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.

gengkev
  • 1,890
  • 2
  • 20
  • 31
  • 1
    This link should no longer be used. Refer to my Answer for the currently-correct answer. – FuzzyAmi May 27 '14 at 08:36
  • @FuzzyAmi do you have any source stating that the info on that link is no longer valid? I can read "For Windows instances that are not joined to a Microsoft Active Directory domain, forced installation is limited to apps and extensions listed in the Chrome Web Store." So it looks like it's actually possible for Windows Server machines? – cprcrack Feb 22 '19 at 20:24
  • @cprcrack - apologies, I no longer dabble with this kind of thing. – FuzzyAmi Feb 22 '19 at 20:55
1

If you're using GNU/Linux, this is how you pre-install an extension from the chrome web store for all users:

/etc/chromium/policies/managed/yourextension_policy.json
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
{
    "ExtensionInstallForcelist": [
        "yourextensionuniqueidentifiersup;https://clients2.google.com/service/update2/crx",
        "yourextensionuniqueidentifiersup"
    ]
}

Reference

metamask-chrome - AUR

Scrooge McDuck
  • 372
  • 2
  • 14