楼主的标题虽然构不成违规,但确实是不通顺,还请修改一下
代码如下:- @echo off&selocal enabledelayedexpansion
- for /f %%i in (ip.txt) do set /a n+=1&set "_!n!=%%i"
- echo 开始设置本机网络地址!
- netsh interface ip set address "本地连接" source=static addr=%_1% mask=%_2%
- netsh interface ip set address "本地连接" gateway=%_3%
- echo 正在设置本机DNS ,请稍等......
- netsh interface ip delete dns "本地连接" addr=all
- for /l %%i in (4,1,6) do netsh interface ip add dns "本地连接" addr=!_%%i!
- ipconfig /flushdns
- echo 设置完成!&pause>nul
复制代码
[ 本帖最后由 batman 于 2008-9-12 10:39 编辑 ] |