Pass variables to executable

  • Thread starter Thread starter Nate
  • Start date Start date
N

Nate

Is there any way within asp.net to pass user defined
parameters/variables to an executable? Much thanks.

nate
 
Well, let me back up a bit. It sounds like you want to shell out to another
program (is that true?). If you can tell us what your requirements
specifically are, perhaps we can come up with a more elegant solution than
shelling out, such as using COM+.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.
 
I have an executable defined as a system variable... this
exe only runs when atleast 2 variables are passed...an
action/target and a message. It is a paging system.
However i want my submit button to take these two fields
one is from a dropdown field populated from a select
statement ran on the DB. The other field is a text field.
I want it to send these two fields to the exe..I have no
idea how to do this any help is appreciated.

nate
 
Hi,

The System.Diagnostics.Process class used to launch external executables can
be configured to pass any command line arguments to an executable being
launched. In the simplest case, you can launch your executable like this:

Process.Start("IExplore.exe", "C:\\myPath\\myFile.asp");

(the example is taken from MSDN Library).
 
Back
Top