[python-win32] wmi and NT service
walou
c.walou at laposte.net
Tue Nov 23 10:15:40 CET 2004
Le lun 22/11/2004 à 17:58, Tim Golden a écrit :
> [Steve Holden]
> | Given that there is a wmi.dll, might it not be better to give in and
> | rename your package to pywmi?
> |
> | pragmatical-ly y'rs - steve
>
> Yes, I know. Every time this issue comes up I
> think "Shall I? Shan't I?". There are only two
> reasons not to, neither compelling: one, that I had
> an ingrained prejudice against the pyxxx school
> of naming; the other, that I'd have to go through
> a process of updating the web pages and then making
> something of an announcement so that anyone out in
> the field knows it's changed and doesn't think it's
> another WMI module coming into the field (a la pymssql,
> mssql).
>
> I shall continune to give it deliberate thought.
>
> TJG
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.
Maybe I can get it somewhere in the registry (HKLM) or ask it to the
samba logon server.
The difficulty is that a NT service can't read HKey Current User, HKCU
is only a link to HKU\SID-XXX-XXXX-...\ and there are many ways to log
on a XP box. In the last case I'm serene because the XP boxes where the
service will be installed on will never have an FTP, Terminal server or
quick user switch installed on it. Maybe there's a way to get my
information with wmi ...
Klaas
(why not "_wmi", "win32wmi", "2umi" ...)
More information about the Python-win32
mailing list