Firefox是一种流行的网络浏览器,具有许多功能和附加组件。如果您是 IT 管理员并希望限制安装Firefox加载项或扩展,Windows 10 提供了允许您执行此操作的组策略设置。(Group Policy)以下是如何使用组策略编辑器( Group Policy Editor )或注册表编辑器(Registry Editor.)在 Firefox 中禁用附加安装。(disable add-on installation in Firefox )
组策略编辑器是(Group Policy Editor)Windows操作系统中必不可少的组件,可让您轻松地做各种事情。从启用或禁用各种功能到自定义外观,您可以在组策略编辑器(Group Policy Editor)的帮助下完成所有工作。默认情况下,您无法从组策略编辑器自定义(Group Policy Editor)Firefox。但是,如果您使用的是Firefox v60+ ,您可以直接从组策略编辑器管理(Group Policy Editor)Firefox的各种设置。在此之前,您需要将Firefox集成到Windows 组策略(Windows Group Policy)中。
如何在组策略中添加 Firefox
GitHub 上(GitHub)提供了一个开源策略模板,可帮助您将Firefox设置集成到组策略(Group Policy)中。从此处(here)下载(Download)Firefox的策略模板(Policy Template)。下载后,解压缩ZIP文件内容,您应该会找到一个名为windows的文件夹。
打开Windows文件夹并复制firefox.admx和mozilla.admx文件。接下来,导航到此路径:
C:\Windows\PolicyDefinitions
这里 C 是您的系统驱动器。或者,您可以按Win + R按钮并在命令框中输入:
%systemroot%\PolicyDefinitions
在PolicyDefinitions文件夹中,粘贴firefox.admx和mozilla.admx文件。
之后,打开windows > en-US文件夹。在这里,您应该找到名为firefox.adml和mozilla.adml的两个文件。复制这两个文件并粘贴到这里:
C:\Windows\PolicyDefinitions\en-US
有关详细信息,请参阅这篇文章 –如何将 Firefox 与 Windows 组策略集成。
使用组策略在(Group Policy)Firefox中禁用插件安装
执行上述步骤后,现在您可以做必要的事情了。要使用组策略编辑器允许或阻止从(Group Policy Editor)Firefox上的网站安装附加组件,请执行以下步骤 -
- 在任务栏(Taskbar)搜索框中搜索 gpedit.msc 。
- 单击单个结果。
- 导航到计算机配置中的(Computer Configuration)插件(Addons)。
- 双击允许从网站安装插件(Allow add-on installs from websites)设置。
- 选择禁用(Disabled)选项。
- 单击确定(OK)按钮。
打开组策略编辑器(Group Policy Editor)。Press Win + R,键入gpedit.msc并按Enter按钮。接下来,导航到此路径:
Computer Configuration > Administrative Templates > Mozilla > Firefox > Addons
在这里,您将获得一个名为Allow add-on installs from website(Allow add-on installs from websites)的设置。双击此选项并选择Disabled。

现在,每当您尝试安装附加组件时,您都会看到以下错误消息:

就这样!
阻止 Firefox(Prevent Firefox)从网站安装扩展
要防止Firefox使用(Firefox)注册表编辑器(Registry Editor)从网站安装扩展程序,请按照以下步骤操作 -
- 按Win+R。
- 键入regedit并点击Enter按钮。
- 单击是(Yes)选项。
- 转到HKEY_LOCAL_MACHINE中的策略(Policies)。
- 右键单击Policies > New > Key。
- 将其命名为Mozilla。
- 右键单击Mozilla > New > Key。
- 将其命名为火狐。(Firefox.)
- 右键单击Firefox > New > Key。
- 将其命名为InstallAddonsPermission。
- 右键单击它 >New > DWORD (32-bit) Value。
- 将其命名为Default。
按Win+R,键入regedit,按 Enter 按钮并单击 Yes 选项以在您的 PC 上打开注册表编辑器。之后,导航到以下路径-
HKEY_LOCAL_MACHINE\SOFTWARE\Policies
右键单击 Policies > New > Key,并将其命名为 Mozilla。然后,右键单击 Mozilla > New > Key,并将其命名为 Firefox。

之后,右键单击 Firefox > New > Key,并将其命名为 InstallAddonsPermission。

在InstallAddonsPermission项中,您必须创建一个REG_DWORD值。为此,右键单击它,选择 New > DWORD (32-bit) Value,并将其命名为 Default。

默认情况下,它带有 0值数据,您必须保留它以防止Firefox安装来自第三方网站的扩展程序。
与GPEDIT方法一样,您可以使用注册表编辑器(Registry Editor)来允许特定网站提供对Firefox浏览器的扩展。为此,您必须在InstallAddonsPermission下创建一个密钥并将其命名为 Allow。
然后,右键单击 Allow > New > String Value,并将其命名为 1。

双击 1,并将值(Value)数据设置为网站 URL。

单击 确定 (OK )按钮以保存更改。
就这样!就像说的那样简单。希望它有所帮助。
希望你觉得这个技巧很有用。(Hope you find this tip useful.)
How to Allow or Block Add-on installation on Firefox
Firefox іs a рopυlar web browser with lots of features and add-ons. If you are an IT administrator and want to restrict Firefox add-ons or еxtensions from being installеd, Windows 10 offers a Group Рolicy setting that allows you to do so. Here iѕ how to disable add-on installation in Firefox using Group Policy Editor or Registry Editor.
The Group Policy Editor is an essential component in Windows operating system that allows you to do various things with ease. From enable or disabling various features to customize the appearance, you can do everything with the help of Group Policy Editor. By default, you cannot customize Firefox from Group Policy Editor. However, if you are using Firefox v60+, you can manage various settings of Firefox right from Group Policy Editor. Before that, you need to integrate Firefox into Windows Group Policy.
How to add Firefox in Group Policy
There is an open-source policy template available on GitHub that helps you integrate Firefox settings in Group Policy. Download the Policy Template for Firefox from here. After downloading it, extract the ZIP file contents, and you should find a folder called windows.
Open the Windows folder and copy firefox.admx and mozilla.admx files. Next, navigate to this path:
C:\Windows\PolicyDefinitions
Here C is your system drive. Alternatively, you can press Win + R button and enter this in the command box:
%systemroot%\PolicyDefinitions
In the PolicyDefinitions folder, paste the firefox.admx and mozilla.admx files.
After that, open the windows > en-US folder. Here, you should find two files called firefox.adml and mozilla.adml. Copy these two files and paste them here:
C:\Windows\PolicyDefinitions\en-US
For a detailed read see this post – How to integrate Firefox with Windows Group Policy.
Disable add-on installation in Firefox using Group Policy
After carrying out the steps mentioned above, now you can do the needful. To allow or block add-on installation from websites on Firefox using Group Policy Editor, follow these steps-
- Search for gpedit.msc in the Taskbar search box.
- Click on the individual result.
- Navigate to Addons in Computer Configuration.
- Double-click on the Allow add-on installs from websites setting.
- Choose the Disabled option.
- Click the OK button.
Open Group Policy Editor. Press Win + R, type gpedit.msc and hit the Enter button. Next, navigate to this path:
Computer Configuration > Administrative Templates > Mozilla > Firefox > Addons
Here you will get a setting called Allow add-on installs from websites. Double-click on this option and select Disabled.

Now, whenever you try to install an add-on you will see this error message:

That’s all!
Prevent Firefox from installing extensions from websites
To prevent Firefox from installing extensions from websites using Registry Editor, follow these steps-
- Press Win+R.
- Type regedit and hit the Enter button.
- Click on the Yes option.
- Go to Policies in HKEY_LOCAL_MACHINE.
- Right-click on Policies > New > Key.
- Name it as Mozilla.
- Right-click on Mozilla > New > Key.
- Name it Firefox.
- Right-click on Firefox > New > Key.
- Name it as InstallAddonsPermission.
- Right-click on it > New > DWORD (32-bit) Value.
- Name it as Default.
Press Win+R, type regedit, press the Enter button and click on the Yes option to open the Registry Editor on your PC. After that, navigate to the following path-
HKEY_LOCAL_MACHINE\SOFTWARE\Policies
Right-click on Policies > New > Key, and name it as Mozilla. Then, right-click on Mozilla > New > Key, and call it as Firefox.

After that, right-click on Firefox > New > Key, and name it as InstallAddonsPermission.

In the InstallAddonsPermission key, you have to create a REG_DWORD value. For that, right-click on it, select New > DWORD (32-bit) Value, and name it Default.

By default, it comes with a value data of 0, and you have to keep it to prevent Firefox from installing extensions from third-party websites.
Like the GPEDIT method, you can use Registry Editor to allow a specific website to offer extensions to the Firefox browser. For that, you have to create a key under InstallAddonsPermission and name it as Allow.
Then, right-click on Allow > New > String Value, and name it as 1.

Double-click on 1, and set the Value data as the website URL.

Click the OK button to save the change.
That’s all! It is as simple as said. Hope it helped.
Hope you find this tip useful.