Create URL of EXE w/ Command Line Parameter
I created an EXE that will be stored at a shared location on my company's intranet. I want to add a hyperlink to HTML e-mails for employees to run this EXE. However, the EXE needs a pipe-delimited command line parameter and I can't seem to get that working in the URL. Also, there could be a space in the command line parameter.
To run the program from a command line I would use the following:
Code:
\\SERVER1\MyEXE.exe Param1|Param2|Param3 MightHaveASpace
This is what I tried in the HTML e-mail and it wouldn't work:
Code:
...
<A href="file://\\SERVER1\MyEXE.exe?Param1|Param2|Param3 MightHaveASpace>Run MyEXE</A>
...
Thanks.
Re: Create URL of EXE w/ Command Line Parameter
Quote:
Originally posted by SLeeP-Dep'D
I created an EXE that will be stored at a shared location on my company's intranet. I want to add a hyperlink to HTML e-mails for employees to run this EXE. However, the EXE needs a pipe-delimited command line parameter and I can't seem to get that working in the URL. Also, there could be a space in the command line parameter.
To run the program from a command line I would use the following:
Code:
\\SERVER1\MyEXE.exe Param1|Param2|Param3 MightHaveASpace
This is what I tried in the HTML e-mail and it wouldn't work:
Code:
...
<A href="file://\\SERVER1\MyEXE.exe?Param1|Param2|Param3 MightHaveASpace>Run MyEXE</A>
...
Thanks.
You have to link to it from a web clients point of view. like www.mydomain.com/my.exe?paramhere
You'll also have to change your command line parser to handle url encoding.