detailed process list

  • Thread starter Thread starter jg
  • Start date Start date
J

jg

can one list all the process details run under one's ID when the ID is non
Admin?


How?


I am aware there process explorer for administrator to find the details of
all processes in XP including the ones run different from eh admin ID.
 
Assuming that the OP is trying to get the list of running processes running
under the currently logged on user account, the following WMI script should
help:

Lists all the processes running in the currently logged on user account.
- - -
strComputer = "."
Dim strUserName
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * From Win32_ComputerSystem")

For Each objItem in colItems
strUserName = objItem.UserName
Next

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("SELECT * FROM Win32_Process")
For Each objProcess in colProcessList
colProperties = objProcess.GetOwner(strNameOfUser,strUserDomain)

If strUserDomain & "\" & strNameOfUser = strUserName Then
WScript.Echo "Process " & objProcess.Name & " is owned by " _
& strUserDomain & "\" & strNameOfUser & "."
End If
Next
- - -

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Making Good Newsgroup Posts
http://www.dts-l.org/goodpost.htm

MAKE A GOOD NEWSGROUP POST
http://home.satx.rr.com/badour/html/post.html

Newsgroups - Unanswered Questions
http://www.michna.com/kb/Newsgroups.htm

How to ask a question
http://support.microsoft.com/?id=555375

Note: KB555375 is for Microsoft Windows XP Professional not Microsoft
Windows XP Home. ;-)

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top