Jeff,
"Jeff" <js******@woh.rr.com> schrieb:
The Process class gives a lot of information. One piece it doesn't seem
to give you though is what user a process is running under (unless I'm
missing something here.) Does anyone have an idea on how to retrieve this
information (by the API perhaps?)
You can utilize the 'Win32_Process' class and its 'GetOwner' method to
determine domain and user the process is belonging to. The documentation on
'Win32_Process' contains a VBScript sample on how to do that:
Platform SDK: Windows Management Instrumentation -- 'Win32_Process'
<URL:http://msdn.microsoft.com/library/en-us/wmisdk/wmi/win32_process.asp>
Samples for VB.NET and C# can be found here:
<URL:http://www.google.to/groups?q=dotnet+Win32_Process+GetOwner+-herfried>
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>