|
Well I searched through the forum here and there was a posting by MCA which had the following syntax He used the +EnumIPInfo(0,1). I just followed his lead. I read on this Forum that this function doesn't really work under Windows NT 4. Is that correct ? If the problem hasn't been fixed in the latest build I will need to use something for that OS. I have a WMI script which should set the gateway
strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colNetAdapters = objWMIService.ExecQuery _ ("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE") strGateway = Array("192.168.1.100") strGatewayMetric = Array(1) For Each objNetAdapter in colNetAdapters errGateways = objNetAdapter.SetGateways(strGateway, strGatewaymetric) Next
I will make the changes you recommended below on the goto and the endif. But I really need to resolve how to write the default gateway into the machines.
|