Question: I have a console program that shouldn\'t be seen. (It resets IIS and deletes temp files.)
Right now I can manage to hide the window right after start like
If I understand your question, just create the console process manually and hide the console window:
Process process = new Process();
process.StartInfo.FileName = "Bogus.exe";
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.CreateNoWindow = true;
I do this for an WPF app which executes a console app (in a background worker) and redirects standard output so you can display the result in a window if needed. Works a treat so let me know if you need to see more code (worker code, redirection, argument passing, etc.)