我曾尝试使用此脚本更改 windows xp 上的 ipaddress,并且效果很好。
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 一起工作
谢谢克里斯