Marja | 9 Feb 2005 15:03

Re: how to properly do an automatic uninstall?

HJ wrote:
> <snip/>
> 
>> HJ wrote:
>>
>>> I hope this helps:
>>>
>>>
http://lxr.mozilla.org/aviarybranch/source/toolkit/mozapps/extensions/public/nsIExtensionManager.idl#73 
>>>
>>> /HJ
>>
>>
>>
>> Thanks HJ!
>>
>> This seems to be what I need. I tried the following:
>>
>> var
>>   ext = Components.classes[" <at> mozilla.org/extensions/manager;1"], 
>>                              ext = 
>> ext.getService(Components.interfaces.nsIExtensionManager);
> 
> 
> That should work, see also:
>
http://lxr.mozilla.org/aviarybranch/source/toolkit/mozapps/extensions/content/extensions.js#119 
> 
> 
> Note the 'aviarybranch' i.e. you are using Mozilla Firefox, right?
> 
> /HJ

I was testing it with Mozilla. I hope the uninstall would work in both 
but especially in Mozilla as it does not offer anything like that.

If these are XPCOM components isolating uninstall functionality wouldn't 
they work with Mozilla too? But first I need to find the whereabouts of 
the components and copy them to my system. Maybe I need to copy the 
install.rdf in addition to the components.

In the end I think in both Mozilla and Firefox it is just deleting some 
files and editing the installed..txt file. But maybe I'm wrong.

Oh, and then there is the Mozilla update problem. Users may loose their 
toolbars and menus when uninstalling and be really mad for the extension 
maker. But if they wait long enough everything suddenly starts working 
again. But I guess the uninstall could somehow ask for immediate update 
and avoid the whole problem.

Marja

Gmane