批处理改ip........ipchange.bat
@echo off
cd\
:main
cls
echo.&echo.
echo ****************************************
echo 1. ip 192.168.94.112 公司
echo 2. ip 192.11.13.5 255.255.255.252
echo 3. ip 10.10.110.124 保险
echo 4. ip 10.1.2.96
echo 5.Input ip
echo ****************************************
echo.&echo.
set/p option=select one:
if not defined option goto main
if "%option%"=="1" goto 1
if "%option%"=="2" goto 2
if "%option%"=="3" goto 3
if "%option%"=="4" goto 4
echo.&echo.
:1
netsh interface ip set address "本地连接" static 192.168.94.112 255.255.255.0 192.168.94.254
netsh interface ip set dns "本地连接" static 210.22.54.3
goto :eof
:2
netsh interface ip set address "本地连接" static 192.11.13.5 255.255.255.252 192.11.13.4
goto :eof
:3
netsh interface ip set address "本地连接" static 10.10.110.124 255.255.255.0
netsh interface ip set dns "本地连接" static 10.10.110.18
goto :eof
:4
netsh interface ip set address "本地连接" static 10.1.2.96 255.255.255.0 10.1.2.254
netsh interface ip set dns "本地连接" static 210.22.70.3
goto :eof
:5
set /p ipmask=ip mask gateway:
netsh interface ip set address "本地连接" static %ipmask%
set /p dnsyes=dns:
netsh interface ip set dns "本地连接" static %dnsyes%
goto :eof
阅读(850) | 评论(0) | 转发(0) |