搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Are there any instructions for locking preferences in Firefox 8? I need to prevent users amending the proxy settings.

  • 2 回覆
  • 2 有這個問題
  • 4 次檢視
  • 最近回覆由 stewmang

more options

Created byteshifted mozilla.cfg file called by local-settings.js with line: lock_Pref("network.proxy.type", 0);

Whilst I can launch firefox with no errors, the proxy settings are still available.

Also is it possible to set user preferences and lock them within the same mozilla.cfg file?

Created byteshifted mozilla.cfg file called by local-settings.js with line: lock_Pref("network.proxy.type", 0); Whilst I can launch firefox with no errors, the proxy settings are still available. Also is it possible to set user preferences and lock them within the same mozilla.cfg file?

被選擇的解決方法

The name of the function is lockPref().
Also make sure that the first line is a comment line(//)

//
lockPref("network.proxy.type", 0);

See:

You can use these functions in mozilla.cfg:

defaultPref();  // set new default value
pref();         // set pref, but allow changes in current session
lockPref();     // lock pref, disallow changes
從原來的回覆中察看解決方案 👍 0

所有回覆 (2)

more options

選擇的解決方法

The name of the function is lockPref().
Also make sure that the first line is a comment line(//)

//
lockPref("network.proxy.type", 0);

See:

You can use these functions in mozilla.cfg:

defaultPref();  // set new default value
pref();         // set pref, but allow changes in current session
lockPref();     // lock pref, disallow changes
more options

As well as having an incorrect underscore in the function name I was also byteshifting the mozilla.cfg file. When I amended the function name and left the file in clear text the proxy settings were locked. It won't work with the byteshifted file. Thanks for your help.