Toff wrote:
hello
I don't understand why this doesn't woks.
def setwins(self):
from win32com.client import GetObject
objWMIService = GetObject("winmgmts:
{impersonationLevel=impersonate}!\\\\.\\root\\cimv2")
colNicConfigs = objWMIService.ExecQuery ("SELECT * FROM
Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
for nic in colNicConfigs:
print nic.Description
nic.SetWINSServer('','')
it looks good
http://msdn.microsoft.com/en-us/library/aa393624(VS.85).aspx
What happens when you try? An error? Nothing?
Can you try it using my wmi module:
http://timgolden.me.uk/python/wmi.html
<code - untested>
import wmi
c = wmi.WMI ()
for nic in c.Win32_NetworkAdapterConfiguration (IPEnabled=True):
print nic.Description
nic.SetWINSServer ("", "")
</code>
TJG
--
http://mail.python.org/mailman/listinfo/python-list