← Interactive API Explorer
Namespace: System.Diagnostics

ProcessStartInfo

Specifies a set of values that are used when you start a process.

Properties (10)

bool UseShellExecute
Gets or sets a value indicating whether to use the operating system shell to start the process.
Value: true if the shell should be used when starting the process; false if the process should be created directly from the executable file. The default is true on .NET Framework apps and false on .NET Core apps.
bool CreateNoWindow
Gets or sets a value indicating whether to start the process in a new window.
Value: true if the process should be started without creating a new window to contain it; otherwise, false. The default is false.
bool RedirectStandardError
Gets or sets a value that indicates whether the error output of an application is written to the StandardError stream.
Value: true if error output should be written to StandardError; otherwise, false. The default is false.
bool RedirectStandardOutput
Gets or sets a value that indicates whether the textual output of an application is written to the StandardOutput stream.
Value: true if output should be written to StandardOutput; otherwise, false. The default is false.
bool RedirectStandardInput
Gets or sets a value indicating whether the input for an application is read from the StandardInput stream.
Value: true if input should be read from StandardInput; otherwise, false. The default is false.
ProcessWindowStyle WindowStyle
Gets or sets the window state to use when the process is started.
Value: One of the enumeration values that indicates whether the process is started in a window that is maximized, minimized, normal (neither maximized nor minimized), or not visible. The default is Normal.
String FileName
Gets or sets the application or document to start.
Value: The name of the application to start, or the name of a document of a file type that is associated with an application and that has a default open action available to it. The default is an empty string ("").
String Verb
Gets or sets the verb to use when opening the application or document specified by the FileName property.
Value: The action to take with the file that the process opens. The default is an empty string (""), which signifies no action.
String Arguments
Gets or sets the set of command-line arguments to use when starting the application.
Value: A single string containing the arguments to pass to the target application specified in the FileName property. The default is an empty string (""). On Windows Vista and earlier versions of the Windows operating system, the length of the arguments added to the length of the full path to the process must be less than 2080. On Windows 7 and later versions, the length must be less than 32699. Arguments are parsed and interpreted by the target application, so must align with the expectations of that application. For.NET applications as demonstrated in the Examples below, spaces are interpreted as a separator between multiple arguments. A single argument that includes spaces must be surrounded by quotation marks, but those quotation marks are not carried through to the target application. In include quotation marks in the final parsed argument, triple-escape each mark.
String WorkingDirectory
When the UseShellExecute property is false, gets or sets the working directory for the process to be started. When UseShellExecute is true, gets or sets the directory that contains the process to be started.
Value: When UseShellExecute is true, the fully qualified name of the directory that contains the process to be started. When the UseShellExecute property is false, the working directory for the process to be started. The default is an empty string ("").