I want to execute two batch files in parallel. I have posted below the code which I use. But whenever I run this script, it executes only one batch file.
But whenever I specify file cmd.exe
, it runs both processes.
Process spyAllEth0 = new Process();
Process spyAllWlan0= new Process();
spyAllEth0.StartInfo.FileName = "D:/work/Platform/mcg/TCPDumpForMcg/SpyEth0MCG1.bat";
spyAllEth0.EnableRaisingEvents = true;
spyAllEth0.StartInfo.CreateNoWindow = false;
spyAllEth0.Start();
spyAllWlan0.StartInfo.FileName = "D:/work/Platform/mcg/TCPDumpForMcg/SpyWlan0MCG1.bat";
spyAllWlan0.EnableRaisingEvents = true;
spyAllWlan0.StartInfo.CreateNoWindow = false;
spyAllWlan0.Start();