[python-win32] wmi and NT service
Tim Golden
tim.golden at viacom-outdoor.co.uk
Tue Nov 23 10:25:11 CET 2004
[Walou]
| win32api.GetUserName() returns SYSTEM (account which launches the
| service), not the name of the guy who entered his name in the session
| opening dialogue box.
Ah, sorry. I should have realised what you were after.
As far as I know, the service is running as SYSTEM,
and only the Win32_Session object would have the details
of which user had logged in. I don't run XP, so I can't
check at the moment. I suggest Googling (possibly
Google-Grouping) for: WMI win32_session username -- or
something similar to see if anyone else has done the
same. If they have I'm sure we can translate back to
Python.
| (why not "_wmi", "win32wmi", "2umi" ...)
All possible, I know! it's just a question of deciding
whether to or not. Did you see Mark H's email about having
pywin32 exclude system32 from the path?
(By the way, the 2umi one took me a couple of moments
to work out!)
TJG
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
More information about the Python-win32
mailing list