automatic install of xpi from xul app

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

automatic install of xpi from xul app


I have a specialized XUL appication (not a browser extenstion) in a
controlled network environment and I would like the application to
upgrade itself without any user interaction.

First a little background.  This is a stand-alone app that launches
using the -chrome parameter (so the normal firefox UI is not present).
The application talks to a remote server via TCP sockets as part of
it's normal operation.  It also checks for updates to itself with the
remote sever in a non-XUL standard way (using the sockets).  If it
finds an update, it downloads the XPI file over raw TCP sockets and
writes it to the local disk.

At this point, what I would like to do is simply invoke the
installation of the XPI file directly without any user interaction, but
i haven't figured out how to do this.  Using InstallTrigger.install
does not seem to work.  I simply get a -210 (USER_CANCELLED) passed to
the callback function.  So I gave up on using InstallTrigger.install.
Instead, my current solution to this is to just launch a firefox window
pointed at the XPI file and then close the app window.  This launches
the firefox UI with the "confirm XPI install" dialog displayed, the
user presses "install", the extension manager window is opened
requiring the user to close it and the extraneous firefox window.  Then
the app can be re-launched with the new version.

What I'm interested in doing is have the XPI installation be invoked
directly by my XUL app with no user interaction required.  I think
there's got to be some way.  Any guidance?


dev-tech-xpinstall mailing list
[hidden email]