@echo off
@echo 上网请选输入 1 连接服务器请输入 2
@set/p output= >nul
@echo 您输入的值为%output%
@set eth="无线网络连接"
@if %output%==1 goto netPlay
@if %output%==2 goto connServer
@if %output% GTR 2 goto putError
@if %output% LSS 1 goto putError
rem 设置上网IP
:netPlay
rem eth
@echo 现在开始配置上网IP
@set ip=10.65.200.241
goto changeIP
rem 设置连接服务器IP
:connServer
rem eth
@echo 现在开始配置连接服务器IP
@set ip=192.168.10.241
goto changeIP
rem 运行更改IP
:changeIP
rem gw 默认网关
@set gw=10.65.255.254
rem netmasks 子网掩码
@set netmasks=255.255.0.0
@echo 正在将本机IP更改到: %ip%
rem
@netsh interface ip set address %eth% static %ip% %netmasks% %gw% 1
@echo.........................
@echo 检查当前本机IP:ipconfig
@echo.........................
@echo 成功将本机IP更改为%ip%!
@pause
@exit
:putError
@echo 您的输入有误
@pause
@exit