That indicates to start a process directly from the executable file. As you
know, a console window does not create a window itself, I believe, that may
be the reason why ProcessWindowStyle.Minimized does not take any effect. To
work around this problem, I suggest you to set UseShellExecute to true to
use the operating system shell to start a console process.
psi.UseShellExecute = true;
Note: UseShellExecute defaults to true.
If you need to redirect input, output and error streams, you may have to
set UseShellExecute. If so, you can call Win32 API ShowWindow to minimize
the console window after it is shown. Please refer to the following code
snippet:
//-----------------code snippet------------------------
using System.Runtime.InteropServices;
..
[DllImport("user32.dll")]
private static extern Boolean ShowWindow(IntPtr hWnd,Int32 nCmdShow);
private Int32 SW_MINIMIZE = 2;
..
psi.UseShellExecute = false;
Process.Start(psi);
Process [] myProcess = Process.GetProcessesByName("aConsoleApp");
IntPtr hwnd = myProcess[0].MainWindowHandle;
ShowWindow(hwnd, SW_MINIMIZE);
//-------------------end of-----------------------------
ProcessStartInfo.UseShellExecute Property
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemdiagnosticsprocessstartinfoclassuseshellexecutetopic.asp