On 02/09/2011 13:33, Rod Person wrote:
Hi,

I've been experimenting with the wmi module and so far everything is
working great, but I'm having an issue with the Win32_LoggedOnUser
class. I can seem to access it's properties. When I run the code in
debug I can see the information I want is being stored in the object
but all attempts to access it throw an error.

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

</code>

TJG
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to