Results 1 to 3 of 3

Thread: Create URL of EXE w/ Command Line Parameter

  1. #1

    Thread Starter
    Junior Member SLeeP-Dep'D's Avatar
    Join Date
    Mar 2004
    Location
    St. Paul, MN, USA
    Posts
    27

    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.

  2. #2
    Hyperactive Member Maven's Avatar
    Join Date
    Feb 2003
    Location
    Greeneville, TN
    Posts
    322

    Re: Create URL of EXE w/ Command Line Parameter

    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.
    Education is an admirable thing, but it is well to remember from time to time that nothing that is worth knowing can be taught. - Oscar Wilde

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    The pipe character has a special meaning in command lines. Have you ever run the exe you're speaking of?

    Besides, in file: URLs all slashes are forward:
    file:///SERVER1/MyEXE.exe
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width