Hi,
I need to start a new process from c#. I am currently doing it as below
[HTML]
ProcessStartInf o psi = new ProcessStartInf o(@"appname");
psi.RedirectSta ndardOutput = true;
psi.WindowStyle = ProcessWindowSt yle.Hidden;
psi.UseShellExe cute = false;
System.Diagnost ics.Process listFiles;
psi.Arguments = "test";
psi.WindowStyle = ProcessWindowSt yle.Hidden;
listFiles = System.Diagnost ics.Process.Sta rt(psi);
psi.WindowStyle = ProcessWindowSt yle.Hidden;
StreamReader myOutput = listFiles.Stand ardOutput;
while (!listFiles.Has Exited){
listFiles.WaitF orExit(2000);
}
string output = myOutput.ReadTo End();
[/HTML]
The problem with this is when the above is started a dos window comes up with focus. I would ideally like no dos window to be displayed! Can someone please help me with this?
I need to start a new process from c#. I am currently doing it as below
[HTML]
ProcessStartInf o psi = new ProcessStartInf o(@"appname");
psi.RedirectSta ndardOutput = true;
psi.WindowStyle = ProcessWindowSt yle.Hidden;
psi.UseShellExe cute = false;
System.Diagnost ics.Process listFiles;
psi.Arguments = "test";
psi.WindowStyle = ProcessWindowSt yle.Hidden;
listFiles = System.Diagnost ics.Process.Sta rt(psi);
psi.WindowStyle = ProcessWindowSt yle.Hidden;
StreamReader myOutput = listFiles.Stand ardOutput;
while (!listFiles.Has Exited){
listFiles.WaitF orExit(2000);
}
string output = myOutput.ReadTo End();
[/HTML]
The problem with this is when the above is started a dos window comes up with focus. I would ideally like no dos window to be displayed! Can someone please help me with this?
Comment