Hi,
Add a reference to System.Management to your app. You can get
that info with the wmi.
Dim moReturn As Management.ManagementObjectCollection
Dim moSearch As Management.ManagementObjectSearcher
Dim mo As Management.ManagementObject
moSearch = New Management.ManagementObjectSearcher("Select * from
Win32_Process")
moReturn = moSearch.Get
For Each mo In moReturn
Dim arOwner(2)
mo.InvokeMethod("GetOwner", arOwner)
Debug.WriteLine(String.Format("{0} Owner {1} Domain {2}", mo("Name"),
arOwner(0), arOwner(1)))
Next
Ken
-------------------
"Scott Meddows" <sc******************@tsged-removeme.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Can you tell who owns a running process in .NET?
I can do the system.diagnostic.process object and see if an application of
the same name is running but I need to tell if the process is running by a
current user or by another user.
Anyone know how to do this?
Thanks