Scripting WMI with win32com
David Bolen
db3l at fitlinxx.com
Fri Jan 26 21:09:28 EST 2001
"Roger Upole" <rupole at msn.com> writes:
> Here's an example of how to call the Terminate method of a Win32_Process
> instance,
> where proc is the process object:
>
> meth = proc.Methods_('Terminate')
> parms=meth.InParameters
> parms.Properties_('Reason').Value=69
> proc.ExecMethod_('Terminate',parms)
Ah - I had gotten as far as ExecMethod_ but then got lost in the
VBScript examples using SpawnInstance_ and stuff. This really isn't
too bad overall (and the result and out parameters are easy to access
in the resulting object).
Thanks a bunch.
--
-- David
--
/-----------------------------------------------------------------------\
\ David Bolen \ E-mail: db3l at fitlinxx.com /
| FitLinxx, Inc. \ Phone: (203) 708-5192 |
/ 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \
\-----------------------------------------------------------------------/
More information about the Python-list
mailing list