"Tim Golden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
[Sergey]

>| >import wmi
>| >c = wmi.WMI (computer="srv", user="[EMAIL PROTECTED]", 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:
>http://timgolden.me.uk/python/wmi_cookbook.html
>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=wmi.WMI()
>>> 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__
    handle_com_error (error_info)
  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?


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to