Hi, somewhere in my Windows Form program, I need to run an external .exe process using Process.start(myprogram.exe). But every time when I do this, the myprogram.exe DOS window shows up. Is there a way to hide it while the process is running? Thanks.
Doesn't work for me when the console app must be kept running for a while. I can redirect the input and output, but the console window pops up never the less and stays empty if I redirect the output. The empty window stays till the console app finishes, or is closed from my window application. Is it even possible to hide the console window completely during runtime of the called executable ?
For me I had to use the CreateNoWindow property like below to run gacutil to make it work... WindowStyle didn't help (observe that I needed the RedirectStandardOutput set to true, don't know if it had any impact)
Process p = new Process { StartInfo = new ProcessStartInfo("gacutil.exe /i myassembly.dll") { UseShellExecute = false, CreateNoWindow = true, RedirectStandardOutput = true, } }; p.Start()Dan
Proposed As Answer byDan HändevikThursday, October 08, 2009 10:54 AM
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.