Plugin scanning

来自WordPress中文文档
跳转至: 导航搜索

On Windows systems, Mozilla applications will scan for common plugins at startup, such as Java, Windows Media Player and others, in locations external to the installation directory plugins folder. This article identifies the related preferences that control this behavior and explains how these settings can be modified.

Disabling the plugin scan

Modify these preferences by editing configuration for the user profile. This can be done via about:config, as follows:

  • To prevent scanning the Netscape Navigator 4.x directory for plugins, add a new boolean preference named plugin.scan.4xPluginFolder and set the value to "false".
  • To prevent scanning the directories specified in the Windows registry for PLIDs, modify the plugin.scan.plid.all preference value from "true" to "false". Plugins in this category include RealPlayer, as well as Flash starting with version 9.0 r45 [1].
  • To prevent scanning the Quicktime, SunJRE, WindowsMediaPlayer or Acrobat installation directories, find the related preference and increase the value of the minimum version to a number greater than the version you have installed. For example:
    • To stop the plugin scan for Java plugins, modify the value of the preference plugin.scan.SunJRE from "1.3" to 1.9 [2]
    • To stop the Windows Media Player plugin scan, modify the value of the preference plugin.scan.WindowsMediaPlayer from "7.0" to 19.0 [3].

To return to the default settings, reset the modified preferences via about:config. Note that these changes will affect the current profile and will need to be repeated for any other user profiles.

Add-on Manager

Starting in Firefox 3 and SeaMonkey 2, you can disable individual plugins via "Tools -> Add-ons (Add-on Manager) -> Plugins", by selecting the plugin and clicking "Disable" as shown here. Since there is no separate plugin.scan preference for each plugin detected via the Windows registry, the Addon Manager provides an easy way to manage these plugins. Note that any plugin disabled in the Add-on Manager will no longer be listed in about:plugins until you re-enable it in the Add-on Manager.

For example, if you have Google software such as Google Chrome or Google Earth installed, the Google Update plugin is also installed. The Google Update plugin is then detected in your Mozilla browser via plugin scanning because its directory is specified in the Windows registry for PLIDs. You can disable the Google Update plugin in Firefox 3 using the Add-on Manager. [4] [5]

Related preferences

Plugin scanning is controlled by the preferences listed below, which is presented for information only. Although it is possible to stop the plugin scan for for all user profiles by editing the "all.js" file, as mentioned here, this is not recommended since modifications made to all.js will be lost at the next program upgrade that replaces the file with a newer version.

Any line preceded by a double slash ("//") is a "comment"; the actual preference lines begin with pref and end with a semi-colon.

In versions since Firefox 0.9 and Mozilla Suite 1.7.a [6] these preference settings are contained in the "all.js" file, located in the <installation directory>\greprefs\ subfolder in Firefox and in SeaMonkey 1.1 or above (e.g., C:\Program Files\Mozilla Firefox\greprefs\all.js) or in the GRE\<buildID>\greprefs\ subfolder in SeaMonkey 1.0.x and Mozilla Suite (e.g., C:\Program Files\Common Files\mozilla.org\GRE\1.8.0.7_2006091003\greprefs\all.js).

// Locate Java by scanning the Sun JRE installation directory with a minimum version
// Note: Does not scan if security.enable_java is not true
pref("plugin.scan.SunJRE", "1.3");
// Locate plugins by scanning the Adobe Acrobat installation directory with a minimum version
pref("plugin.scan.Acrobat", "5.0");
// Locate plugins by scanning the Quicktime installation directory with a minimum version
pref("plugin.scan.Quicktime", "5.0");
// Locate and scan the Window Media Player installation directory for plugins with a minimum version
pref("plugin.scan.WindowsMediaPlayer", "7.0");
// Locate plugins by the directories specified in the Windows registry for PLIDs
// Which is currently HKLM\Software\MozillaPlugins\xxxPLIDxxx\Path
pref("plugin.scan.plid.all", true);
// Controls the scanning of the Navigator 4.x directory for plugins
// When pref is missing, the default is to pickup popular plugins such as
// Flash, Shockwave, Acrobat, and Quicktime. If set to true, ALL plugins
// will be picked up and if set to false the scan will not happen at all
//pref("plugin.scan.4xPluginFolder", false); 

Note that the last preference line listed above is "commented out" by the double slashes ("//"), causing the preference to be missing, which enables the Netscape Navigator 4.x plugin scan.

See also

External links

Related bug reports