Process graph= new Process();
graph.StartInfo.FileName = "C:\\Program
Files\\Graph\\Graph.exe";
//graph.StartInfo.Arguments = "any
arugment";
graph.Start();
Starts Graph process. With additional properties, you can set it to run in the background.
Process[] processlist = Process.GetProcesses();
foreach (Process theprocess
in processlist)
{
Console.WriteLine("Process: {0} ID: {1}",
theprocess.ProcessName, theprocess.Id);
}
This gets all the processes and displays some information about them.
See the documentation for more information. It's pretty simple and there isn't anything interesting in my opionion. Threads are bit more interesting ...
No comments:
Post a Comment