I want to get a list of all the processes running on my system. The idea is to write a program which will run continiuosly on the system and will check if a perticular process is running and will take some decisions based on it.
Thanks,
Deepak
How to get the name of the processes running on a system?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Former memberPosted Jun 21, 2006, 12:50 AM EDT
//Code
Process[] objAllProcess= Process.GetProcesses();
foreach(Process prc in objAllProcess)
{
//Do whatever you want to do with each process represented by the prc object.
//This example will show each process name in a messagebox.
MessageBox.Show(prc.ProcessName.ToString());
}
hope solved ur problem.