How do you get the UserName of the owner of a process?

后端 未结 7 1662
迷失自我
迷失自我 2020-12-06 16:28

I\'m trying to get a list of processes currently owned by the current user (Environment.UserName). Unfortunately, the Process class doesn\'t have a

7条回答
  •  再見小時候
    2020-12-06 17:03

    You might look at using System.Management (WMI). With that you can query the Win32_Process tree.

提交回复
热议问题