[solved] How to activate addon automatically

Post Reply
kranzfr3d
Posts:7
Joined:Fri Oct 31, 2014 4:16 am
[solved] How to activate addon automatically

Post by kranzfr3d » Fri Oct 31, 2014 4:36 am

Hello,

I'm new to FM - so "hello to everyone" :D

I created a new package with FMFirefoxCE-32.0, added some certificates.
After install onto lab-environment, either the addon "certificates for custom" is disabled by default or the labuser (with an empty profile) is asked to activate it.
Probaly the certificates are "installed by" that addon?

How can I force to enable that addon "certificates for custom" without user-interaction (=automatically)?
Are there GPOs or CFG-Additions?

Thank you very much for your help :-)
Last edited by kranzfr3d on Wed Nov 05, 2014 1:54 am, edited 1 time in total.

marble01
Posts:9
Joined:Thu Jul 01, 2010 9:53 am

Re: Certificate added - how to activate addon automatically?

Post by marble01 » Fri Oct 31, 2014 8:29 am

Here is how I accomplished adding certificates to Firefox:

These steps will deploy the certificate for new Firefox users only. If a user already has a Firefox profile they will not get the cert8.db
-Added Certificates to the default cert8.db
-Created an admin install point of the Firefox MSI
-Copied the cert8.db to <Admin Install Point>\Program Files\Mozilla Firefox\browser\defaults\profile
-Add the cert8.db file to the MSI

To deploy the certificate to existing Firefox profiles I used Firefox's certutil (https://developer.mozilla.org/en-US/doc ... s_certutil).
-Compiled certutil
-Created a MSI installation for certutil
-Added a user logon script that checks for a Firefox profile for the user and if it exists then run certutil to import the certificate into their existing cert8.db

kranzfr3d
Posts:7
Joined:Fri Oct 31, 2014 4:16 am

Re: Certificate added - how to activate addon automatically?

Post by kranzfr3d » Mon Nov 03, 2014 2:40 am

Hello marble01,

thanks for the great idea - this was my idea too, if we had not paid for the frontmotion firefox packager.

We think FrontMotion needs to show us a way, how the addon "certificates for custom" is enabled by default, even if a firefox-profile exists or not.


Thank you very much for your help :-)

kranzfr3d
Posts:7
Joined:Fri Oct 31, 2014 4:16 am

Re: Certificate added - how to activate addon automatically?

Post by kranzfr3d » Wed Nov 05, 2014 1:54 am

Hello everyone,

I found "my" solution using the CFG Addition in package system:
pref("extensions.autoDisableScopes",11);

The scopes are explained here very good:
http://mike.kaply.com/2012/02/21/unders ... on-scopes/
The default scope is 15, is you want something other than the default, you have to substract the mentioned value (in my case: 4) from default.

The addon certificate addon "certificates for custom" is automatically activated, because the value 11 says:
4 (SCOPE_APPLICATION)
This is the application scope. This means any add-on that is in the extensions directory where the executable is located.

Hope it helps


greetings

trockenasche
Posts:26
Joined:Tue Nov 22, 2011 11:46 am

Re: [solved] How to activate addon automatically

Post by trockenasche » Wed Nov 05, 2014 6:01 am

Hey,
You will ran in two problems:

1. If You upgrade/update Firefox with the MSI package it will delete every time all files and folder within the Program Files\Mozilla Firefox and there for all your addons.
Best way is to deploy your addon with the registry method https://developer.mozilla.org/en-US/doc ... s_Registry
With this way you can deploy your addon for example to Program Files\Addon-Name
Don't forget to set the extensions.autoDisableScopes=7

2. you need to set pref("shownSelectionUI" true); otherwise the addon get disabled after Firefox update/upgrade.
The preference is for disabling the addon compatibility wizard. This wizard disable all 3rd party addon that are not installed by the user.

kranzfr3d
Posts:7
Joined:Fri Oct 31, 2014 4:16 am

Re: [solved] How to activate addon automatically

Post by kranzfr3d » Mon Nov 10, 2014 7:06 am

Hello trockenasche,

thanks for sharing your experiences with me. I'm very glad (and proud :wink: ) aboud this!

to 1: for now, its ok to delete the addons in "Program Files\Mozilla Firefox", because the user-stored addons are located in "%APPDATA%\Mozilla\Firefox\Profiles\randomname.default\"
are there any other problems i will ran to? I want to leave the user-site as it is for now and the future (addons included), only the program-site (and addons/plugins) should be touched.

i think for now, this is a good method to "inject" some addons for "special user groups".


to 2: thats a very good and important pref - thanks for that!


off-topic: are there any special (german) sites to receive more information round about firefox hardcore "pref-matic"?

ffceesr
Posts:1
Joined:Fri Nov 14, 2014 2:19 am

Re: [solved] How to activate addon automatically

Post by ffceesr » Fri Nov 14, 2014 2:29 am

Hey,

I have a problem and hope you guys can help me with it. :) My problem is that add-ons are not automatically activated and the users have to manually activate it.

I used the settings below:

pref("extensions.autoDisableScopes", 0);

pref("extensions.enabledScopes", 15);

pref("extensions.shownSelectionUI", true);


The add-ons are installed into the extensions folder in program files\mozilla firefox CE\browser\

Thanks in advance!

trockenasche
Posts:26
Joined:Tue Nov 22, 2011 11:46 am

Re: [solved] How to activate addon automatically

Post by trockenasche » Fri Nov 14, 2014 3:52 am

Where did you set your preferences? and which config file/path did you use?
And have you checked about:config if your settings get applied?

farmersWPSD
Posts:14
Joined:Tue Dec 04, 2012 9:15 pm

Re: Certificate added - how to activate addon automatically?

Post by farmersWPSD » Fri Nov 21, 2014 3:34 pm

marble01 wrote:Here is how I accomplished adding certificates to Firefox:

These steps will deploy the certificate for new Firefox users only. If a user already has a Firefox profile they will not get the cert8.db
-Added Certificates to the default cert8.db
-Created an admin install point of the Firefox MSI
-Copied the cert8.db to <Admin Install Point>\Program Files\Mozilla Firefox\browser\defaults\profile
-Add the cert8.db file to the MSI

To deploy the certificate to existing Firefox profiles I used Firefox's certutil (https://developer.mozilla.org/en-US/doc ... s_certutil).
-Compiled certutil
-Created a MSI installation for certutil
-Added a user logon script that checks for a Firefox profile for the user and if it exists then run certutil to import the certificate into their existing cert8.db
Do you mind giving a little more info on your process? I have never used CERTUTIL or created an administrative install. Is the administrative install even needed unless you want the certs to be installed without a reboot? I'm assuming once rebooted, everything would be fine with just CERTUTIL?

marble01
Posts:9
Joined:Thu Jul 01, 2010 9:53 am

Re: Certificate added - how to activate addon automatically?

Post by marble01 » Mon Nov 24, 2014 10:40 am

farmersWPSD wrote:
marble01 wrote:Here is how I accomplished adding certificates to Firefox:

These steps will deploy the certificate for new Firefox users only. If a user already has a Firefox profile they will not get the cert8.db
-Added Certificates to the default cert8.db
-Created an admin install point of the Firefox MSI
-Copied the cert8.db to <Admin Install Point>\Program Files\Mozilla Firefox\browser\defaults\profile
-Add the cert8.db file to the MSI

To deploy the certificate to existing Firefox profiles I used Firefox's certutil (https://developer.mozilla.org/en-US/doc ... s_certutil).
-Compiled certutil
-Created a MSI installation for certutil
-Added a user logon script that checks for a Firefox profile for the user and if it exists then run certutil to import the certificate into their existing cert8.db
Do you mind giving a little more info on your process? I have never used CERTUTIL or created an administrative install. Is the administrative install even needed unless you want the certs to be installed without a reboot? I'm assuming once rebooted, everything would be fine with just CERTUTIL?

Mozilla Certutil (not the same as Microsoft Certutil) is a utility that allows one to modify a cert8.db or key3.db. I use the certutil to open up a user's cert8.db, from their Firefox profile, and add add a certificate. This process is done via logon script.
The admin install point allows me to deploy an already modified cert8.db. When a user generates a new Firefox profile it copies the cert8.db file (which includes the required certificate). This helps to make sure that a user always has the required certificate installed for Firefox.

Post Reply