本帖最后由 19377708 于 2011-1-13 11:25 编辑
回复 1# xwlzx
$IP = "192.168.0.20"
$zwym = "255.255.248.0"
$router = "192.168.1.1"
$dns = "202.96.128.143"
$bak_dns = "202.96.128.86"
;修改IP,dns,路由
RunWait('netsh interface ip set address name = "本地连接" source = static addr = ' & $IP & ' mask = ' & $zwym & ' gateway = ' & $router & ' gwmetric = 0', "c:\windows\system32", @SW_HIDE)
RunWait('netsh interface ip set dns name = "本地连接" source = static addr = ' & $dns & ' register = PRIMARY', "c:\windows\system32", @SW_HIDE)
RunWait('netsh interface ip add dns name = "本地连接" addr = ' & $bak_dns & ' index=2', "c:\windows\system32", @SW_HIDE)
|