用netsh自动切换IP

1. 设置中输入固定的IP和DNS,然后运行CMD命令输入以下命令:netsh -c interface dump >c:\staticip.txt

2. 用同样的方法将网卡TCP/IP属性设置成在自动分配IP的网络配置,执行以下命令:netsh -c interface dump >c:\autoip.txt

3.制作批处理文件staticip.bat内容为:netsh -f c:\staticip.txt
   制作批处理文件autoip.bat内容为:netsh -f c:\autoip.txt   
   

posted on 2006-11-01 11:13  SuperCai  阅读(487)  评论(0编辑  收藏  举报

导航