0
我已经尝试使用此脚本来更改Windows XP上的ipaddress并且它工作得很好。在Windows 7上使用vbs更改ip地址
Dim strIPAddress
Dim strSubnetMask
Dim strGateway
Dim intGatewayMetric
Dim strDns1
Dim strDns2
strIPAddress = "10.10.10.50"
strSubnetMask = "255.255.255.0"
strGateway = "10.10.10.1"
intGatewayMetric = 1
strDns1 = "10.10.10.9"
strDns2 = "10.10.10.10"
Set objShell = WScript.CreateObject("Wscript.Shell")
objShell.Run "netsh interface ip set address name=""Local Area Connection"" static " & strIPAddress & " " & strSubnetMask & " " & strGateway & " " & intGatewayMetric, 0, True
objShell.Run "netsh interface ip set dns name=""Local Area Connection"" static "& strDns1, 0, True
objShell.Run "netsh interface ip add dns name=""Local Area Connection"" addr="& strDns2, 0, True
Set objShell = Nothing
WScript.Quit
我有什么改变,以得到它的工作与Windows 7,请
感谢 克里斯