Processes User Name

  • Thread starter Thread starter J Ford
  • Start date Start date
J

J Ford

I am looking for a way to get a Processes "User Name", similar to that found
in Task Manager. Whether it be the local logged on user, SYSTEM, LOCAL
SERVICE, or NETWORK SERVICE.

using System.Diagnostics;
I have tried "StartInfo.UserName" which comes back BLANK and I have tried
"StartInfo.EnvironmentVariables["username"]" which just returns the local
logged on User ID but not SYSTEM, LOCAL or NETWORK SERVICE.

Any help would be appreciated...
 
Back
Top