复制代码 代码如下:
@ ECHO OFF
@ ECHO.By lost63 2010.2.23
@ ECHO.功能:批处理配置IP地址。PS:本地连接 2一般为"本地连接",请根据实际情况更改!
@ ECHO. 说 明
@ ECHO -----------------------------------------------------------------------
@ ECHO 请选择:
@ ECHO 1、DHCP自动分配 2、手动指定IP,192.168.1.3
@ ECHO -----------------------------------------------------------------------
set /p what=请输入选择项(1或2)
if %what%==1 netsh interface ip set address "本地连接 2" source=dhcp
if %what%==2 netsh interface ip set address "本地连接 2" static 192.168.1.3 255.255.255.0 192.168.1.1 1
ipconfig
@ ECHO.
@ ECHO 任务已完成,按任意键关闭!
@ ECHO.
pause
@ ECHO OFF
@ ECHO.By lost63 2010.2.23
@ ECHO.功能:批处理配置IP地址。PS:本地连接 2一般为"本地连接",请根据实际情况更改!
@ ECHO. 说 明
@ ECHO -----------------------------------------------------------------------
@ ECHO 请选择:
@ ECHO 1、DHCP自动分配 2、手动指定IP,192.168.1.3
@ ECHO -----------------------------------------------------------------------
set /p what=请输入选择项(1或2)
if %what%==1 netsh interface ip set address "本地连接 2" source=dhcp
if %what%==2 netsh interface ip set address "本地连接 2" static 192.168.1.3 255.255.255.0 192.168.1.1 1
ipconfig
@ ECHO.
@ ECHO 任务已完成,按任意键关闭!
@ ECHO.
pause