一台计算机开机时运行的bat文件内容如下
netsh interface ip delete address 本地连接 gateway=all
netsh interface ip add address 本地连接 gateway=192.168.0.253 gwmetric=1
netsh interface ip delete dns 本地连接 all
netsh interface ip add dns 本地连接 202.99.192.68
netsh interface ip add dns 本地连接 202.99.192.66 index=2
作用就是双线上网,切换线路我现在想用VB实现,应该怎样弄啊,大家给指点一下.
netsh interface ip delete address 本地连接 gateway=all
netsh interface ip add address 本地连接 gateway=192.168.0.253 gwmetric=1
netsh interface ip delete dns 本地连接 all
netsh interface ip add dns 本地连接 202.99.192.68
netsh interface ip add dns 本地连接 202.99.192.66 index=2
作用就是双线上网,切换线路我现在想用VB实现,应该怎样弄啊,大家给指点一下.
Shell "cmd c:\aaa.bat"
Private Sub Command1_Click()
Shell "netsh interface ip delete address ±¾µØÁ¬½Ó gateway=all", vbHide
Shell "netsh interface ip add address ±¾µØÁ¬½Ó gateway=192.168.0.253 gwmetric=1", vbHide
Shell "netsh interface ip delete dns ±¾µØÁ¬½Ó all", vbHide
Shell "netsh interface ip add dns ±¾µØÁ¬½Ó 202.99.192.68", vbHide
Shell "netsh interface ip add dns ±¾µØÁ¬½Ó 202.99.192.66 index=2", vbHide
End Sub
Shell "netsh interface ip delete address 本地连接 gateway=all", vbHide
Shell "netsh interface ip add address 本地连接 gateway=192.168.0.253 gwmetric=1", vbHide
Shell "netsh interface ip delete dns 本地连接 all", vbHide
Shell "netsh interface ip add dns 本地连接 202.99.192.68", vbHide
Shell "netsh interface ip add dns 本地连接 202.99.192.66 index=2", vbHide
End Sub
http://www.powerbasic.cn/products/AutoShutdown.rar