为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

CFG file not applying anything after SCCM deployment

  • 11 个回答
  • 3 人有此问题
  • 1 次查看
  • 最后回复者为 pr0d

more options

Hi guys

I've successfully deployed Firefox ESR 52.5.0 to my test PC's using the guides online. Only problem is, it seems to ignore my CFG file and doesn't apply any of the settings at all. I've pasted the config I'm using, any suggestions?

// Disable updater lockPref("app.update.enabled", false); // make absolutely sure it is really off lockPref("app.update.auto", false); lockPref("app.update.mode", 0); lockPref("app.update.service.enabled", false);

// Disable Add-ons compatibility checking clearPref("extensions.lastAppVersion");

// Don't show 'know your rights' on first run pref("browser.rights.3.shown", true);

// Don't show WhatsNew on first run after every update pref("browser.startup.homepage_override.mstone", "ignore");

// Set default homepage - users can change // Requires a complex preference defaultPref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=https://google.com");

// Disable the internal PDF viewer pref("pdfjs.disabled", true);

// Disable the flash to javascript converter pref("shumway.disabled", true);

// Don't ask to install the Flash plugin pref("plugins.notifyMissingFlash", false);

//Disable plugin checking lockPref("plugins.hide_infobar_for_outdated_plugin", true); clearPref("plugins.update.url");

// Disable health reporter lockPref("datareporting.healthreport.service.enabled", false);

// Disable all data upload (Telemetry and FHR) lockPref("datareporting.policy.dataSubmissionEnabled", false);

// Set proxy settings to 'Auto-detect proxy settings for this network' lockPref("network.proxy.type", 4);

// Disable crash reporter lockPref("toolkit.crashreporter.enabled", false); Components.classes["@mozilla.org/toolkit/crash-reporter;1"].getService(Components.interfaces.nsICrashReporter).submitReports = false;

Hi guys I've successfully deployed Firefox ESR 52.5.0 to my test PC's using the guides online. Only problem is, it seems to ignore my CFG file and doesn't apply any of the settings at all. I've pasted the config I'm using, any suggestions? // Disable updater lockPref("app.update.enabled", false); // make absolutely sure it is really off lockPref("app.update.auto", false); lockPref("app.update.mode", 0); lockPref("app.update.service.enabled", false); // Disable Add-ons compatibility checking clearPref("extensions.lastAppVersion"); // Don't show 'know your rights' on first run pref("browser.rights.3.shown", true); // Don't show WhatsNew on first run after every update pref("browser.startup.homepage_override.mstone", "ignore"); // Set default homepage - users can change // Requires a complex preference defaultPref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=https://google.com"); // Disable the internal PDF viewer pref("pdfjs.disabled", true); // Disable the flash to javascript converter pref("shumway.disabled", true); // Don't ask to install the Flash plugin pref("plugins.notifyMissingFlash", false); //Disable plugin checking lockPref("plugins.hide_infobar_for_outdated_plugin", true); clearPref("plugins.update.url"); // Disable health reporter lockPref("datareporting.healthreport.service.enabled", false); // Disable all data upload (Telemetry and FHR) lockPref("datareporting.policy.dataSubmissionEnabled", false); // Set proxy settings to 'Auto-detect proxy settings for this network' lockPref("network.proxy.type", 4); // Disable crash reporter lockPref("toolkit.crashreporter.enabled", false); Components.classes["@mozilla.org/toolkit/crash-reporter;1"].getService(Components.interfaces.nsICrashReporter).submitReports = false;

被采纳的解决方案

All - I've resolved the issue

Thank you cor-el you've been most helpful!

Was a simple syntax error. Please be careful when copying and pasting config from 'how-to guides'. Two issues:

The quotes (") seemed to be in some sort of rich-text format so retyping those fixed the issue. Also %programfiles% will never work, simply be more specific and watch out for spaces and silly use of %variables% (we know where it installs to) so I used "C:\Program Files\Mozilla...." to copy the files to.

定位到答案原位置 👍 0

所有回复 (11)

more options
  • bump *
more options

Seems to be fine here. I see locked prefs if I use your mozilla.cfg file.

If none of the settings are applied and you also do not get an error message, either as an alert or in the Browser Console, then there might be a problem with the local-settings.js file in the "defaults/pref" folder where the channel-prefs.js file is located that specifies to use mozilla.cfg. You can test that by removing the mozilla.cfg file. You shouldn't be able to start Firefox (Failed to read the configuration file).

//
pref("general.config.filename", "mozilla.cfg");
pref("general.config.obscure_value", 0);
more options

Thank you for your reply cor-el, I was getting a bit lonely there!

The only difference in my local-settings.js file was that the two prefs were switched around on different lines.

I'll do a test deployment using your local-settings example above and post the results here

Also, How could one test their mozilla.cfg settings manually, i.e. dropping it into somewhere in %APPDATA% perhaps?

more options

Same issue!

It's popping up with what I want to import from what browser, no home page set, proxy not set to auto detecting - very confused

more options

Did you try to start the local-settings.js file with a comment line in case there are currently only these two lines?

Do you get the error message when mozilla.cfg is renamed?

more options

Yep, comment line first in local-settings.js

I tried changing the name of the mozilla.cfg file and no I don't get that error. I changed it in both the network share it lives on and from my local SCCM ccmcache folder (wasn't sure if that's what you meant?)

Thanks again

more options

Able to Send Firefox ESR 52.5.2 to test machine via SCCM today (new version). Same result, installed cleanly, doesn't seem to set home page or Auto-Detect Proxy which are two prefs in my CFG file.

more options

It looks that local-settings.js isn't working at all.

Is local-settings.js in the same folder as channel-prefs.js ?

more options

A-ha! Thank you we're getting somewhere.

No, the local-setting.js is not in the same folder as channel-prefs.js, as long as the folder your were talking about is:

C:\Program Files\Mozilla Firefox\defaults\pref

If I drop the local-settings.js in that folder and try running Firefox I then do get the error of 'Failed to read the configuration file....'

I'm confused as to what would stop this not copying that file during the SCCM deployment with all the correct files. Or at least it seems like all the correct files.

more options

Infact - none of the files copy across, when I copy them manually, it works fine with my config!

So I guess this is either a syntax error in my install.cmd file or a permissions issue?

Here's my install.cmd :


@echo off REM========================================== REM Install FireFox 52.5.2 ESR REM========================================== REM . REM Script Details: REM -------------- REM This script will: REM + silently install or upgrade Firefox 52.5.2 ESR WITHOUT Firefox being the default browser REM + Disables the 'Automatically check for updates' option REM + Disables the 'Always check to see if Firefox is the default browser on startup' option REM + Runs in private browsing by default REM + Disables the Import Wizard REM + Sets Proxy REM + Works for Windows XP / 7 /8 32-bit and 64-bit REM . REM=========================================== echo Installing Firefox - Please Wait. echo Window will close after install is complete REM Install Firefox "%~dp0Firefox Setup 52.5.2esr.exe" -ms REM Install 32-bit customisations if exist "%Program Files%\Mozilla Firefox\" copy /Y "%~dp0override.ini" "%Program Files%\Mozilla Firefox\browser\" if exist "%Program Files%\Mozilla Firefox\" copy /Y "%~dp0mozilla.cfg" "%Program Files%\Mozilla Firefox\" if exist "%Program Files%\Mozilla Firefox\" copy /Y "%~dp0local-settings.js" "%Program Files%\Mozilla Firefox\defaults\pref" REM Install 64-bit customisations if exist "%Program Files (x86)%\Mozilla Firefox\" copy /Y "%~dp0override.ini" "%Program Files (x86)%\Mozilla Firefox\browser\" if exist "%Program Files (x86)%\Mozilla Firefox\" copy /Y "%~dp0mozilla.cfg" "%Program Files (x86)%\Mozilla Firefox\" if exist "%Program Files (x86)%\Mozilla Firefox\" copy /Y "%~dp0local-settings.js" "%Program Files (x86)%\Mozilla Firefox\defaults\pref" REM Return exit code to SCCM exit /B %EXIT_CODE%

more options

选择的解决方案

All - I've resolved the issue

Thank you cor-el you've been most helpful!

Was a simple syntax error. Please be careful when copying and pasting config from 'how-to guides'. Two issues:

The quotes (") seemed to be in some sort of rich-text format so retyping those fixed the issue. Also %programfiles% will never work, simply be more specific and watch out for spaces and silly use of %variables% (we know where it installs to) so I used "C:\Program Files\Mozilla...." to copy the files to.