Hi,
Here is the code that maybe helpful
Process cscPro=new Process();
cscPro.StartInfo.FileName = "csc.exe";
cscPro.StartInfo.WorkingDirectory = Path;
cscPro.StartInfo.Arguments = codeFileName;
cscPro.StartInfo.CreateNoWindow = true;
cscPro.StartInfo.UseShellExecute = false; //don't use shell,
then we can redirect the input and output of the exe
cscPro.StartInfo.RedirectStandardInput = true;
cscPro.StartInfo.RedirectStandardOutput = true;
cscPro.StartInfo.RedirectStandardError = true;
cscPro.Start();
cscPro.StandardInput.WriteLine("xxx"); //send parameters to
the exe
string outPut = cscPro.StandardOutput.ReadToEnd(); //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