Spencer Parker wrote:
Has anyone here had any experience with WMI extensions in Python?

I am trying to remotely change the IP, Subnet, and gateway of a windows machine, but I cannot figure out what it needs to change this.

You'll need the Win32_NetworkAdapterConfiguration class and,
for ease, the wmi module from here:

http://timgolden.me.uk/python/wmi.html

<code>
import wmi

c = wmi.WMI ()

for i in c.Win32_NetworkAdapterConfiguration (IPEnabled=True):
  print i

You'll need things like the .SetGateways method. You can see
all the methods thus:

print "\n".join (i.methods)

and if you print any of them, it will show its signature:

print i.SetGateways

</code>


HTH
TJG
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to