Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create URL of EXE w/ Command Line Parameters

Status
Not open for further replies.

SleepDepD

Programmer
Mar 13, 2004
65
US
* Sorry if this is the wrong forum--would appreciate the help though... *

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|[b]Param3 MightHaveASpace[/b]

This is what I tried in the HTML e-mail and it wouldn't work:
Code:
...
<A href="file://\\SERVER1\MyEXE.exe?Param1|Param2|[b]Param3 MightHaveASpace[/b]>Run MyEXE</A>
...
Thanks.
 
Spaces in url links can be replaced with "%20" (with no " char)

 

I believe you should replace this:

file://\\SERVER1\MyEXE.exe

with this:

file:////SERVER1/MyEXE.exe

That way, you might get it working in more than just IE ;o)

Hope this helps,
Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top