C
Colin Brown
Recently I was looking for remote management tools and came across
"Windows Management Instrumentation". There is a python interface
available:
http://tgolden.sc.sabren.com/python/wmi.html
I was amazed how easy it became to access just about anything under
the hood (later versions of NT, 2000, XP) using a couple of lines of code!
If you have privileged access to remote computers you can interrogate
them as well. My attempts to modify things were less successful :-(
Colin Brown
PyNZ
With python, win32all and wmi installed, try these code snippets
to get some idea of what is available:
-------------------------------
import wmi
w = wmi.WMI()
for process in w.Win32_Process():
if process == 'python':
print process
-------------------------------
import wmi
c = wmi.WMI()
list = c.classes
out = []
for item in list:
if item[:1] <> '_':
out.append(item)
open('classes.txt','w').write('\r\n'.join(out))
print 'View classes.txt in a browser'
---------------------------
import wmi
c = wmi.WMI()
for x in c.Win32_NetworkAdapter():
print x
--------------------------
"Windows Management Instrumentation". There is a python interface
available:
http://tgolden.sc.sabren.com/python/wmi.html
I was amazed how easy it became to access just about anything under
the hood (later versions of NT, 2000, XP) using a couple of lines of code!
If you have privileged access to remote computers you can interrogate
them as well. My attempts to modify things were less successful :-(
Colin Brown
PyNZ
With python, win32all and wmi installed, try these code snippets
to get some idea of what is available:
-------------------------------
import wmi
w = wmi.WMI()
for process in w.Win32_Process():
if process == 'python':
print process
-------------------------------
import wmi
c = wmi.WMI()
list = c.classes
out = []
for item in list:
if item[:1] <> '_':
out.append(item)
open('classes.txt','w').write('\r\n'.join(out))
print 'View classes.txt in a browser'
---------------------------
import wmi
c = wmi.WMI()
for x in c.Win32_NetworkAdapter():
print x
--------------------------