Question

Is there a way to allow an HTML file to open an application on the local computer and send that application arguments?

We have an application that allows a user to set a link to an external application. We also provide a summary page in HTML (they usually interact with the application from outside the browser) with the link in HTML as well. We can get applications to launch if the program exists, but cant seem to send arguments through the HTML link.

Is this even possible?

Is it possible without installing something client-side (like silverlight/java web start/etc)?

Was it helpful?

Solution

You can't directly launch an application from HTML/JavaScript. If you have a custom application already installed, you can register a protocol handler and the redirect to that custom url, which in turn launches your application with the full url available. Something like:

mycustomapp://whatever/whatever?arg1=value&arg2=value

OTHER TIPS

Another possibility is to embed a client application in your webpace, such as Java applet (signed!), Java webstart, Silverlight, etc and let that application instead invoke the client's local application. In Java applet/webstart for example, you can use Desktop#open() for this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top