# Detecting programatically whether addon installed on firefox

**URL:** <https://discourse.mozilla.org/t/detecting-programatically-whether-addon-installed-on-firefox/6699>\
**Category:** Development\
**Created:** [January 24, 2016, 3:19am UTC](https://discourse.mozilla.org/t/detecting-programatically-whether-addon-installed-on-firefox/6699 "2016-01-24T03:19:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![praneet](https://avatars.discourse-cdn.com/v4/letter/p/e9a140/32.png) [@praneet](https://discourse.mozilla.org/u/praneet)\
**Post date:** [January 24, 2016, 3:19am UTC](https://discourse.mozilla.org/t/detecting-programatically-whether-addon-installed-on-firefox/6699/1 "2016-01-24T03:19:32Z")

</div>

I would like to know 'How can we detect whether an addon/extension is installed on Mozilla Browser from our application? If suppose someone uninstalls it directly from the browser, then how our application come to know it.

Can it be possible using php,javascript or jquery?

---

<div class="post-metadata">

**Author:** ![Lithopsian](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@Lithopsian](https://discourse.mozilla.org/u/Lithopsian)\
**Post date:** [January 24, 2016, 1:00pm UTC](https://discourse.mozilla.org/t/detecting-programatically-whether-addon-installed-on-firefox/6699/2 "2016-01-24T13:00:24Z")

</div>

You can use AddonManager for this. You can query whether a known extension is installed, and also use an AddonListener to be notified about changes.

> **[Add-on Manager](https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Add-on_Manager)**
>
> The Add-on Manager is responsible for managing all of the add-ons installed in the application. Through its APIs information about all installed add-ons can be retrieved and new add-ons can be installed. The APIs are designed to be generic and...

You may not have sufficient privileges to do this from a web application. It isn’t considered a Web API. For obvious reasons, direct access to things like addons is not normally allowed from the web.

---

<div class="post-metadata">

**Author:** ![noitidart](https://avatars.discourse-cdn.com/v4/letter/n/9f8e36/32.png) [@noitidart](https://discourse.mozilla.org/u/noitidart)\
**Post date:** [January 24, 2016, 3:19pm UTC](https://discourse.mozilla.org/t/detecting-programatically-whether-addon-installed-on-firefox/6699/3 "2016-01-24T15:19:40Z")

</div>

If you are trying to identify if the addon is installed from outside the Firefox environment, you can do so by reading from the file system.

You would open the extensions.json in the profile folder, for instance like this:

```
C:\Users\Noitidart\AppData\Roaming\Mozilla\Firefox\Profiles\392laks.default\extensions.json

```

Then parse that json, it is an array of objects, find the entry with the addon id you are looking for. If it’s not there, its not installed. If its there but `userDisabled` is true, then the user disabled it. If `appDisabled` is true then the addon is likely not compatible with the last version of firefox they ran in. `softDisabled` true means the user clicked uninstall but 1) if addon is a non-restartless addon - then it is waiting for user to restart browser and then it will be uninstalled 2) if the addon is restartless - then it is waiting for user to close the addon manager tab then it will be uninstalled completely

If you need help identifying the path to profiles, you should go to the `profiles.ini` this is always located in the user application data dir. That holds infos on the profiles.
