Click here to Skip to main content
15,898,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Using 'ProcessStartInfo' cmd.exe i want to see the command window

ProcessInfo = new ProcessStartInfo("cmd.exe");
ProcessInfo.WorkingDirectory = @"C:";
ProcessInfo.WindowStyle = ProcessWindowStyle.Normal; ProcessInfo.CreateNoWindow = false;
ProcessInfo.UseShellExecute = false;
Process = Process.Start(ProcessInfo);
Process.WaitForExit(20000);
Process.Close();

I have tried WindowStyle property, but still it appeares on screen for a very small time (hardly a sec) in which i cant notice whaz going on..
Posted

1 solution

I dont think u need to specify:
Minaxi Sajwan wrote:
ProcessInfo.WindowStyle = ProcessWindowStyle.Normal;

Comment them and check.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900