How to install the extension in the browser chrome programmatically.
Running a file on a computer → extension added in chrome

How to implement it, which file in chrome is responsible for managing the installed extensions?

I figured out the documentation, created the file nojpnepbplnoojhiinbpegidccgolald.json (I used the application id as the name, I got it by installing the plugin in my chrome and copying it id ) in the folder

 C:\Users\<имя пользователя>\AppData\Local\Google\Chrome\Application\31.0.1650.63\Extensions 

with the following content:

 { "external_crx": "C:\Sdsattings.crx", "external_version": "1.0" } 

crx file placed on the C drive, restart chrome and nothing happens

  • Installation through the restaurant also did not give anything - Kopkan

2 answers 2

Greetings.

For security in Chrome on Mac / Windows, you can install extensions only from the Chrome Web Store. Those. in fact, Chrome adds information about which extension needs to be updated and after launching the browser it loads the extension.


  1. Windows

    1.1. In Windows, the installation is done through the registry in the section:

    • 32-bit HKEY_LOCAL_MACHINE\Software\Google\Chrome\Extensions

    • 64-bit HKEY_LOCAL_MACHINE\Software\Wow6432Node\Google\Chrome\Extensions

    1.2. Create a new key (folder) of the form aaaaaaaaaabbbbbbbbbbcccccccccc ( extension ID in Chrome Web Store )

    1.3. Inside this key, create the update_url property with the value https://clients2.google.com/service/update2/crx ( link to Chrome Web Store )

  2. Mac

    2.1. Create aaaaaaaaaabbbbbbbbbbcccccccccc.json file ( extension ID in Chrome Web Store )

    2.2. The content of the file should be

     { "external_update_url": "https://clients2.google.com/service/update2/crx" } 

    2.3. Put it in a folder:

    • for a specific user ~USERNAME/Library/Application Support/Google/Chrome/External Extensions/
    • for all /Library/Application Support/Google/Chrome/External Extensions/
  3. Option for Linux

    For Linux, you can install both from a remote source and from a local .crx file

    3.1. Create file of type aaaaaaaaaabbbbbbbbbbcccccccccc.json (extension ID)

    3.2. The content of the file should be

    • when installing from a local file

       { "external_crx": "/path/to/extension.crx", "external_version": "1.0" } 
    • when installing by reference (example)

       { "external_update_url": "http://myhost.com/mytestextension/updates.xml" } 

    3.3. Put the file in any of the folders (must be readable by all):

    /opt/google/chrome/extensions/

    /usr/share/google-chrome/extensions/


It is also possible to install the extension by simply opening the .crx file from Chrome, if you start the browser with the –enable-easy-off-store-extension-install flag

    Why not search for an answer on the official site?

    Developer's Guide -> Finishing -> Other Deployment Options http://developer.chrome.com/extensions/external_extensions.html

    • @ Anton Khalko: if you, as a programmer, cannot understand the English text, I have bad news for you. - VladD
    • I figured out something, created the nojpnepbplnoojhiinbpegidccgolald.json file in the Chrome \ Application \ 31.0.1650.63 \ Extensions folder with the following content: {"external_crx": "C: \ Sdsattings.crx", "external_version": "1.0"} crx file was placed on drive C, restart chrome and nothing happens - Kopkan
    • If anything, there is a competition for a more complete answer to the same question. - Nick Volynkin