Possible Duplicate:
Hide Command Window in C# Application
in the console app, I want to run the cmd command, but a new window is being created, why ?
Process process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.CreateNoWindow = true;
startInfo.UseShellExecute = false;
startInfo.FileName = "cmd.exe";
startInfo.WorkingDirectory = @"C:\m_f";
startInfo.Arguments = "/c START _creator.bat";
process.StartInfo = startInfo;
process.Start();
edit
I had to change some code to:
startInfo.FileName = @"C:\m_f\_creator.bat";
startInfo.WorkingDirectory = @"C:\m_f\";
startInfo.Arguments = "some_args";
now it works