Chinaunix首页 | 论坛 | 博客
  • 博客访问: 433063
  • 博文数量: 52
  • 博客积分: 1076
  • 博客等级: 准尉
  • 技术积分: 821
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-18 20:05
个人简介

Hello World !

文章分类

全部博文(52)

文章存档

2016年(1)

2014年(1)

2013年(8)

2012年(38)

2011年(4)

分类: WINDOWS

2012-03-20 21:31:43

批处理改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
阅读(810) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~