Method RunProcessAndWait
RunProcessAndWait(ProcessStartInfo, bool)
Runs a process using the specified start information and optionally waits for it to exit.
public static int RunProcessAndWait(ProcessStartInfo startInfo, bool wait)
Parameters
startInfoProcessStartInfoThe start information for the process.
waitboolIf
true, waits for the process to exit before returning.
Returns
- int
The exit code of the process if
waitistrue; otherwise, 0.