Проделал как написал.
HTML код:
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colNetAdapters = objWMIService.ExecQuery ("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
IstrIPAddress = inputBox("Введите IP?:")
strIPAddress = Array("IstrIPAddress")
IstrSubnetMask = inputBox("Введите Mask?:")
strSubnetMask = Array("IstrSubnetMask")
IstrGateway = inputBox("Введите Gateway?:")
strGateway = Array("IstrGateway")
strGatewayMetric = Array(1)
For Each objNetAdapter in colNetAdapters
errEnable = objNetAdapter.EnableStatic(strIPAddress, strSubnetMask)
errGateways = objNetAdapter.SetGateways(strGateway, strGatewaymetric)
If errEnable = 0 Then
WScript.Echo "The IP address has been changed."
Else
WScript.Echo "The IP address could not be changed."
End If
Next
Пишет IP не установлен. Где то трабла.