How can send perameters to a exe file ?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: How can send perameters to a exe file ?

  1. #1
    Bazy Guest

    How can send perameters to a exe file ?


    I WANT TO SEND SOME PERAMETERS TO A EXE FILE AND ALSO WANT TO RECIVE THAT
    PERAMETERSF FROM THAT EXE FILE . FOR EXAMPLE I WANT TO SEND SOME PERAMETERS
    TO TEST.EXE AND ALSO WANT TO RECIVE THAT PERAMETERS FROM TEST.EXE FILE ..
    HOW I CAN DO THIS ? ANY ONE HELP ME ? I WILL APPRICIATE IT ..

  2. #2
    Chris Hylton Guest

    Re: How can send perameters to a exe file ?


    It's pretty simple if you dont need to pass really complex stuff like a recordset
    or something...in that case you'll need to build the EXE as an ActiveX EXE.

    But, to do simple passing of strings, numeric, etc...you can do the following.

    When every EXE is executed, there is a value called COMMAND that contains
    any command-line parameters that were passed. So, if you run the program
    as follows...

    c:\folder\myprog.exe /cmdlinestring

    When the app fires, the value 'cmdlinestring' is stored in a variable called
    command that can be processed inside the EXE (for example in sub main).

    the command variable is always populated, if you don't pass anything, it
    is just set to the empty string "".

    Good luck,
    Chris

    "Bazy" <bazy4u@yahoo.com> wrote:
    >
    >I WANT TO SEND SOME PERAMETERS TO A EXE FILE AND ALSO WANT TO RECIVE THAT
    >PERAMETERSF FROM THAT EXE FILE . FOR EXAMPLE I WANT TO SEND SOME PERAMETERS
    >TO TEST.EXE AND ALSO WANT TO RECIVE THAT PERAMETERS FROM TEST.EXE FILE ..
    >HOW I CAN DO THIS ? ANY ONE HELP ME ? I WILL APPRICIATE IT ..



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center