X
Tippen Sie hierhin, um die Version dieser Website für Mobilgeräte aufzurufen.

Hilfeforum

Setup defaults preferences for Adblock Plus data and patterns in prefs.js

Veröffentlicht

Hi,

I'd like to distribute Firefox with some pre-installed preferences (including Adblock Plus settings) in my organization.

Fallowing preferences setup via prefs.js don't work:

   pref("extensions.adblockplus.data_directory", "\\\\" + getenv("USERDNSDOMAIN") + "\\App\\Firefox\\ESR\\adblockplus\\data\\")
   pref("extensions.adblockplus.patternsfile", "\\\\" + getenv("USERDNSDOMAIN") + "\\App\\Firefox\\ESR\\adblockplus\\patterns.ini");


Is Firefox allowing to use USERDNSDOMAIN or USERDOMAIN varibles in prefs.js? Is this syntax OK? Could someone help me to figure why it is not working?

Hi, I'd like to distribute Firefox with some pre-installed preferences (including Adblock Plus settings) in my organization. Fallowing preferences setup via prefs.js don't work: pref("extensions.adblockplus.data_directory", "\\\\" + getenv("USERDNSDOMAIN") + "\\App\\Firefox\\ESR\\adblockplus\\data\\") pref("extensions.adblockplus.patternsfile", "\\\\" + getenv("USERDNSDOMAIN") + "\\App\\Firefox\\ESR\\adblockplus\\patterns.ini"); Is Firefox allowing to use USERDNSDOMAIN or USERDOMAIN varibles in prefs.js? Is this syntax OK? Could someone help me to figure why it is not working?

Mehr Details zum System

Installierte Plugins

  • Shockwave Flash 12.0 r0
  • Next Generation Java Plug-in 10.51.2 for Mozilla browsers
  • NPRuntime Script Plug-in Library for Java(TM) Deploy

Anwendung

  • User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0

Weitere Informationen

guigs 1072 Lösungen 11697 Antworten
Veröffentlicht
All I can find is: [https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/A_brief_guide_to_Mozilla_preferences#Preferences_files] This is the prepackager [http://benjamin.smedbergs.us/release-repackager/] ?https://addons.mozilla.org/en-US/firefox/addon/gpo-for-firefox/? The original links are broken here [https://wiki.mozilla.org/Deployment:Deploying_Firefox] I do not know if they still work. The old bug was never finished [https://bugzilla.mozilla.org/show_bug.cgi?id=267888] What is the error that you are receiving?

Geändert am von guigs

Fragesteller

My problem has nothing to do with GPO, I did put my settings in CFG file.

As I describe in first post - I did set file and folder location for data and patterns of Adblock Plus in CFG file. AS long as I set absolute UNC path Adblock works fine, but as soon as I change path to use USERDOMAIN varible in path Adblock Plus can't find location of its files.

When I print USERDOMAIN varible in command line, it is displayed correctly. So I am almost sure it is something wrong with parsing config file by Firefox.

My problem has nothing to do with GPO, I did put my settings in CFG file. As I describe in first post - I did set file and folder location for data and patterns of Adblock Plus in CFG file. AS long as I set absolute UNC path Adblock works fine, but as soon as I change path to use USERDOMAIN varible in path Adblock Plus can't find location of its files. When I print USERDOMAIN varible in command line, it is displayed correctly. So I am almost sure it is something wrong with parsing config file by Firefox.
cor-el
  • Top 10 Contributor
  • Moderator
17530 Lösungen 158508 Antworten
Veröffentlicht

You can't use getenv in a prefs.js file, but you can use it in a mozilla.cfg auto-configuration file.

You can't use getenv in a prefs.js file, but you can use it in a mozilla.cfg auto-configuration file. *http://mike.kaply.com/2012/03/16/customizing-firefox-autoconfig-files/