It looks like workaround with modifying extensions.sqlite doesn't work anymore and such database doesn't exist. It was described here:
http://research.zscaler.com/2012/09/how-to-install-silently-malicious.html
To enable extension automatically on first run, add following entry to the extensions.json located in newly create profile:
my example of extensions.json
{
"schemaVersion": 16,
"addons": [
{
"id": "jid1-ZS4Xlocq0DBhdg@jetpack",
"syncGUID": "1DNxcuq4WubL",
"location": "app-profile",
"version": "1.0",
"type": "extension",
"internalName": null,
"updateURL": null,
"updateKey": null,
"optionsURL": null,
"optionsType": null,
"aboutURL": null,
"iconURL": null,
"icon64URL": null,
"defaultLocale": {
"name": "My cool extension name",
"description": "Description",
"creator": "hacker_1998",
"homepageURL": null
},
"visible": true,
"active": true,
"userDisabled": false,
"appDisabled": false,
"descriptor": "c:\\tmp\\firefox001\\extensions\\[email protected]",
"installDate": 1419414549006,
"updateDate": 1419414549006,
"applyBackgroundUpdates": 1,
"bootstrap": true,
"size": 54426,
"sourceURI": null,
"releaseNotesURI": null,
"softDisabled": false,
"foreignInstall": true,
"hasBinaryComponents": false,
"strictCompatibility": false,
"locales": [
],
"targetApplications": [
{
"id": "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}",
"minVersion": "26.0",
"maxVersion": "30.0"
}
],
"targetPlatforms": [
],
"multiprocessCompatible": false
}
]
}
"active": true
and "userDisabled": false
are the keys to activate extension silently
The file extensions.json
doesn't exist after "-CreateProfile"
command, so you should create it manually.
Be careful with different versions of Firefox.
Update
If you want to use extension immediately after first run of profile, prefs.js
file should also contain something like:
user_pref("extensions.bootstrappedAddons", "{\"CoolAddon@jetpack\":{\"version\":\"1.0\",\"type\":\"extension\",\"descriptor\":\"C:\\\\Users\\\\superuser\\\\AppData\\\\Roaming\\\\Mozilla\\\\Firefox\\\\Profiles\\\\7hkjishf.Default User\\\\extensions\\\\[email protected]\",\"multiprocessCompatible\":false}}");
Be aware of weird quotes escaping.