Although there are some explanations regarding my problem, I can't solve the following cmd command issue. My goal is to start an .exe with some parameters through C#, which has to manipulate more than one file in a row. Even if I wait until the process has finished, it does not end. Without waiting for the end (Process.WaitForExit()), it looks like the different commands are terminating each other without execution. How can I achieve, with the following method, execution of each .exe file I want to?
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.CreateNoWindow = false;
startInfo.FileName = "cmd.exe";
startInfo.Arguments = @"\c Path_of_the_exe " + Path_of_the_file;
using (Process exeProcess = Process.Start(startInfo))
{
exeProcess.WaitForExit();
}
/cinstead of\c?