Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

differences and interchangibility of pref(); user_pref(); and lockPref();

  • 1 reply
  • 0 have this problem
  • 7 views
  • Last reply by Mike Kaply

more options

Firefox is used on Windows 11 Enterprise. There is a firefox.cfg in the installation directory (and an autoconfig.js in the ./defaults/pref sub-directory). The firefox.cfg targets an autoconfigfile.js. This setup is recommended here: [firefox using autoconfig"]

  1. In the support article´s example, the firefox.cfg uses a pref(); expression. Is it possible to use a lockPref(); expression instead?
  2. What is the result of either using pref(); expressions or user_pref(); expressions in the remoted autoconfigfile.js? Are both of them possible, especially while the firefox.cfg uses lockPref(); expressions instead of pref();?

I hope that somesone can help with one of these questions. Thanks a lot!

Firefox is used on Windows 11 Enterprise. There is a ''firefox.cfg'' in the installation directory (and an ''autoconfig.js'' in the ./defaults/pref sub-directory). The ''firefox.cfg'' targets an ''autoconfigfile.js''. This setup is recommended here: [[https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig#w_centralized-management|"customizing firefox using autoconfig"]] # In the support article´s example, the ''firefox.cfg'' uses a '''pref();''' expression. Is it possible to use a '''lockPref();''' expression instead? # What is the result of either using '''pref();''' expressions or '''user_pref();''' expressions in the remoted ''autoconfigfile.js''? Are both of them possible, especially while the ''firefox.cfg'' uses '''lockPref(); '''expressions instead of '''pref();'''? I hope that somesone can help with one of these questions. Thanks a lot!

Modified by fortuna90

All Replies (1)

more options

The cfg files and a regular pref file are two completely different things (event though the syntax looks similar at first glance)

The CFG file is running Javascript and calling functions to execute the various things (like lockPref).

The autoconfigfile.js is a specific JS file format used for storing preferences.

To answer your specific questions.

1. Per that article, you can use any of the functions in a CFG file like pref, lockPref, defaultPref, etc. 2. In a regular JS file, pref sets a default pref (defaultPref in an autoconfig file) and user_pref sets a user preference (pref in an autoconfig file)

Helpful?

Ask a question

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.