我一直试图在 Windows XP 和 Windows 7 主机上将 Firefox 固定到旧版本 (17.0.11 ESR)。我必须这样做来测试一些东西。我需要让 Firefox 停止自我更新。我知道建议进行更新以防止安全问题,但在这种情况下,我有一个运行虚拟机的专用环境。测试完成后,该虚拟机很容易被销毁……
以下内容涵盖了我的工作,特别是在 Firefox 17 ESR 上,但可以应用于任何较新版本的 FF。
我已经使用包含以下行的 INI 样式的安装首选项文件静默安装了 Firefox:
[Install]
;
; Remove the semicolon (;) to un-comment a line.
;
; The name of the directory where the application will be installed in the
; system's program files directory. The security
; context the installer is running in must have write access to the
; installation directory. Also, the directory must not exist or if it exists
; it must be a directory and not a file. If any of these conditions are not met
; the installer will abort the installation with an error level of 2. If this
; value is specified then InstallDirectoryPath will be ignored.
InstallDirectoryName=Mozilla Firefox 17.0.11esr
; The full path to the directory to install the application. The security
; context the installer is running in must have write access to the
; installation directory. Also, the directory must not exist or if it exists
; it must be a directory and not a file. If any of these conditions are not met
; the installer will abort the installation with an error level of 2.
; InstallDirectoryPath=c:\Program Files\Mozilla Firefox\
; By default all of the following shortcuts are created. To prevent the
; creation of a shortcut specify false for the shortcut you don't want created.
; Create a shortcut for the application in the current user's QuickLaunch
; directory.
QuickLaunchShortcut=false
; Create a shortcut for the application on the desktop. This will create the
; shortcut in the All Users Desktop directory and if that fails this will
; attempt to create the shortcuts in the current user's Start Menu directory.
DesktopShortcut=false
; Create shortcuts for the application in the Start Menu. This will create the
; shortcuts in the All Users Start Menu directory and if that fails this will
; attempt to create the shortcuts in the current user's Start Menu directory.
StartMenuShortcuts=false
; The directory name to use for the StartMenu folder (not available with
; Firefox 4.0 and above - see note below).
; note: if StartMenuShortcuts=false is specified then this will be ignored.
; StartMenuDirectoryName=Mozilla Firefox
; The MozillaMaintenance service is used for silent updates and may be used
; for other maintenance related tasks. It is an optional component.
; This option can be used in Firefox 16 or later to skip installing the service.
MaintenanceService=false
使用以下参数调用安装可执行文件:
/INI=c:\temp\17.0.11esr\unattended-install.ini
维护服务尚未安装且未运行。我已检查以确保无误。
我已按照
http://kb.mozillazine.org/Locking_preferences
创建锁定的默认值。
我创建了一个名为“local-settings.js”的文件,并将其放在 Firefox 安装目录的子目录“defaults\pref”中。该文件有以下两行:
pref("general.config.obscure_value", 0);
pref("general.config.filename", "mozilla.cfg");
我创建了名为“mozilla.cfg”的配置文件,并将其放在 Firefox 安装目录中。该文件包含以下几行:
//
lockPref("app.update.auto", false);
lockPref("app.update.enabled", false);
lockPref("app.update.service.enabled", false);
lockPref("extensions.update.enabled", false);
最后,我在 Firefox 安装目录的子目录“defaults\pref”中名为“channel-prefs.js”的文件中将发布渠道更改为“默认”。请参阅
http://kb.mozillazine.org/App.update.channel
了解更多信息。
验证 about:config 条目显示首选项确实已设置并锁定。信息窗口(帮助->关于 Firefox)显示“管理员已禁用更新”。选项高级选项卡中的相应字段变灰并处于停用状态。
安装并配置 Firefox 后,浏览器可以使用一段时间。然后“firefox.exe”将其图标更改为安装或设置文件图标。许多文件被复制或移动(?)并获得扩展名“.moz-delete” 和 “.moz-更新”。
除此之外,还会弹出一个通知窗口,内容如下:
Your computer must be restarted to complete a previous upgrade of Firefox. Do you want to reboot now?
问题是这个通知弹出,并且据我所知浏览器无法再可靠地使用。
有谁见过这种行为,可以向我解释到底发生了什么吗?为什么需要重启?最重要的是,我该如何防止这种情况发生?