Installing WebExtension for Firefox from GPO - firefox

I would like to install a WebExtension for Firefox for multiple computers.
I have tried adding in regedit a key named with the uuid of my WebExtension and the path to the xpi "...\Mozilla Firefox\browser\extensions{uuid}.xpi". The key is in HKEY_CURRENT_USER\Software\Mozilla\Firefox\Extensions\
I have then restarted Firefox but it does not ask to install the WebExtension or installed it.
Am I missing something ?
Thanks.

To install the extension. It should be present on your physical Drive. If you want to a Web-extension for Firefox for multiple computers. You can try and create a batch file that automatically install extension on one click or you can simply use Dropbox across the computers and Sync Your Profile Folder where Firefox files are present with that extension installed.

The extension file (.xpi file) is present. It is located in "C:...\Mozilla Firefox\browser\". I have already created a .msi file to deploy it on multiple computers. The only thing left is that after restarting Firefox, it does not detect that I have set a key in regedit to install a new extension.

Related

Automated Addon, Settings Installation for Firefox with Ansible

I am currently trying to install firefox addons with Ansible.
I found a role for ansible on ansible galaxy, I fixed to work with the latest ansible version (minor python2/3 issue):
Fixed version:
https://github.com/cyborg-x1/ansible-firefox
The Ansible role downloads the xpi file and puts it in the extension folder.
But two issues:
1. Issue
If the .mozilla/firefox/randomString.default-release folder does not exist, it creates it, but then Firefox on the first start creates another directory .mozilla/firefox/randomString.default-release-1 and does not use the directory except selected by profile manager.
2. Issue
The addons are placed in the extension folder, but when starting up they are disabled.
Anoying to do that for > 6 addons.
I tried to to see what changes when I enable the addons by putting a git repo over the ~/.mozilla folder. Multiple files are created the main responsible is a json one where it puts the rights. If I copy that file and just put that in later, it seems NoScript works, but not uMatrix which does not work at all: button with no icon, no reaction when pressing the button.
I also found the way to use /usr/share/mozilla to install addons globally. Problem is, this way, according to documentation, requires to have the addon uid, but that file mentioned (don't recall the name atm) is not present in latest addons of Firefox. So I can not put the appropriate folder name for the addon. Just placing the xpi files there, does nothing at all.
Also on the mozilla docs there is a way mentioned with -install-addon-globally which I tried with firefox executable and the addon file -- no success.
Any Ideas how to solve those issues?
Something that I just need to write in there and they run their installation stuff, what actually seems to be missing when just placing that file.
The first issue could be solved, if I just could run firefox once and close it, then the folder would be there and I can write into it but there is no command line option which terminates firefox after starting, so for Ansible I would need timeout to kill it if it does not return - (I think that's an ugly solution btw)
Any ideas or suggestions?
Thanks for any help!
You can create a firefox installer bundled with the extensions:
https://support.mozilla.org/en-US/kb/deploying-firefox-with-extensions

How to install unpacked extension in firefox & chrome?

i have created extension by using crossrider they gave me xpi & crx file which i extracted and want to install manually by copying data to the browser's extension path.
I've read & tried many posts regarding this but they are not helpful because i think some posts are old & not able to find target paths & registry.
like in many posts they say create the following key in the registry here
32-bit Windows: HKEY_LOCAL_MACHINE\Software\Google\Chrome\Extensions
but i couldn't find that on my windows registry & i am using 32bit.
i want something like i copy my extension data to the browser's extension directory & inject some registry value thats all. if it possible then How?
For firefox just add the xpi or unpacked folder to the profile folder. No need for registry so its cross platform.
It can't be automatic as spyware would be all over that. After placing xpi in the extensions folder of the profile, on next startup of Firefox it will prompt saying it found an unauthorized by user add-on, and gives user a chance to enable it, or keep it disabled.
If you want to do it without startup, just launch the file path to the xpi or unpacked folder (if unpacked folder doesnt work, then point it to the install.rdf) in the browser, user will be prompted if they want to install.
There are some registry options though: Install Firefox extension using Windows registry
In Chrome, it's no longer possible to add an extension programmatically on Windows unless the extension is actually published in the Store.
This is for security reasons: previous registry-based (and otherwise) methods were open to malware abuse.
If your extension is published in the store, you can add it semi-automatically via registry. The user will still be asked whether to enable it on the next load.
You can also install extensions silently using Enterprise policy (only if the machine is part of a Windows domain and you have admin rights on the domain policy), on other OSes, or load it unpacked for testing with the --load-extension command line switch (will not persist after Chrome is restarted).
In Chrome go to
chrome://extensions
Enable Developer Mode at the top and click on the button to load an extracted extension.

Is it necessary to pack firefox extension files into an xpi even on development?

I am developing an extension for Mozilla Firefox. Is there any way in which I can develop without packing the files into an xpi for every change I make (like in Chrome)?
Yes. To do this, first close Firefox.
Then create a file in your profiles extensions directory that has the same ID as your extension.
In that file, you should place the fully qualified path to where you are developing your extension. In particular, to the same directory as the install.rdf.
When Firefox is restarted, it should ask you if you want to install the extension. Once you've done that, the extension will run from the local copy. After you make changes, you just need to close and restart the browser.
For more information, check this page out:
https://developer.mozilla.org/en-US/docs/Setting_up_extension_development_environment
I also recommend you install the Developer Assistant - https://addons.mozilla.org/en-US/firefox/addon/extension-developer/ - which will set some prefs that make it easier to create Firefox extensions.

Installing firefox extension for all users [system wide installation]

I have written a Firefox extension which is packed as an .xpi file. I want to install this extension for all users. Somewhere I found that we can achieve this by putting the file in the Mozilla\Extensions folder, then the extension will be available to all users.
But the problem is after installing the extension, on first launch of Firefox
for an administrator, a pop-up tab will appear to ask whether to enable or disable the extension, but
for the non-admin user, no pop-up will be there and the extension will be disabled for them initially.
Is it possible to notify every user by launching a pop-up tab when they start the browser the first time after installation?
Just to provide the old answer, which no longer worked flawlessly:
If you want to do a silent administrative install [...]:
uncompress the .xpi file yourself (as a ZIP file) to an appropriately named (extension's ID) folder. On Linux/Unix platforms you can use a helper script to determine extension IDs in an automated fashion.
Put this directory into the browser/extension folder.
See also this answer about Thunderbird (by me). The same steps worked for Firefox before application signing was enforced. In Firefox 43, the signature checks can be disabled via about:config. The about:config workaround will supposedly stop working in Firefox 44.

Prevent users from disabling or uninstalling a Firefox addon

I'm building a Firefox add-on for children where I need to prevent them from disabling/uninstalling it.
I don't want them to be able to either remove or disable the add-on once it's installed.
How can I do this?
You can disable the access to add-on manager after you install the extension and then hide the shortcut in the bar. this works for me
Create a txt (windows) with this:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\Policies\Mozilla\Firefox]
"DisablePrivateBrowsing"=dword:00000000
"DisableFirefoxAccounts"=dword:00000000
"BlockAboutAddons"=dword:00000001
then change the .txt into .reg and execute
This one works for me:
Windows Registry extension
Installing or updating certain software on Windows can register an extension for Firefox or Thunderbird. For example, a Windows Registry entry to install a Firefox extension can be added under one of these keys:
HKEY_CURRENT_USER\Software\Mozilla\Firefox\Extensions\
HKEY_LOCAL_MACHINE\Software\Mozilla\Firefox\Extensions\
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Mozilla\Firefox\Extensions (Only on 64-bit versions of Windows)
The Registry entry name will be the ID name or GUID of the add-on and the value data will be the path to the folder containing the extension (see Adding Extensions using the Windows Registry - MDC for details). When Firefox or Thunderbird next starts, it will notice the entry and install the extension.
source
You need a supplemental program to do the work.
This mozillazine article has information:
In a few cases, an extension may be installed globally into the Mozilla installation directory. Installing a global extension is something an administrator might do so that the add-on can be used by any user on the machine. It is also possible that another software installation may have included a global extension (for example, the Java JRE installer adds a global extension to Firefox, for the Java Console). To manually uninstall a global extension, open the "extensions" directory in your Mozilla application's installation directory and remove the directory that corresponds to the extension you want to uninstall.
And here:
Extensions that are installed this way include the Java Quick Starter extension for Firefox (see above), the Microsoft .NET Framework Assistant the RealPlayer Browser Record Plugin extension, and the Lenovo ThinkVantage Password Manager extension for Firefox. Although you can disable the extension in the Add-ons manager, the Uninstall option may not be functional (it will be "greyed out). In such cases, experienced users can uninstall the extension by removing the associated Registry entry and/or the contents of the folder containing the extension; otherwise, simply disable it.

Resources