Win32_Process and Sessions

A

Amit Zinman

Hi,
I'm writing a script which tracks processes. However, I need to tell
whether the process is running on the logged on session.
How can I do this?

My code:
Set wmi=getobject("winmgmts:")
Set objWMIService = GetObject("winmgmts:\\acavish\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Process where
name='msaccess.exe'",,48)


Amit
 

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

Top