XPInstall API Reference:Examples
From MDC
[edit] Examples
Trigger Scripts and Install Scripts describes typical kinds of script that use the XPInstall API.
The following samples demonstrate some of the principal installation functions in the XPInstall API: