s323 at mail.ru
Thu Mar 2 14:21:39 CET 2006
"Tim Golden" <tim.golden at viacom-outdoor.co.uk> wrote in message news:mailman.2606.1141304051.27775.python-list at python.org...
>| >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.
>Also, in case you haven't, have a look at the cookbook page:
>which has several useful examples.
Yes, I had run it.
And, just now I updated python, pythonwin and wmi.py to latest version. And got:
>>> a.Win32_Process.Create(CommandLine="notepad.exe") # --- it works
>>> a.Win32_Process.new().Create(CommandLine="notepad.exe") # it still fail
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "wmi.py", line 361, in __call__
File "wmi.py", line 208, in handle_com_error
raise x_wmi, "\n".join (exception_string)
wmi.x_wmi: -0x7ffdfff7 - Exception occurred.
Error in: SWbemObjectEx
-0x7ffbefff - Generic failure
Without 'new' everything works. And does everything I need from it.
And, I have another question. Is there way to access WMI from linux?
More information about the Python-list