level 2
@echo off
:Choice
cls & echo 选择列表:
echo. & echo 1. 10.74.128.81
echo. & echo 2. 自动IP
echo. & echo 0. 退出
echo. & Setlocal Enabledelayedexpansion
Choice /? 1>nul 2>nul && (Choice /m:"请输入序号后继续:" /n /c:120 & if !errorlevel!==3
(set Choice=0) else (set Choice=!errorlevel!)) || (set /p "Choice=请输入序号并回车: ")
if /i "!Choice!"=="1" goto :1
if /i "!Choice!"=="2" goto :2
if /i "!Choice!"=="0" goto :eof
goto :Choice
:1
netsh interface ip set address "本地连接" static 10.74.128.81 255.255.255.192
10.74.128.65 1
netsh interface ip set dns "本地连接" static 10.74.128.12 primary
netsh interface ip add dns "本地连接" static 10.74.128.13 index=2
goto :eof
:2
netsh interface ip set address "本地连接" dhcp
netsh interface ip set dns name="本地连接" source=dhcp
goto :eof
——————————————————————————————————
这是代码 每次设置完 都给你加一条 0.0.0.0 0.0.0.0 10.74.128.65 的路由
导致外网和内网 不能同时上 郁闷死了
2016年01月26日 02点01分
