开发者

how to pass a parameter with a link to an exe file from a html page

开发者 https://www.devze.com 2023-01-26 09:11 出处:网络
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 wi

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

0

精彩评论

暂无评论...
验证码 换一张
取 消