Hi,
Here is the code that maybe helpful
Process cscPro=new Process();
cscPro.StartInf o.FileName = "csc.exe";
cscPro.StartInf o.WorkingDirect ory = Path;
cscPro.StartInf o.Arguments = codeFileName;
cscPro.StartInf o.CreateNoWindo w = true;
cscPro.StartInf o.UseShellExecu te = false; //don't use shell,
then we can redirect the input and output of the exe
cscPro.StartInf o.RedirectStand ardInput = true;
cscPro.StartInf o.RedirectStand ardOutput = true;
cscPro.StartInf o.RedirectStand ardError = true;
cscPro.Start();
cscPro.Standard Input.WriteLine ("xxx"); //send parameters to
the exe
string outPut = cscPro.Standard Output.ReadToEn d(); //get the
output
"Red2" wrote:
Hey all,
I have a windows application that I need to pass command line
arguments to. However I can't get it to work. Does anyone have any
example on how to do this. I can get it to work on a consol app, not a
windows one like I need though. .net 2.0 c#...
Thanks for the help