用vb脚本改变用户的ip.网关.dns

前端之家收集整理的这篇文章主要介绍了用vb脚本改变用户的ip.网关.dns前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
Dim IP Ip=InputBox("请输入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

猜你在找的VB相关文章