System [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] 1.0.3300.0 1.0.5000.0 2.0.0.0 4.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Object System.ComponentModel.TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter)) is used together with the component. When you start a process using the class, you have access to process information in addition to that available when attaching to a running process. You can use the class for better control over the process you start. You must at least set the property, either manually or using the constructor. The file name is any application or document. Here a document is defined to be any file type that has an open or default action associated with it. You can view registered file types and their associated applications for your computer by using the Folder Options dialog box, which is available through the operating system. The Advanced button leads to a dialog box that shows whether there is an open action associated with a specific registered file type. In addition, you can set other properties that define actions to take with that file. You can specify a value specific to the type of the property for the property. For example, you can specify "print" for a document type. Additionally, you can specify property values to be command-line arguments to pass to the file's open procedure. For example, if you specify a text editor application in the property, you can use the property to specify a text file to be opened by the editor. Standard input is usually the keyboard, and standard output and standard error are usually the monitor screen. However, you can use the , , and properties to cause the process to get input from or return output to a file or other device. If you use the , , or properties on the component, you must first set the corresponding value on the property. Otherwise, the system throws an exception when you read or write to the stream. Set to specify whether to start the process by using the operating system shell. You can change the value of any property up to the time that the process starts. After you start the process, changing these values has no effect. This class contains a link demand at the class level that applies to all members. A is thrown when the immediate caller does not have full-trust permission. For details about security demands, see Link Demands. Specifies a set of values that are used when you start a process. Constructor 1.0.5000.0 2.0.0.0 4.0.0.0 You must set at least the property before you start the process. The file name is any application or document. In this case, a document is defined to be any file type that has an open or default action associated with it. You can view registered file types and their associated applications for your computer by using the Folder Options dialog box, which is available through the operating system. The Advanced button leads to a dialog box that shows whether there is an open action associated with a specific registered file type. Optionally, you can also set other properties before you start the process. The property supplies actions to take, such as "print", with the file indicated in the property. The property supplies a way to pass command-line arguments to the file when the system opens it. Initializes a new instance of the class without specifying a file name with which to start the process. Constructor 1.0.5000.0 2.0.0.0 4.0.0.0 Value the property should be set to. The file name is any application or document. In this case, a document is defined to be any file type that has an open or default action associated with it. You can view registered file types and their associated applications for your computer by using the Folder Options dialog box, which is available through the operating system. The Advanced button leads to a dialog box that shows whether there is an open action associated with a specific registered file type. You can change the property after you call this constructor, up to the time that the process starts. After you start the process, changing these values has no effect. Initializes a new instance of the class and specifies a file name such as an application or document with which to start the process. Constructor 1.0.5000.0 2.0.0.0 4.0.0.0 To be added. The file name is any application or document. In this case, a document is defined to be any file type that has an open or default action associated with it. You can view registered file types and their associated applications for your computer by using the Folder Options dialog box, which is available through the operating system. The Advanced button leads to a dialog box that shows whether there is an open action associated with a specific registered file type. You can change the or properties after you call this constructor, up to the time that the process starts. After you start the process, changing these values has no effect. Initializes a new instance of the class, specifies an application file name with which to start the process, and specifies a set of command-line arguments to pass to the application. Command-line arguments to pass to the application when the process starts. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.ComponentModel.DefaultValue("") System.ComponentModel.NotifyParentProperty(true) System.ComponentModel.RecommendedAsConfigurable(true) System.ComponentModel.TypeConverter("System.Diagnostics.Design.StringValueConverter, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") System.Diagnostics.MonitoringDescription("Command line agruments for this process.") System.String Arguments that should be passed to the program specified in . Multiple arguments are seperated by spaces like they are on the commandline. Gets or sets the set of command-line arguments to use when starting the application. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.ComponentModel.DefaultValue(false) System.ComponentModel.NotifyParentProperty(true) System.Diagnostics.MonitoringDescription("Start this process with a new window.") System.Boolean To be added: an object of type 'bool' If the property is true or the and properties are not null, the property value is ignored and a new window is created. Gets or sets a value indicating whether to start the process in a new window. Property 2.0.0.0 4.0.0.0 System.ComponentModel.NotifyParentProperty(true) System.String To be added. To be added. Gets or sets a value that identifies the domain to use when starting the process. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.ComponentModel.DefaultValue(null) System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content) System.ComponentModel.Editor("System.Diagnostics.Design.StringDictionaryEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") System.ComponentModel.NotifyParentProperty(true) System.Diagnostics.MonitoringDescription("Environment variables used for this process.") System.Collections.Specialized.StringDictionary To be added: an object of type 'Collections.Specialized.StringDictionary' Although you cannot set the property, you can modify the returned by the property. For example, the following code adds a TempPath environment variable: myProcess.StartInfo.EnvironmentVariables.Add("TempPath", "C:\\Temp"). You must set the property to false to start the process after changing the property. If is true, an is thrown when the method is called. Gets search paths for files, directories for temporary files, application-specific options, and other similar information. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.ComponentModel.DefaultValue(false) System.ComponentModel.NotifyParentProperty(true) System.Diagnostics.MonitoringDescription("Thread shows dialogboxes for errors.") System.Boolean To be added: an object of type 'bool' must be true if you want to set to true. Gets or sets a value indicating whether an error dialog box is displayed to the user if the process cannot be started. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.ComponentModel.Browsable(false) System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden) System.IntPtr To be added: an object of type 'IntPtr' If is true, the property specifies the parent window for the dialog box that is shown. It is useful to specify a parent to keep the dialog box in front of the application. Gets or sets the window handle to use when an error dialog box is shown for a process that cannot be started. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.ComponentModel.DefaultValue("") System.ComponentModel.Editor("System.Diagnostics.Design.StartFileNameEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") System.ComponentModel.NotifyParentProperty(true) System.ComponentModel.RecommendedAsConfigurable(true) System.ComponentModel.TypeConverter("System.Diagnostics.Design.StringValueConverter, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") System.Diagnostics.MonitoringDescription("The name of the resource to start this process.") System.String Path to the application to be executed. You must set at least the property before you start the process. The file name is any application or document. A document is defined to be any file type that has an open or default action associated with it. You can view registered file types and their associated applications for your computer by using the Folder Options dialog box, which is available through the operating system. The Advanced button leads to a dialog box that shows whether there is an open action associated with a specific registered file type. The set of file types available to you depends in part on the value of the property. If is true, you can start any document and perform operations on the file, such as printing, with the component. When is false, you can start only executables with the component. You can start a ClickOnce application by setting the property to the location (for example, a Web address) from which you originally installed the application. Do not start a ClickOnce application by specifying its installed location on your hard disk. Gets or sets the application or document to start. Property 2.0.0.0 4.0.0.0 System.ComponentModel.NotifyParentProperty(true) System.Boolean To be added. This property is referenced if the process is being started by using the user name, password, and domain. If the value is true, the user's profile in the HKEY_USERS registry key is loaded. Loading the profile can be time-consuming. Therefore, it is best to use this value only if you must access the information in the HKEY_CURRENT_USER registry key. In Windows Server 2003 and Windows 2000, the profile is unloaded after the new process has been terminated, regardless of whether the process has created child processes. In Windows XP, the profile is unloaded after the new process and all child processes it has created have been terminated. Gets or sets a value that indicates whether the Windows user profile is to be loaded from the registry. Property 2.0.0.0 4.0.0.0 System.Security.SecureString To be added.    The property must be set if and are provided. If the property is not set, the default working directory is %SYSTEMROOT%\system32.    Setting the , , and the properties in a object is the recommended practice for starting a process with user credentials. A object is like a object in that it has a text value. However, the value of a object is automatically encrypted, it can be modified until your application marks it as read-only, and it can be deleted from computer memory by either your application or the .NET Framework garbage collector. For more information about secure strings and an example of how to obtain a password to set this property, see the class. If you provide a value for the property, the property must be false, or an will be thrown when the method is called. Gets or sets a secure string that contains the user password to use when starting the process. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.ComponentModel.DefaultValue(false) System.ComponentModel.NotifyParentProperty(true) System.Diagnostics.MonitoringDescription("Errors of this process are redirected.") System.Boolean To be added: an object of type 'bool' When a writes text to its standard error stream, that text is typically displayed on the console. By redirecting the stream, you can manipulate or suppress the error output of a process. For example, you can filter the text, format it differently, or write the output to both the console and a designated log file. You must set to false if you want to set to true. Otherwise, reading from the stream throws an exception. The redirected stream can be read synchronously or asynchronously. Methods such as , and perform synchronous read operations on the error output stream of the process. These synchronous read operations do not complete until the associated writes to its stream, or closes the stream. In contrast, starts asynchronous read operations on the stream. This method enables a designated event handler for the stream output and immediately returns to the caller, which can perform other work while the stream output is directed to the event handler. The application that is processing the asynchronous output should call the method to ensure that the output buffer has been flushed. Synchronous read operations introduce a dependency between the caller reading from the stream and the child process writing to that stream. These dependencies can cause deadlock conditions. When the caller reads from the redirected stream of a child process, it is dependent on the child. The caller waits for the read operation until the child writes to the stream or closes the stream. When the child process writes enough data to fill its redirected stream, it is dependent on the parent. The child process waits for the next write operation until the parent reads from the full stream or closes the stream. The deadlock condition results when the caller and child process wait for each other to complete an operation, and neither can continue. You can avoid deadlocks by evaluating dependencies between the caller and child process. For example, the following C# code shows how to read from a redirected stream and wait for the child process to exit. // Start the child process. Process p = new Process(); // Redirect the error stream of the child process. p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardError = true; p.StartInfo.FileName = "Write500Lines.exe"; p.Start(); // Do not wait for the child process to exit before // reading to the end of its redirected error stream. // p.WaitForExit(); // Read the error stream first and then wait. string error = p.StandardError.ReadToEnd(); p.WaitForExit(); The code example avoids a deadlock condition by calling p.StandardError.ReadToEnd before p.WaitForExit. A deadlock condition can result if the parent process calls p.WaitForExit before p.StandardError.ReadToEnd and the child process writes enough text to fill the redirected stream. The parent process would wait indefinitely for the child process to exit. The child process would wait indefinitely for the parent to read from the full stream. There is a similar issue when you read all text from both the standard output and standard error streams. For example, the following C# code performs a read operation on both streams. // Do not perform a synchronous read to the end of both // redirected streams. // string output = p.StandardOutput.ReadToEnd(); // string error = p.StandardError.ReadToEnd(); // p.WaitForExit(); // Use asynchronous read operations on at least one of the streams. p.BeginOutputReadLine(); string error = p.StandardError.ReadToEnd(); p.WaitForExit(); The code example avoids the deadlock condition by performing asynchronous read operations on the stream. A deadlock condition results if the parent process calls p.StandardOutput.ReadToEnd followed by p.StandardError.ReadToEnd and the child process writes enough text to fill its error stream. The parent process would wait indefinitely for the child process to close its stream. The child process would wait indefinitely for the parent to read from the full stream. You can use asynchronous read operations to avoid these dependencies and their deadlock potential. Alternately, you can avoid the deadlock condition by creating two threads and reading the output of each stream on a separate thread. Gets or sets a value that indicates whether the error output of an application is written to the stream. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.ComponentModel.DefaultValue(false) System.ComponentModel.NotifyParentProperty(true) System.Diagnostics.MonitoringDescription("Standard input of this process is redirected.") System.Boolean To be added: an object of type 'bool' A can read input text from its standard input stream, typically the keyboard. By redirecting the stream, you can programmatically specify the input of a process. For example, instead of using keyboard input, you can provide text from the contents of a designated file or output from another application. You must set to false if you want to set to true. Otherwise, writing to the stream throws an exception. Gets or sets a value indicating whether the input for an application is read from the stream. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.ComponentModel.DefaultValue(false) System.ComponentModel.NotifyParentProperty(true) System.Diagnostics.MonitoringDescription("Standart output of this process is redirected.") System.Boolean To be added: an object of type 'bool' When a writes text to its standard stream, that text is typically displayed on the console. By redirecting the stream, you can manipulate or suppress the output of a process. For example, you can filter the text, format it differently, or write the output to both the console and a designated log file. You must set to false if you want to set to true. Otherwise, reading from the stream throws an exception. The redirected stream can be read synchronously or asynchronously. Methods such as , , and perform synchronous read operations on the output stream of the process. These synchronous read operations do not complete until the associated writes to its stream, or closes the stream. In contrast, starts asynchronous read operations on the stream. This method enables a designated event handler for the stream output and immediately returns to the caller, which can perform other work while the stream output is directed to the event handler. The application that is processing the asynchronous output should call the method to ensure that the output buffer has been flushed. Synchronous read operations introduce a dependency between the caller reading from the stream and the child process writing to that stream. These dependencies can cause deadlock conditions. When the caller reads from the redirected stream of a child process, it is dependent on the child. The caller waits for the read operation until the child writes to the stream or closes the stream. When the child process writes enough data to fill its redirected stream, it is dependent on the parent. The child process waits for the next write operation until the parent reads from the full stream or closes the stream. The deadlock condition results when the caller and child process wait for each other to complete an operation, and neither can continue. You can avoid deadlocks by evaluating dependencies between the caller and child process. For example, the following C# code shows how to read from a redirected stream and wait for the child process to exit. // Start the child process. Process p = new Process(); // Redirect the output stream of the child process. p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.FileName = "Write500Lines.exe"; p.Start(); // Do not wait for the child process to exit before // reading to the end of its redirected stream. // p.WaitForExit(); // Read the output stream first and then wait. string output = p.StandardOutput.ReadToEnd(); p.WaitForExit(); The code example avoids a deadlock condition by calling p.StandardOutput.ReadToEnd before p.WaitForExit. A deadlock condition can result if the parent process calls p.WaitForExit before p.StandardOutput.ReadToEnd and the child process writes enough text to fill the redirected stream. The parent process would wait indefinitely for the child process to exit. The child process would wait indefinitely for the parent to read from the full stream. There is a similar issue when you read all text from both the standard output and standard error streams. For example, the following C# code performs a read operation on both streams. // Do not perform a synchronous read to the end of both // redirected streams. // string output = p.StandardOutput.ReadToEnd(); // string error = p.StandardError.ReadToEnd(); // p.WaitForExit(); // Use asynchronous read operations on at least one of the streams. p.BeginOutputReadLine(); string error = p.StandardError.ReadToEnd(); p.WaitForExit(); The code example avoids the deadlock condition by performing asynchronous read operations on the stream. A deadlock condition results if the parent process calls p.StandardOutput.ReadToEnd followed by p.StandardError.ReadToEnd and the child process writes enough text to fill its error stream. The parent process would wait indefinitely for the child process to close its stream. The child process would wait indefinitely for the parent to read from the full stream. You can use asynchronous read operations to avoid these dependencies and their deadlock potential. Alternately, you can avoid the deadlock condition by creating two threads and reading the output of each stream on a separate thread. Gets or sets a value that indicates whether the output of an application is written to the stream. Property 2.0.0.0 4.0.0.0 System.Text.Encoding To be added. If the value of the property is null, the process uses the default standard error encoding for error output. The property must be set before the process is started. Setting this property does not guarantee that the process will use the specified encoding; the process will use only those encodings that it supports. The application should be tested to determine which encodings are supported. Gets or sets the preferred encoding for error output. Property 2.0.0.0 4.0.0.0 System.Text.Encoding To be added. If the value of the property is null, the process uses the default standard output encoding for the standard output. The property must be set before the process is started. Setting this property does not guarantee that the process will use the specified encoding. The application should be tested to determine which encodings the process supports. Gets or sets the preferred encoding for standard output. Property 2.0.0.0 4.0.0.0 System.ComponentModel.NotifyParentProperty(true) System.String To be added.    The property must be set if and are provided. If the property is not set, the default working directory is %SYSTEMROOT%\system32. If the property is not null or an empty string, the property must be false, or an will be thrown when the method is called. Gets or sets the user name to be used when starting the process. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.ComponentModel.DefaultValue(true) System.ComponentModel.NotifyParentProperty(true) System.Diagnostics.MonitoringDescription("Use the shell to start this process.") System.Boolean To be added: an object of type 'bool' Setting this property to false enables you to redirect input, output, and error streams.     must be false if the property is not null or an empty string, or an will be thrown when the method is called. When you use the operating system shell to start processes, you can start any document (which is any registered file type associated with an executable that has a default open action) and perform operations on the file, such as printing, by using the object. When is false, you can start only executables by using the object. must be true if you set the property to true. The property behaves differently depending on the value of the property. When is true, the property specifies the location of the executable. If is an empty string, it is assumed that the current directory contains the executable. When is false, the property is not used to find the executable. Instead, it is used only by the process that is started and has meaning only within the context of the new process. When is false, the property must be a fully qualified path to the executable. Gets or sets a value indicating whether to use the operating system shell to start the process. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.ComponentModel.DefaultValue("") System.ComponentModel.NotifyParentProperty(true) System.ComponentModel.TypeConverter("System.Diagnostics.Design.VerbConverter, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") System.Diagnostics.MonitoringDescription("The verb to apply to a used document.") System.String To be added: an object of type 'string' Each file name extension has its own set of verbs, which can be obtained by using the property. For example, the "print" verb will print a document specified by using . The default verb can be specified by using an empty string (""). Examples of verbs are "Edit", "Open", "OpenAsReadOnly", "Print", and "Printto". You should use only verbs that appear in the set of verbs returned by the property. When you use the property, you must include the file name extension when you set the value of the property. The file name does not need to have an extension if you manually enter a value for the property. Gets or sets the verb to use when opening the application or document specified by the property. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.ComponentModel.Browsable(false) System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden) System.String[] To be added: an object of type 'string []' The property enables you to determine the verbs that can be used with the file specified by the property. You can set the property to the value of any verb in the set. Examples of verbs are "Edit", "Open", "OpenAsReadOnly", "Print", and "Printto". When you use the property, you must include the file name extension when you set the value of the property. The file name extension determines the set of possible verbs. Gets the set of verbs associated with the type of file specified by the property. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.ComponentModel.DefaultValue(typeof(System.Diagnostics.ProcessWindowStyle), "Normal") System.ComponentModel.NotifyParentProperty(true) System.Diagnostics.MonitoringDescription("The window style used to start this process.") System.Diagnostics.ProcessWindowStyle To be added: an object of type 'ProcessWindowStyle' To be added Gets or sets the window state to use when the process is started. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.ComponentModel.DefaultValue("") System.ComponentModel.Editor("System.Diagnostics.Design.WorkingDirectoryEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") System.ComponentModel.NotifyParentProperty(true) System.ComponentModel.RecommendedAsConfigurable(true) System.ComponentModel.TypeConverter("System.Diagnostics.Design.StringValueConverter, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") System.Diagnostics.MonitoringDescription("The initial directory for this process.") System.String To be added: an object of type 'string' The property must be set if and are provided. If the property is not set, the default working directory is %SYSTEMROOT%\system32. If the directory is already part of the system path variable, you do not have to repeat the directory's location in this property. The property behaves differently when is true than when is false. When is true, the property specifies the location of the executable. If is an empty string, the current directory is understood to contain the executable. When is true, the working directory of the application that starts the executable is also the working directory of the executable. When is false, the property is not used to find the executable. Instead, its value applies to the process that is started and only has meaning within the context of the new process. When the property is false, gets or sets the working directory for the process to be started. When is true, gets or sets the directory that contains the process to be started.