Monday, October 11, 2010

List of processes running on Remote/Local Computer using C#

ArrayList alist = new ArrayList();

// From remote machine
Process[] processes = Process.GetProcesses("RemoteComputerName"); 

// From local machine
Process[] processes = Process.GetProcesses();    

foreach (Process process in processes)
{
       alist.Add(process.ProcessName);
}

No comments:

Post a Comment