Adding Extensions using the Windows Registry

아직 자원봉사자들이 한국어로 이 기사를 번역하지 않았습니다. 가입해서 이 문서가 번역되는 일에 함께 해 주세요!

Introduction

This document explains how to "install" Firefox and Thunderbird extensions using the Windows Registry. This mechanism is designed to make it easier for third-party installers to register extensions with Firefox and Thunderbird.

Installation

Installation is performed by writing a Registry entry under one of the following keys:

HKEY_CURRENT_USER\Software\Vendor\Name\Extensions
HKEY_LOCAL_MACHINE\Software\Vendor\Name\Extensions

Where Vendor and Name are the values returned from the corresponding properties of nsIXULAppInfo. In Mozilla products, Vendor is "Mozilla", and Name is the short name of the product, e.g.:

HKEY_CURRENT_USER\Software\Mozilla\Firefox\Extensions
HKEY_CURRENT_USER\Software\Mozilla\Thunderbird\Extensions

Or on Windows 7/x64:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mozilla\Firefox\Extensions
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mozilla\Thunderbird\Extensions

The ID of the extension must be used as the name of the Registry entry. The Registry entry must have a type of REG_SZ, and its value must be an absolute path to the folder containing the extension (i.e., the location of the unpacked XPI). For example, to install the extension described in the Building an Extension article, create a Registry entry with name equal to sample@foo.net and value equal to c:\extensions\myExtension.

After the Registry entry is created, Firefox/Thunderbird will notice the change the next time it is launched. It is safe to modify the Registry keys while Firefox/Thunderbird is running.

If the same extension appears under both HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE, then the instance under HKEY_CURRENT_USER will be used. If the same extension appears in the user's profile directory (via manual install), then it will take precedence over any instances found in the Registry.

Uninstallation

Extensions installed using the Windows Registry may be uninstalled by simply removing their corresponding Registry entry. After the Registry entry is removed, Firefox/Thunderbird will notice the change the next time it is launched. It is safe to modify the Registry keys while Firefox/Thunderbird is running.

Updating

Firefox doesn't automatically notice changes to install.rdf at restart. This is because it checks the modification time of the add-on directory before checking install.rdf. You can force Firefox to notice changes by deleting and recreating the directory, or by touching the modification time of the directory.

Plugins

Plugins seem to follow a somewhat different system, at least with Firefox 9.0 on Windows 7.

Installation can be performed by creating any one of the following Registry keys:

HKEY_CURRENT_USER\Software\MozillaPlugins\plugin-id
HKEY_LOCAL_MACHINE\Software\MozillaPlugins\plugin-id

And on 64-bit Windows:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MozillaPlugins\plugin-id

Where plugin-id is the id property of the plugin (as in the install.rdf) - for example, x-myplugin@codewell.com

Note: It appears that plugins are loaded from all of these registry keys.

The key must have a value named Path with type REG_SZ, containing the fully-qualified path of the plugin's DLL. The key may have other values, for example Description, ProductName, Vendor, Version, and GeckoVersion.

See also

Document Tags and Contributors

Last updated by: spike0xff,