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
The location to use varies depending on whether you want to install the extension for all users of the computer or just the current user and.
For the current user use the following registry key:
HKEY_CURRENT_USER\Software\Vendor\Name\Extensions
For all users of the computer you should add to both of the following registry keys. This is because the application will read from a different registry key depending on the architecture of the application and the OS.
HKEY_LOCAL_MACHINE\Software\Vendor\Name\Extensions HKEY_LOCAL_MACHINE\Software\Wow6432Node\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 for all users:
HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Firefox\Extensions HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mozilla\Firefox\Extensions HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Thunderbird\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 [email protected]
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 times of the add-on's files before reloading install.rdf
. You can force Firefox to notice changes by changing the modification time of install.rdf
to something newer than any file from the old extension including the extension's directory itself. Since this is often created by the installing application this can be quite recent. The most reliable method is to force the modification time of install.rdf
to be the current time when installing new files.
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, [email protected]
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.