I am running a cmd.exe process from within a winforms application. However I can’t seem to get the console window to run in the background (ie not show on screen)
here is my code
ProcessStartInfo si = new ProcessStartInfo("cmd.exe");
si.RedirectStandardInput = true;
si.RedirectStandardOutput = true;
si.UseShellExecute = false;
si.Arguments = "/c";
si.WindowStyle = ProcessWindowStyle.Hidden;
Process p = Process.Start(si);
Set CreateNoWindow to true.