I have created a custom Protocol myapp:
just like mailto:
which opens one exe at client side using JavaScript. So, whenever that JavaScript I call there opens a dialog box asking for selecting the application through which I want to open.
I just wanted to set the default application through which it opens in the code and doesn't open that dialog box. I know that I can manually change from always ask to set default in setting of Mozilla Browser, but I wanted it through Code. so that user does not have to do any thing.
Is it possible? If yes, please guide me how I can achieve this.
Asked
Active
Viewed 683 times
-2
-
2If it was possible, it should be fixed ASAP as a major security issue – A. Wolff Dec 02 '15 at 13:15
-
yes, you can. it's call navigator.registerProtocolHandler(), if i understand your question correctly... – dandavis Dec 02 '15 at 14:28
-
Thanks for the reply , Actually i have registered the protocol already and through that i am able to open the exe also ,but i wanted to disable the Dialog box(through code) which always opens to select the application through which we want to open .As in safari Browser it opens directly without any dialog box same i want for the Mozila.. Browser...!! – avaneesh Dec 03 '15 at 04:06
1 Answers
0
You cannot set such settings from an unprivileged webpage, that would be a huge security issue.
What you can ask the user from a webpage is to register a web application as a custom protocol handler, but not an exe. However, if that exe is written by yourself, you might just register it as a protocol handler within the OS.

Bergi
- 630,263
- 148
- 957
- 1,375
-
Thanks for the reply , Actually i have registered the protocol already and through that i am able to open the exe also ,but i wanted to disable the Dialog box(through code) which always opens to select the application through which we want to open .As in safari Browser it opens directly without any dialog box same i want for the Mozila.. Browser...!! – avaneesh Dec 03 '15 at 04:07
-
I guess then your best bet is to mangle the Firefox settings through your program, just like you registered the protocol, from the executable. This was done [here](https://groups.google.com/forum/#!msg/mozilla.support.firefox/Pxrx0-SKW1c/gyBVXgqB2MUJ) as well, but I have no idea about best practises to interface with firefox settings. – Bergi Dec 03 '15 at 04:31