J
JezB
I want to iterate the process list looking at the processes running for the
current user. So I'm using:
foreach (Process p in Process.GetProcesses())
{
}
But I can't see any method or property of the Process object p which tells
me the username of the user running the process. p.StartInfo.UserName always
seems to contain "".
So how can I consider just the processes running under the current user ?
current user. So I'm using:
foreach (Process p in Process.GetProcesses())
{
}
But I can't see any method or property of the Process object p which tells
me the username of the user running the process. p.StartInfo.UserName always
seems to contain "".
So how can I consider just the processes running under the current user ?