knightseal 发表于 2010-3-31 14:14:05

$rc=_RunDOS("netsh interface ip set address ""本地连接"" static addr="&_GUICtrlIpAddress_Get($ip)&" mask="&_GUICtrlIpAddress_Get($Mask)&"")
                                _RunDOS("netsh interface ip set address name=""本地连接"" gateway="&_GUICtrlIpAddress_Get($GW)&" gwmetric=0")
                                _RunDOS("netsh interface ip set dns name=""本地连接"" source=static addr="&_GUICtrlIpAddress_Get($dns))
                                _RunDOS("netsh interface ip add dns name=""本地连接"" "&_GUICtrlIpAddress_Get($dns2))
                              
这是我在你的基础上修改的 现在是可以了,但是有个问题 就是 似乎 不是100% 成功,有的时候 IP改了,网关没改,或者dns 没改 ,似乎是设置没全部完成 ,但是再点一次就好了!请高人指点 难道加上sleep?或者是改成runwait?

a62105400 发表于 2010-4-5 08:37:40

回复 15# knightseal
我知道,有时可以有时不会变,你先去DOS下用把整段命令打出来看改得了不,不行的话 可能要一步一步的进入,改不了IP可能是没有进入netsh
页: 1 [2]
查看完整版本: 求这个IP设置工具的源码