This class represents a system process. Use it to start, stop, and
interact with a process.
To launch a new process, create an instance of
ProcessStartInfo, set its properties, and pass
it to the single-argument form of the static
Start() method. This offers a great deal of
control over process creation. To launch a process without
StartInfo, simply call the one-string
or two-string argument form of the static
The first string argument is the name of the program, batch file,
or document to start, and the optional second argument
contains any command-line arguments.
You can also explicitly create a new instance of
Process, set its
property, and call the
Start() method to start
GetCurrentProcess() creates a
Process instance that represents the current
Enumerate all running processes on the system by using
GetProcessesByName() to get all processes
for a given program.
GetProcessById() retrieves a
Process given its process ID.
CloseMainWindow() to shut down a process that has
a user interface. You can terminate a process with
Kill(), but this forces an abnormal termination,
which may result in data corruption. If you would like to raise an
event when the process finishes executing, use
must be set to
Most of the properties allow you to access general information about the running process. However, this information is populated at the time ...