[python-win32] WMI Security Access?

Jan Van Uytven (Wyvern) wyvernlist at crm3.com
Fri Nov 26 20:25:10 CET 2004


I'm trying to use wmi to 'catch' events as they are being sent to the
event log.

>>> import wmi
>>> c=wmi.WMI()
>>> event_watcher=c.watch_for
(notification_type="Creation",wmi_class="Win32_NTLogEvent")
C:\Python23\lib\site-packages\wmi.py:126: FutureWarning: hex()/oct() of
negative int will return a signed string in Python 2.4 and up
  exception_string = ["%s - %s" % (hex (hresult_code), hresult_name)]
C:\Python23\lib\site-packages\wmi.py:130: FutureWarning: hex()/oct() of
negative int will return a signed string in Python 2.4 and up
  exception_string.append ("  %s - %s" % (hex (scode),
error_description.strip ()))
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
  File "C:\Python23\Lib\site-packages\wmi.py", line 658, in watch_for
    handle_com_error (error_info)
  File "C:\Python23\Lib\site-packages\wmi.py", line 131, in
handle_com_error
    raise x_wmi, "\n".join (exception_string)
x_wmi: 0x80020009 - Exception occurred.
  Error in: SWbemServicesEx
  0x80041003 - Access denied
>>> 

What is causing this issue? I have it when logged in as a domain admin
on XP Pro or as 'computer administrator' on XP Home, but not when logged
in as an administrator on a Windows 2003 server.

Can someone shed light on this? 

Thanks,

Jan


---
Jan Van Uytven
Computer Systems & Network Engineer
Convergent Media Network
wyvern at crm3.com


>>> LEGAL STUFF <<< 
This electronic message transmission, including any attached files, 
contains information which may be confidential and/or privileged.
The information is intended to be for the SOLE use of the individual or 
entity named above. If you are not the intended recipient, be aware 
that any review, disclosure, copying, distribution or use of the 
contents of this information is prohibited. This message is not to be 
forwarded for any reason without prior consent of the sender. 

If you have received this electronic transmission in error, please 
notify the sender immediately by telephone (250) 386-4266 or by a 
'reply to sender only' message and destroy all electronic and hard 
copies of the communication, including attachments, without reading 
or saving in any manner.



More information about the Python-win32 mailing list