x1 recently asked about an issue with a WMI script that had an output
I guess you can get a result from an output parameter via
VT_BYREF?) if you have the Dispatch ID for the method. But for a few WMI
I’ve seen recently, I haven’t been able to get a WIN32OLE_METHOD
instance for a
lot of methods, even ones that I can invoke. For example:
Get a Win32_Process WMI object
wmi_svc = WIN32OLE.connect(“winmgmts:\\.\root\cimv2:Win32_Process”)
Try to get the method
wmi_svc.ole_method(“Create”) #=> WIN32OLERuntimeError: Not found Create
Invoke the method
wmi_svc.invoke(“Create”, “notepad”, nil, nil, nil) #=> (Creates
That last parameter is an output parameter which should return the PID
created process as a uint32.
Is there a way I can get info on a method like that, and how do I get
of an output parameter?