how to pass a parameter with a link to an exe file from a html page
I have the following requirement. I have a link in a HTML page and on clicking it I need to pass a para开发者_开发问答meter alongwith the link to a .exe file. This is so that the .exe file opens up with the parameter provided. Thanks in advance
The best way to run exe from a web page with support on all browser is to use URL protocols. You have to register custom URL protocol of client's machine. During registration you are actually linking the exe with you custom protocol name. Let's say it was myprot
. Now in you hyperlink you can sepcify -
<a href="myprot:anythinghere">my exe link</a>
You can now pass anything after the myprot:
and request that from the argument in your application
See - Registering a custom url protocol
精彩评论