Using C# console we could invoke current cmd/bat files. But it always popup new command line window.
I've tried invoking my cmd/bat files one by one and could not known how to running them in the same window. Pretty simple as below:
static void Main(string[] args)
{
Process.Start("first.cmd").WaitForExit(); // popup a new window
Process.Start("second.cmd").WaitForExit(); // popup a new window
Process.Start("third.bat").WaitForExit(); // popup a new window
Console.WriteLine("Press any key to exit ... ");
Console.ReadKey();
}
Is any way to start all them in current windown? How to void new popup?