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]\SERVER1MyEXE.exe Param1|Param2|[b]Param3 MightHaveASpace[/b][/code]

This is what I tried in the HTML e-mail and it wouldn't work:


  • Maybe you should write something like this:

    Run MyEXE

    %20 is a hex representation for space
    and %7C is as hex representation for pipe.

    Try it. Maybe it will successfully function.
    [hr]Good luck!
    [b]Aidas Bendoraitis[/b] aka [b]Archatas[/b][hr]

  • Well that won't, because you forgot to close the quotes. Certain browsers would understand, but from the backslashes I deduce a Windows box, and therefore IE is the most likely browser. Apart from that though, it's a good plan. ;-)

    Whether or not it will actually work is dependant on some server-side configurations, according to a friend. I didn't quite get most of what he was saying, but I think that's what he meant. So you could probably configure it to work, I don't know where or how.

    What I'd recommend would be to either change the script so that instead of taking command-line parameters it takes them from the query-string, or if that's infeasible for some reason or other, to set up a 'proxy' script to run that one - something like

    void main () {
    system("\SERVER1MyEXE.exe Param1|Param2|Param3 MightHaveASpace");
    cout >> "Thank you. Script has been run.";
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!