How To Create Crx File
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
- Feedback
- Edit
Alternate extension distribution methods
- 4 minutes to read
Thank you.
Generally, extensions are distributed through the Microsoft Edge Add-ons website. There are some scenarios where developers may need to distribute extensions using alternate methods. For example:
- The extension is associated with other software, and it should be installed together with the rest of the bundled software.
- Network administrators want to distribute an extension throughout their organization.
Extensions that are not loaded from the Edge Add-ons store are referred to as externally installed extensions. The following list provides alternate methods of distributing externally installed extensions.
- Use the Windows registry (Windows only).
- Use a preferences JSON file (macOS and Linux).
Before you begin
Ensure that you publish your extension in the Microsoft Edge Add-ons website, or package a .crx
file and ensure that it installs successfully on your computer. If you install the .crx
file using the update_URL
, ensure you can navigate to your extension at that URL.
Also, ensure that you have the following information.
- The file path of the
.crx
file, or theupdate_URL
of your extension. - The version of your extension. The version information is available in your manifest file, or in Microsoft Edge at
edge://extensions
after you load the packed extension. - The ID of your extension. The ID information is available in Microsoft Edge at
edge://extensions
after you load the packed extension.
Note
The following examples use 1.0
as the version, and aaaaaaaaaabbbbbbbbbbcccccccccc
for the ID.
Use the Windows registry (Windows only)
To distribute your extension using the Windows registry, perform the following steps.
-
Find or create the following key in the registry:
- 32-bit Windows:
HKEY_LOCAL_MACHINE\Software\Microsoft\Edge\Extensions
. - 64-bit Windows:
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Edge\Extensions
.
- 32-bit Windows:
-
Create a new key, or folder, under Extensions with the same name as the ID of your extension. For example, create the key with the name
aaaaaaaaaabbbbbbbbbbcccccccccc
. -
In the Extensions key, create the
update_url
property, and set the value tohttps://edge.microsoft.com/extensionwebstorebase/v1/crx
. Theupdate_url
property points to the.crx
file of your extension in the Microsoft Edge Add-ons website.{ "update_url": "https://edge.microsoft.com/extensionwebstorebase/v1/crx" }
Note
If you want to install an extension from the Chrome Web Store, set the value of
update_url
tohttps://clients2.google.com/service/update2/crx
. -
Verify that your extension is listed in Microsoft Edge by navigating to
edge://extensions
.
Use a preferences JSON file (macOS and Linux)
To distribute your extension using a preferences JSON file, perform the following steps.
-
When using Linux, ensure your
.crx
extension file is available on the machine that the extension will be installed on. Copy the.crx
extension file to a local directory, or use a network share that is reachable from the machine. -
Create a JSON file where the name of the file corresponds to the ID of your extension. For example, create a JSON file with the file name
aaaaaaaaaabbbbbbbbbbcccccccccc.json
. -
Depending on your operating system, save the JSON file to one of the following folders.
-
macOS
- User specific:
~USERNAME/Library/Application Support/Microsoft Edge/External Extensions/
- All users:
/Library/Application Support/Microsoft/Edge/External Extensions/
To prevent unauthorized users from installing extensions for all users, ensure your extension file is read only. Additionally, ensure that the following conditions are met:
- Every directory in the path is owned by the user root.
- Every directory in the path is assigned to the
admin
orwheel
group. - Every directory in the path isn't world writable.
- The path must also be free of symbolic links.
- User specific:
-
Linux
- User specific:
~/.config/microsoft-edge/External Extensions/
- All users:
/usr/share/microsoft-edge/extensions/
- User specific:
-
-
Depending on your scenario, copy the appropriate code that follows to your JSON file.
-
Applies to Linux only. If you install from a file, specify the location and version using
external_crx
andexternal_version
.{ "external_crx": "/home/share/extension.crx", "external_version": "1.0" }
-
Applies to macOS and Linux. If you install from an
update_URL
, specify the update URL usingexternal_update_url
.Copy the following code to your JSON file when installing from local
.crx
files on Linux only.{ "external_update_url": "http://myhost.com/mytestextension/updates.xml" }
-
Copy the following code to your JSON file when installing from the Microsoft Edge Add-ons website on macOS and Linux.
{ "external_update_url": "https://edge.microsoft.com/extensionwebstorebase/v1/crx" }
-
-
To install extensions for specific locales, list the supported locales using
supported_locale
. You may also specify parent locales to install your extension for all language locales that use that parent. For example, when using the parent localeen
, your extension installs for all English locales, such asen-US
,en-GB
, and so on. When users change their locale in their browser, externally installed extensions are uninstalled. To install your extension for any locale, do not usesupported_locales
.{ "external_update_url": "https://edge.microsoft.com/extensionwebstorebase/v1/crx", "supported_locales": [ "en", "fr", "de" ] }
-
Verify that your extension is installed in Microsoft Edge by navigating to
edge://extensions
.
Update and uninstall externally installed extensions
Microsoft Edge scans the metadata entries in the registry each time the browser starts, and makes any changes to the externally installed extensions.
To update your extension to a new version, update the version in the manifest file, and then update the version in the registry.
You may need to uninstall externally installed extensions, which were installed as part of a bundle of software that was previously installed on the machine. To uninstall your extension, remove your preferences JSON file or remove the key from the registry.
This work is licensed under a Creative Commons Attribution 4.0 International License.
Feedback
How To Create Crx File
Source: https://docs.microsoft.com/en-us/microsoft-edge/extensions-chromium/developer-guide/alternate-distribution-options
Posted by: daystol1941.blogspot.com
0 Response to "How To Create Crx File"
Post a Comment