views:

43

answers:

2

My application installs my Firefox add-on (by copying an my.xpi to [FF_inst_dir]\extensions). This application interact with my FF add-on. This application periodically has updates (.xpi with new version). When my application is updating it does next:

  1. Remove folder and content [FF_inst_dir]\extensions\MyExtension
  2. Copy new my.xpi to [FF_inst_dir]\extensions

However, when I restart FF I see:

  1. FF ask me about install add-on. I agree.
  2. FF remove my.xpi (it's ok)
  3. FF remove folder and content [FF_inst_dir]\extensions\MyExtension I think that FF try to remove old plugin.

Thus, I havn't installed plugin.

How it can be installed correct?

A: 

What's wrong with Firefox's built-in installation & update methods? At it's simplest, you browse to a web page and download the .xpi to install.

Is there a reason you can't post your extension to the Mozilla Add-ons site? If so, that would get you both easy installation and automatic updates when you post new versions.

ewall
I have to install a new version of the add-on only simultaneously with the updating of my windows application.
cpp_fanatic
Ah, yes... that explains it.
ewall
+1  A: 

We aren't going to support dropping XPIs into the extensions directories like this in the future. Also please please do not use the application's extensions directory for this. Instead extract your extension's files into one of the shared locations or to a directory pointed to by the registry.

sdwilsh
As I can see, If I want to install extension for all users I have to use the second method.Yes ?So, how I can update installed extension ?If I replace old version of extension with new version what will happend ? Will FF ask all users about updating ?
cpp_fanatic
Either of the methods installs for all users or all profiles for a single user depending on the directory/registry key you use. Just update your extension's files in place and Firefox should detect the update on next startup.
sdwilsh