ProcessLauncher Class
A utility class that wraps process launching and provides better tracking and logging.
  • IDisposable
Base Types
  • object
graph BT Type-->Base0["object"] Type-.->Interface0["IDisposable"] Type["ProcessLauncher"] class Type type-node


public class ProcessLauncher : IDisposable


Name Summary
ProcessLauncher() Creates a new process launcher without a defined file name or arguments.
ProcessLauncher(string, string[]) Creates a new process launcher with the specified file name and arguments.


Name Field Type Constant Value Summary
PathEnvironmentVariable string PATH
PathExtEnvironmentVariable string PATHEXT


Name Property Type Summary
AreAnyRunning bool
Returns true if any processes launched by this launcher are currently running.
Arguments string
The arguments to pass to the process.
ContinueOnError bool
Toggles throwing an exception if the process exits with a non-zero exit code.
EnvironmentVariables Dictionary<string, string>
Environment variables to set for the process.
FileName string
The file name of the process to start.
HideArguments bool
Toggles whether to hide the arguments list when logging the process command.
IsBackground bool
Starts the process and leaves it running in the background.
IsErrorExitCode Func<int, bool>
A function that determines if the exit code from the process was an error.
LogErrors bool
Toggles whether to log error process output as error messages. If false, errors are logged as either informational or debug messages depending on LogOutput.
LogOutput bool
Toggles whether to log standard process output as information messages. If false, output is logged as debug messages.
RunningProcesses IEnumerable<Process>
Timeout int
Sets a timeout in milliseconds before the process will be terminated.
WorkingDirectory string
The working directory to use for the process.


Extension Methods