Click here to Skip to main content
15,949,741 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,

How do I find out an application to list and control all processes in current machine/ or remote machine?
Posted
Updated 10-Jan-11 23:06pm
v2
Comments
Sandeep Mewara 11-Jan-11 7:42am    
Demanding!

C#
using System.Diagnostics;

//...

void DoWhateverYouWantWithYourProcess(Process process) { /* some code */ }

//...

foreach (Process process in Process.GetProcesses())
    DoWhateverYouWantWithYourProcess(process);


There is also an overloaded method:
Process[] Process.GetProcesses(string machineName).
 
Share this answer
 
v2
Comments
Nimisha K John 11-Jan-11 1:29am    
I need complete code
Dalek Dave 11-Jan-11 5:06am    
Good Answer.
Sandeep Mewara 11-Jan-11 7:43am    
@Nimisha: thats called being demanding! You are here for help, aren't you?
Sergey Alexandrovich Kryukov 11-Jan-11 10:02am    
@Nimisha: This is complete. Who knows how you want to "control" your processes?
Got VS? Write this, put cursor on "Process", that hit F1..
Sergey Alexandrovich Kryukov 11-Jan-11 10:24am    
See my answer on services...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900