标题: 原创-----ip快速修改工具 (适合笔记本用户)
[打印本页]
作者: mayu2004
时间: 2007-12-22 17:00
标题: 原创-----ip快速修改工具 (适合笔记本用户)
因为自己是用 笔记本 比如 上课 的机房 很多 但是 ip 不一样
经常手动修改 很 麻烦 所以 写 了 个这个
里面 的 配置 自己 可以修改 一下
dns 记得修改哦 里面写的是我们 这 的 dns
@echo off
color 0a
title ……IP修改工具…… QQ 236189165
mode con cols=55 lines=25
:cho
echo.
echo. IP 快速修改工具 说明
echo.
echo. 1. 修改 ip 192.168.0.191 网关 192.168.0.1
echo. 2. 修改 ip 192.168.1.191 网关 192.168.1.1
echo. 3. 修改 ip 192.168.75.191 网关 192.168.75.254
echo. 4. 修改 ip 192.168.33.191 网关 192.168.33.254
echo. 5. 手动设置 ip 等参数
echo. 6. 退出
echo.
set choice=
echo.
set /p choice=请选择项目,回车确认:
IF NOT "%Choice%"=="" SET Choice=%Choice:~0,1%
if /i "%choice%"=="1" goto ip1
if /i "%choice%"=="2" goto ip2
if /i "%choice%"=="3" goto ip3
if /i "%choice%"=="4" goto ip4
if /i "%choice%"=="5" goto boby
if /i "%choice%"=="6" goto end
cls
echo.
echo 选择无效,请重新输入
echo.
goto cho
:ip1
netsh interface ip set address name="本地连接" source=static addr=192.168.0.191 mask=255.255.255.0 >nul
netsh interface ip set address name="本地连接" gateway=192.168.0.1 gwmetric=0 >nul
netsh interface ip set dns name="本地连接" source=static addr=202.97.224.69 register=PRIMARY >nul
cls
echo. 修改成功
goto cho
:ip2
netsh interface ip set address name="本地连接" source=static addr=192.168.1.191 mask=255.255.255.0 >nul
netsh interface ip set address name="本地连接" gateway=192.168.1.1 gwmetric=0 >nul
netsh interface ip set dns name="本地连接" source=static addr=202.97.224.69 register=PRIMARY >nul
cls
echo. 修改成功
goto cho
:ip3
netsh interface ip set address name="本地连接" source=static addr=192.168.75.191 mask=255.255.255.0 >nul
netsh interface ip set address name="本地连接" gateway=192.168.75.254 gwmetric=0 >nul
netsh interface ip set dns name="本地连接" source=static addr=202.97.224.69 register=PRIMARY >nul
cls
echo. 修改成功
goto cho
:ip4
netsh interface ip set address name="本地连接" source=static addr=192.168.33.191 mask=255.255.255.0 >nul
netsh interface ip set address name="本地连接" gateway=192.168.33.254 gwmetric=0 >nul
netsh interface ip set dns name="本地连接" source=static addr=202.97.224.69 register=PRIMARY >nul
cls
echo. 修改成功
goto cho
:end
exit
:boby
cls
echo.
echo.
set /p slection1= 替换你的IP地址:
netsh interface ip set address name="本地连接" source=static addr=%slection1% mask=255.255.255.0 >nul
echo.
echo.
echo.成功
echo.
set /p slection2= 替换你的网关地址:
netsh interface ip set address name="本地连接" gateway=%slection2% gwmetric=0 >nul
echo.
echo.
echo.成功
echo.
set /p slection3= 替换你的主dns地址:
netsh interface ip set dns name="本地连接" source=static addr=%slection3% register=PRIMARY >nul
echo.
echo.
echo.成功
echo.
cls
echo. ~~~~~~~~~~~ 成功 ~~~~~~~~~~
echo.
echo. 3 秒后退出
ping 127.255.255.255 -n 1 -w 3000 >nul
作者: awolf99
时间: 2007-12-23 13:36
不错!
作者: yxfmumu
时间: 2007-12-25 11:32
可以啊~~~~~~
学习学习
作者: james168
时间: 2008-1-25 13:13
很方便,支持了。。。。
作者: slore
时间: 2008-1-25 13:42
netsh interface ip在执行的时候我觉得卡。。。就是有点慢。不过比手动改是方便了不少
作者: ksuday
时间: 2008-1-25 15:15
学习了,