public void RunTests(string incomingWholePath, string[] incomingArray, IProgressHandler progressHandler) { for (int i = 0; i < incomingArray.Length; i++) { ProcessStartInfo cmdsi = new ProcessStartInfo("cmd.exe"); cmdsi.WindowStyle = ProcessWindowStyle.Hidden; cmdsi.Arguments = @"/C " + incomingArray[i] + @" >>" + incomingWholePath; Process cmd = Process.Start(cmdsi); cmd.WaitForExit(); progressHandler.UpdateProgress(i + 1, incomingArray.Length); } }