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
startInfo
ProcessStartInfoThe start information for the process.
wait
boolIf
true
, waits for the process to exit before returning.
Returns
- int
The exit code of the process if
wait
istrue
; otherwise, 0.