前端之家收集整理的这篇文章主要介绍了
用vb脚本改变用户的ip.网关.dns,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
Dim IP Ip=Input
Box("请输入IP") strSubnetMask=Array("255.255.255.0") DefaultIPGateway=Array("192.168.2.253") DNSServer=Array("61.139.2.69") strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colNetAdapters = objWMIService.ExecQuery _ ("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE") strIPAddress=Array(Ip) For Each objNetAdapter in colNetAdapters errEnable=objNetAdapter.EnableStatic(strIPAddress,strSubnetMask,DefaultIPGateway,DNSServer) Next
原文链接:/vb/258999.html