东莞商城网站建设公司,母婴用品网站建设,网站的文本链接怎么做,深圳燃气公众号经常在两个网段间转换 常改ip#xff0c;找了一个改ip的脚本稍微改了一下#xff0c;让他适合我的情况#xff08;自动判断我的ip#xff09;strComputer .SetobjWMIService GetObject(winmgmts:\\strComputer \root\cimv2)…经常在两个网段间转换 常改ip找了一个改ip的脚本稍微改了一下让他适合我的情况自动判断我的ipstrComputer .Set objWMIService GetObject(winmgmts:\\ strComputer \root\cimv2)Set colNetAdapters objWMIService.ExecQuery _ (Select * from Win32_NetworkAdapterConfiguration where IPEnabledTRUE)For Each objNetAdapter in colNetAdapterssipobjNetAdapter.IPAddressif sip(0)10.35.4.34 then 判断要替换的ip strIPAddress Array(192.168.8.4) 替换ip strSubnetMask Array(255.255.255.0) strGateway Array(192.168.8.1) 修改网关else strIPAddress Array(10.35.5.34) strSubnetMask Array(255.255.255.0) strGateway Array(10.35.5.1) end ifstrGatewayMetric Array(1) errEnable objNetAdapter.EnableStatic(strIPAddress, strSubnetMask) errGateways objNetAdapter.SetGateways(strGateway, strGatewaymetric) If errEnable 0 Then WScript.Echo The IP address has been changed as strIPAddress(0) Else WScript.Echo The IP address could not be changed. End If exit for 只修改第一个网卡的设置Next 转载于:https://www.cnblogs.com/zqg918/archive/2006/10/14/528731.html