Parts of this page show the use of the XPInstall API. The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension.

Methods

addDirectory
Unpacks an entire subdirectory.
addFile
Unpacks a single file.
alert
Displays an Alert dialog box with a message and an OK button.
cancelInstall
Aborts the installation of the software.
confirm
Displays a Confirm dialog box with the specified message and OK and Cancel buttons. Also allows custom button labels and a checkbox.
deleteRegisteredFile
Deletes the specified file and its entry in the Client Version Registry.
execute
Extracts a file from the XPI file to a temporary location and schedules it for later execution.
gestalt
Retrieves information about the operating environment. (Mac OS only)
getComponentFolder
Returns an object representing the directory in which a component is installed.
getFolder
Returns an object representing a directory, for use with the addFile method.
getLastError
Returns the most recent non-zero error code.
getWinProfile
Constructs an object for working with a Windows .ini file.
getWinRegistry
Constructs an object for working with the Windows Registry.
initInstall
Initializes installation for the given software and version.
loadResources
Returns an object whose properties are localized strings loaded from the specified property file.
logComment
Add a comment line to the install log.
patch
Applies a set of differences between two versions.
performInstall
Finalizes the installation of the software.
refreshPlugins
Refreshes the list of plug-ins registered for the browser.
registerChrome
Registers chrome with the chrome registry.
resetError
Resets a saved error code to zero.
setPackageFolder
Sets the default package folder that is saved with the root node.

Document Tags and Contributors

 Contributors to this page: Sheppy, trevorh, Daniel Veditz, Fredchat, Jens.B, Rod Whiteley
 Last updated by: Sheppy,