Saturday, March 24, 2012

Pass variables to executable

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

nateHi Nate,

Do you mean arguments passed to Process.Start?

http://msdn.microsoft.com/library/d...en tstopic.asp

"Nate" <ava@.originpoint.com> wrote in message
news:087e01c39dbb$2e1d1950$a101280a@.phx.gbl...
> Is there any way within asp.net to pass user defined
> parameters/variables to an executable? Much thanks.
> nate
An executable what?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"Nate" <ava@.originpoint.com> wrote in message
news:087e01c39dbb$2e1d1950$a101280a@.phx.gbl...
> 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.

"Nate" <ava@.originpoint.com> wrote in message
news:087e01c39dbb$2e1d1950$a101280a@.phx.gbl...
> Is there any way within asp.net to pass user defined
> parameters/variables to an executable? Much thanks.
> nate
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
>--Original Message--
>Is there any way within asp.net to pass user defined
>parameters/variables to an executable? Much thanks.
>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).

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"nateh" <ava@.originpoint.com> wrote in message
news:455901c39f38$4b15f120$7d02280a@.phx.gbl...
> 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
> >--Original Message--
> >Is there any way within asp.net to pass user defined
> >parameters/variables to an executable? Much thanks.
> >nate
> >.

0 comments:

Post a Comment