Add external extension by using registry - google-chrome

I use Windows 7(64bit) and repeat steps in Google Document.
This is what I added in register.
In HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Google\Chrome\Extensions\nbfjanngloflombfddlmkgnambnfhgjc
path="C:\Extension.crx"
version="2.1"
But extension isn't install.
Before testing .crx file distribution,
I installed and uninstalled this extension with unpacked files many times by UI(chrome://extensions) for development and tested setting policy by using register. (But I removed all of them now.)
Does it cause any problem?
But when I tested same thing in another clean PC(Windows XP 32bit) nothing is changed, too.
I already checked some common mistakes in Google Document several times, but I can't find any mistakes.
- Not specifying the same id/version as the one listed in the .crx
- Key created in the wrong location in the registry
- Registry entry points to the wrong path to the .crx file (or path specified but no filename)
- Permissions problems on a network share
Are there other common mistakes I should check to install external extension?

According to this page - https://developer.chrome.com/extensions/external_extensions -
it is no longer possible to use the registry method to install locally-hosted .crx files.
in fact, the only allowed extension are those from Google's Extension gallery.
See a quote below from Google's policy page:
An extension that's installed automatically is known as an external extension. Google Chrome supports two ways of installing external extensions:
-Using a preferences JSON file (Mac OS X and Linux only)
-Using the Windows registry (Windows only)
Both ways support installing an extension hosted at an update_URL. In the Windows registry, the update_URL must point to the Chrome Web Store where the extension is hosted.

The extension-ID cannot be chosen at random.
I've installed your .crx file in Chromium 18 (Linux), and Chrome 18 (Windows 7 in VirtualBox), and the correct extension-ID is: lhmigopickaaleaaelbppeabnbdgcdhe
The version number has to match. In the manifest.json file, in the extension, I see "version": "1.0". So, the version entry in the registry has to be 1.0.
I was not able to install the extension via the registry using the steps from the Documentation. I've found two right ways to install the extension through the registry. Create a .reg file, and paste the text below to install the extension:
set_page_color_chrome-extension.reg (based on this file, md5: 10a1b95c249a2481bc88d3d1aead0e33).
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Google\Chrome\Extensions\lhmigopickaaleaaelbppeabnbdgcdhe]
"version"="1.0"
"path"="C:\\set_page_color.crx"
Replace HKEY_LOCAL_MACHINE with HKEY_CURRENT_USER if you're running in permission trouble, or if you want to install the extension only for the current user.

Related

Error when installing Chrome extension from file: CRX_HEADER_INVALID

I am trying to install extension on Google Chrome and I get this error when I drag and drop a .crx file onto Extensions page: Package is invalid: CRX_HEADER_INVALID.
How can I install it?
Change file type .crx to .zip and extract zip file to a folder.
Open the extensions page in Chrome or navigate to “chrome://extensions” from the address bar.
Check the “Developer mode” to enable the developer mode.
Click “Load unpacked” and select folder of extracted zip file;
This problem was reported on Mar 13, 2019 and closed as an intended behavior.
According to Chrome Enterprise release notes:
All extensions must be packaged with CRX3 format in Chrome 75
Starting with Chrome 75, all force-installed extensions will need to be packaged in the CRX3 format. Privately hosted extensions that were packaged using a custom script or a version of Chrome prior to Chrome 64.0.3242.0 must be repackaged. If your organization is force-installing privately hosted extensions packaged in CRX2 format and you don’t repackage them, they’ll stop updating in Chrome 75. And, new installations of the extension will fail. See ExtensionAllowInsecureUpdates.
However, it seems like in Chrome 73 Google forced this change for new installations already and introduced a policy option for updates only.
So, after unpacking extension in an old format (as described in another answer) you could pack it back with your current Chrome version and then install it as usual. This way you won't have to always keep that extension unpacked somewhere.

Programmatically installing a chrome extension to the default profile [duplicate]

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?
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.
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.
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

Offline google chrome extensions

Background:
I manage an offline network of workstations.
I have written a chrome extension that needs to be in the browser for our webapp to function
I have published it through the chrome store (but not made it public)
Question:
How do I install this extension without the internet
What I've tried:
Windows GPO: Requires the update URL to be http://clients2.google.com/service/update2/crx
Windows Registry: same URL problem
Unpacked extensions: prompts users, requires developer tools, and disables the extension when chrome is restarted.
install crx: disables the extension when chrome is restarted.
Any other ideas, or ways around this?
Chrome version 48.
I was able to do this on a regular chrome installation by doing the following:
Download the extension in crx format - how to download a crx file from the chrome web store for a given id
Unzip the crx file
I had to rename the _metadata folder to metadata
Open the chrome extensions page
Enable Developer mode
Click "Load unpacked extension..."
Select the unzipped folder
This worked for me when I needed to install Advanced REST client.
I have just:
Downloaded the add-on CRX file using http://crxextractor.com/
Opened the "extensions" page on Chrome.
Drag-and-dropped the CRX file onto the "extensions" page.
I got it to work actually, sadly forgot about this post until now.
I had the Business version installed as #gerardnimo suggested.
What I wound up doing is
1) setup and IIS server to serve both the CRX and the update xml. based on this guide. https://developer.chrome.com/extensions/autoupdate
2) Then i was able to install the extension via group policy.
Here is a thread that I've found. He suggests that you can use Google Chrome for Business.
Since September 3, 2015, Installing Chrome extensions off-line no longer work (and here ) due to Google trying to prevent malicious extensions being downloaded and installed. To install an extension off-line today, require you to install a signed pre-packaged full Chrome install, using Googles Chrome for Business. This functionality is controlled by a policy list. Or according to this post, you can use their Dev or Canary channels to run any extension. Their latest builds can be found here

How to locate Google Chrome extension dir

Hi i'm installing extensions by programmatically by a little c# program.
I just did see the software doesn't work on my friend.
i did see his chrome directory is not at %appdata% folder its at program files?
so how to find the real latest version of chrome directory for install plugins?
Google says
Windows:
chrome_root\Application\chrome_version\Extensions\
Example: c:\Users\Me\AppData\Local\Google\Chrome\Application\6.0.422.0\Extensions\
but how to find the chrome_root?
Visit chrome://version.
Look at Profile Path.
Extensions can be found in the Extensions subdirectory of the path you found at the previous step.
You can also load the extension using the --load-extension flag:
chrome.exe --load-extension=path/to/extension
The recommended mechanism for installing extensions programmatically is external extensions. It has the advantage of not depending on Chrome paths that might change, instead you can use a stable registry key or JSON file.

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?
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.
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.
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