9月262015
可选择的IP自动填写切换一键设定IP批处理bat
手动一键修改电脑IP批处理,很方便的不用人工去网络连接中改IP,可选择的IP自动填写切换一键设定IP不用愁,分自动DHCP手工设定都包含其中了,提供选择来设定。代码如下,可以复制出来,然后新建文本粘贴在里面,在另存为 .bat 文件即可执行了。
@echo off mode con cols=80 lines=20&color 0d title 可选择的IP自动填写切换批处理 :st cls echo. echo 请根据序号选择设定本地连接IP echo by 5ijoy 改编 echo. echo 1.DHCP自动获取 echo 2.手动设置newifi网络IP,网段是192.168.99.0 echo 3.手动设置F4网络IP,网段是192.168.33.0 echo. set /p ip=请输入序号: echo. if %ip%==1 goto zd if %ip%==2 goto sd if %ip%==3 goto sd2 echo|set /p a=输入错误,请重新输入...&pause>nul&&goto st :zd netsh interface ip set address name=本地连接 source=dhcp netsh interface ip set dns name=本地连接 source=dhcp echo 设置完毕... ping -n 2 127.0.0.1>nul exit :sd netsh interface ip set address "本地连接" static 192.168.99.12 255.255.255.0 192.168.99.1 1 netsh interface ip set DNS "本地连接" static 192.168.99.1 netsh interface ip add dns "本地连接" 114.114.114.114 index=2 if exist %SystemRoot%\setupapi.log del /q %SystemRoot%\setupapi.log ping -n 2 192.168.99.1 echo 设置完毕... exit :sd2 netsh interface ip set address "本地连接" static 192.168.33.254 255.255.255.0 192.168.33.1 1 netsh interface ip set DNS "本地连接" static 192.168.33.1 netsh interface ip add dns "本地连接" 114.114.114.114 index=2 if exist %SystemRoot%\setupapi.log del /q %SystemRoot%\setupapi.log ping -n 2 192.168.33.1 echo 设置完毕... exit :err echo. echo 手动设置失败 echo|set /p a=请检查一下IP输写是否正确... pause>nul goto st
本文固定链接: http://www.5ijoy.cn/joy/auto_ip.html
木有头像就木JJ啦!还木有头像吗?点这里申请属于你的个性Gravatar头像吧!
[围观]