Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Fungování této stránky je z důvodu údržby dočasně omezeno. Pokud žádný článek nápovědy nevyřeší váš problém a potřebujete se zeptat na další řešení, napište nám na Twitter @FirefoxSupport nebo Reddit /r/firefox.

Prohledat stránky podpory

Vyhněte se podvodům. Za účelem poskytnutí podpory vás nikdy nežádáme, abyste zavolali nebo poslali SMS na nějaké telefonní číslo nebo abyste sdělili své osobní údaje. Jakékoliv podezřelé chování nám prosím nahlaste pomocí odkazu „Nahlásit zneužití“.

Zjistit více

Is is possible, in the latest version of Firefox, to open an executable file on the client's machine from a web page?

  • 7 odpovědí
  • 4 mají tento problém
  • 8 zobrazení
  • Poslední odpověď od cor-el

more options

I am a .Net developer working on a web application for state and local governments. I need to know if it is possible in the latest versions of Firefox to open an executable file on the client's hard drive. The client is demanding this functionality but everything I have found on the web refers to older versions. It appears this functionality has been removed for security purposes. Is there a way to work around the security?

I am a .Net developer working on a web application for state and local governments. I need to know if it is possible in the latest versions of Firefox to open an executable file on the client's hard drive. The client is demanding this functionality but everything I have found on the web refers to older versions. It appears this functionality has been removed for security purposes. Is there a way to work around the security?

Všechny odpovědi (7)

more options

You should be able to, I just attempted it to test & worked fine for me. You just need play around and customize application preferences to your suiting.

See: Manage file types and download actions in Firefox

more options
more options

Thanks D, but that's not what I'm looking for. That changes which application a file opens with when you download it. That's not what I need for this situation. Here's a little more detail.

The clients will have an application on their hard drive; it can be any application, even a custom application that they developed themselves. Then, they open a web page with a listbox full of items. Depending on which item they select, a query will return a file path to the .exe file itself. The .exe file resides on the client's hard drive, not on the server. So they're not downloading anything. Depending on the filepath returned by the query, the browser needs to start the process and open the .exe file for them.

So let's say I have developed a simple text editor called Tedit. I have a file on my hard drive - "C:\TextEditor\bin\debug\TEdit.exe". When they click the open button, that file path is returned from the database. Then the javascript is called to start the process and open that program.

Again, nothing is getting downloaded, the application resides on the user's hard drive and there is no file to associate it with.

This can be done in IE using an ActiveX control. And it used to be possible in Firefox using the nsIFile or nsIProcess objects. But since FF15 that's not available anymore, so the javascript throws an error telling them that their permission is denied.

What I need, is a javascript that will launch the .exe file from the user's hard drive without downloading anything.

more options

Hey cor el, I've found that add on already but it doesn't fit what I'm looking for. See my response to D above for more details.

more options

PrefBar is also able to launch programs via a toolbar button.

Upravil uživatel cor-el dne

more options

This could potentially work, but I need to specify the file path dynamically in the page. Setting up the toolbar button to always open the same .exe doesn't give me that option.

more options