PC Review Forums Newsgroups Windows XP Windows XP WMI Win32_Process and Sessions

Reply

Win32_Process and Sessions

 
Thread Tools Rate Thread
Old 26-08-2004, 10:48 AM   #1
Amit Zinman
Guest
 
Posts: n/a
Default Win32_Process and Sessions


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


  Reply With Quote
Old 28-08-2004, 05:43 PM   #2
Ivan Brugiolo [MSFT]
Guest
 
Posts: n/a
Default Re: Win32_Process and Sessions

Win32_SessionProcess

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"Amit Zinman" <amitz@co.zahav.net.il> wrote in message
news:OuE0jH1iEHA.2052@TK2MSFTNGP15.phx.gbl...
> 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
>
>



  Reply With Quote
Old 24-09-2004, 12:41 AM   #3
paopaoer
Guest
 
Posts: n/a
Default Re: Win32_Process and Sessions

I don't find this keyword ;(

"Ivan Brugiolo [MSFT]" <ivanbrug@online.microsoft.com> wrote in message
news:O2jVVaSjEHA.1644@tk2msftngp13.phx.gbl...
> Win32_SessionProcess
>
> --
> This posting is provided "AS IS" with no warranties, and confers no

rights.
> Use of any included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
>
>
> "Amit Zinman" <amitz@co.zahav.net.il> wrote in message
> news:OuE0jH1iEHA.2052@TK2MSFTNGP15.phx.gbl...
> > 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
> >
> >

>
>



  Reply With Quote
Old 24-09-2004, 07:12 PM   #4
Torgeir Bakken \(MVP\)
Guest
 
Posts: n/a
Default Re: Win32_Process and Sessions

paopaoer wrote:

> "Ivan Brugiolo [MSFT]" <ivanbrug@online.microsoft.com> wrote:
>
>> Win32_SessionProcess

>
>
> I don't find this keyword ;(

Hi

http://www.google.com/search?as_q=Win32_SessionProcess


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/sc...er/default.mspx
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off