Firefox - Execute local .exe files

Firefox (>1.5) - Execute local .exe files

Situation: My client has a very sophisticated Intranet Webapplication for knowledge management. Unfortunately there is some proprietary content (e.g. DIN standards etc.)  which can only be accessed through proprietary executable files. Nevertheless the Intranet should be the starting point to also access that content. By default Firefox does not allow to execute .exe files because of security concerns. In IE this easy. Firefox requires certain steps to allow that: 


The http protocol can not be used because it downloads a copy of the exe file rather than executing it from the source location. The way to go is the file protocol. This works in IE out of the box. To allow that in Firefox certain steps are required:

  • Install Firefox OpenDownload extension. The OpenDownload extension adds the "execute" option for local files to the download dialog.
  • Close Firefox
  • Configure your server/webserver so that the executable can be accessed locally (e.g. on Windows \\intranet\e\app.exe and/or create a virtual directory in IIS).  
  • Open the prefs.js file from the Firefox profile folder  in a text editor and append the following lines (further reading).     

user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");
user_pref("capability.policy.localfilelinks.sites", "http://intranet");
user_pref("capability.policy.policynames", "localfilelinks");

Replace the URL specified in capability.policy.localfilelinks.sites with the url from where the exe file should be executed.

The modification of prefs.js is necessary because Firefox does not allow to call the file protocol through a hyperlink from a website which uses the http protocol. Through the capability.policy.localfilelinks.sites policy you do only allow that for a certain domain and do not generally allow the execution of exe files for all sorts of domains.

  • Add a hyperlink using the file protocol to your website which points to the executable. Make sure you are using UNC paths (further reading), e.g. on Windows  file://///intranet/e/app.exe