[python-win32] what's wrong with the wmi.Terminate() method?

2008-01-23 Thread thunder thunder54007
hi, here is my script: import win32con import time import wmi c = wmi.WMI() for process in c.Win32_Process(name = "notepad.exe"): print process.ProcessId, process.Name process.Terminate () when I have only one notepad.exe process in my system, this works fine, but when I have more than o

[python-win32] Why Win32_ prefixed classed in wmi didn't work?

2008-01-24 Thread thunder thunder54007
Hello, here is the problem. code like this in pythonwin: >>> import wmi >>> c = wmi.WMI() >>> print c.Win32_NetWorkAdapter.AdapterTypeID None >>> print c.Win32_NetWorkAdapter.Availability None >>> print c.Win32_NetWorkAdapter.Caption None >>> print c.Win32_NetWorkAdapter.AdapterType None this sa