hello everyone I have some problem with understanding this piece of the开发者_如何学C code:
import wmi
c = wmi.WMI ()
process_id, return_value = c.Win32_Process.Create (CommandLine="notepad.exe")
for process in c.Win32_Process (ProcessId=process_id):
print process.ProcessId, process.Name
result = process.Terminate ()
I can't understand
(CommandLine="notepad.exe")
how exactly this mechanism is working? and where can I find definition of the CommandLine
thanks in advance for any help
It is sent as part of **kwargs
of def new (self, **kwargs):
as you can see in the wmi.py. The convention is always what Microsoft has defined for the process creation and you can find that in the MSDN documentation.
精彩评论