why? [win32com/WMI]
Sergey
s323 at mail.ru
Thu Mar 2 06:53:31 EST 2006
"Tim Golden" <tim.golden at viacom-outdoor.co.uk> wrote in message news:mailman.2569.1141231029.27775.python-list at python.org...
[Sergey]
>import wmi
>c = wmi.WMI (computer="srv", user="Admin at zzz.ru", password="****")
>pid, retval = c.Win32_Process.Create (CommandLine="notepad.exe")
Wonderful... It works.
But I tryed the module, by the sample from help(wmi):
>>> remote_process = wmi.WMI (computer="pms-dc", user="...", password="...").new ("Win32_Process")
And got:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\Python24\Lib\site-packages\wmi.py", line 624, in new
return getattr (self, class_name).new (**kwargs)
File "C:\Python24\Lib\site-packages\wmi.py", line 539, in new
obj.set (**kwargs)
File "C:\Python24\Lib\site-packages\wmi.py", line 394, in set
handle_com_error (error_info)
File "C:\Python24\Lib\site-packages\wmi.py", line 199, in handle_com_error
raise x_wmi, "\n".join (exception_string)
wmi.x_wmi: -0x7ffdfff7 - Exception occurred.
Error in: SWbemObjectEx
-0x7ffbefdc - Provider is not capable of the attempted operation
So I decided to fallback to clean COM.
More information about the Python-list
mailing list