NOTE: The instructions are Windows specific, but will work for other OSes. This solution will not work for PDFs without disabling PDF.js and/or other PDF viewer plugins. It also won't work for files which Firefox can open directly (e.g. MP3 files, images, videos, text/plain
files, etc.)
Well, this solution isn't as user interaction free as you'd want, but if you have the ability to provide customized versions of Firefox or you can run batch scripts on each user's computer, you can try this:
Install the latest beta version of Automatic Save Folder (ASF)
Create a filter to match any kind of file from any domain like this.
Also make sure you read the 1st Install Guide
Configure ASF to automatically choose Save File
from the Save dialog
Install FEBE and backup the browser profile (including preferences) and restore them on individual computers
Or, if you can run batch scripts on the user's computer, run the following script (after ASF is installed):
Filename: Configure ASF.bat @ECHO OFF :: Kill Firefox if it is running or else prefs.js won't be updated START "" /WAIT /B "taskkill" /F /IM firefox.exe :: Find out the user profile directory for Firefox and navigate to it SET ProfileDir=%APPDATA%\Mozilla\Firefox\Profiles CD /D %ProfileDir% FOR /F "tokens=* USEBACKQ" %%F IN (`dir /A:D /B ^| find "default"`) DO ( SET "ProfileDir=%ProfileDir%\%%F" ) CD /D %ProfileDir% :: Read ASF preferences from 'extpref.txt' and append them to Firefox's preferences file TYPE %~dp0%\extpref.txt >> prefs.js :: Since the username for each user is bound to change, find out the path to the "Downloads" :: folder and append it to prefs.js SET DownloadsDir=%USERPROFILE%\Downloads ECHO user_pref("extensions.asf.filters0.folder", "%DownloadsDir:\=\\%"); >> prefs.js ECHO user_pref("extensions.asf.lastpath", "%DownloadsDir:\=\\%"); >> prefs.js PAUSE
Filename: extpref.txt user_pref("extensions.asf.dialogForceRadio", true); user_pref("extensions.asf.dialogaccept", true); user_pref("extensions.asf.filters0.active", true); user_pref("extensions.asf.filters0.domain", "*"); user_pref("extensions.asf.filters0.domain_regexp", false); user_pref("extensions.asf.filters0.filename", "*"); user_pref("extensions.asf.filters0.filename_regexp", false); user_pref("extensions.asf.filtersNumber", 1); user_pref("extensions.asf.tempdomain", "http://chrisblattman.com"); user_pref("extensions.asf.useDownloadDir", true); user_pref("extensions.asf.version", "1.0.5bRev128"); user_pref("extensions.asf.viewdloption", true); user_pref("extensions.asf.viewpathselect", true); user_pref("extensions.asf@mangaheart.org.install-event-fired", true);
The script takes input from extpref.txt
which should be present in the same folder as the script itself and must contain preferences for ASF, which will be updated in Firefox's preferences file (prefs.js)
You can read the preferences from about:config
under extensions.asf.*
or simply get them from prefs.js
which will typically be in the folder:
%APPDATA%\Mozilla\Firefox\Profiles\????????.default\
When creating extpref.txt
make sure you don't include extensions.asf.filters0.folder
and extensions.asf.lastpath
since they will be different for each user.