[python-win32] WMI Win32_LoggedOnUser help
Rod Person
rodperson at rodperson.com
Fri Sep 2 16:05:44 CEST 2011
On Fri, 02 Sep 2011 14:56:10 +0100
Tim Golden <mail at timgolden.me.uk> wrote:
> I'm not entirely sure if this is what you're after, but I
> *think* it is:
>
> <code>
> import wmi
>
> c = wmi.WMI ()
> for session in c.Win32_LogonSession ():
> print "Session", session.LogonId
> for associated_user in session.references ("Win32_LoggedOnUser"):
> print associated_user.Antecedent
>
That is exactly it. Thank You!
--
"Every time I think of pushing you down the stairs, I lick my lips"
- "Bones In the Water"
Battle Of Mice
More information about the python-win32
mailing list