[Sergey]

| import win32com.client
| 
| loc = win32com.client.Dispatch("WbemScripting.SWbemLocator")
| svc = loc.ConnectServer("srv", "root/cimv2", "[EMAIL PROTECTED]", "******")
| sys = svc.get("Win32_Process")
| sys.create("notepad.exe")
| 
| =>
| 
| Traceback (most recent call last):
| File "remote.py", line 6, in ?
| sys.create("notepad.exe")
| TypeError: 'int' object is not callable 

I could explain (it's to do with the way in which
WMI method calls are set up) but I suggest you look at
this module <trumpet-blowing>:

http://timgolden.me.uk/python/wmi.html

which makes WMI much easier to work with.

Your example then becomes:

<code>
import wmi

c = wmi.WMI (computer="srv", user="[EMAIL PROTECTED]", password="****")
pid, retval = c.Win32_Process.Create (CommandLine="notepad.exe")
</code>

TJG

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to