In a windows environment where multiple users are allowed to log on to a machine simultaneously, when we call Process.GetProcesses()
, does it return the processes of the logged on user who is making this call or does it return processes of all the logged on users. I had a look at the MSDN page but couldnt find this information.
This function returns all the process resources running on the local computer.
You can see it on MSDN (I also check it on my computer..)
Return Value
Type:
System.Diagnostics.Process[]
An array of type Process that represents all the process resources running on the local computer.
If you are interesting in getting processes of specific user look at the following code - http://www.codeproject.com/Articles/14828/How-To-Get-Process-Owner-ID-and-Current-User-SID
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With