- @echo off
- set info=互助互利,支付宝扫码头像,感谢打赏
- rem 有问题,可加QQ956535081及时沟通
- title %info%
- :input
- for %%a in (
- "1=192.168.1.1"
- "2=192.168.1.55"
- "3=192.168.1.66"
- ) do (
- set "#%%~a"
- for /f "tokens=1* delims==" %%b in (%%a) do echo;%%b、更改ip为%%c
- )
-
- set "c="
- set /p c=输入数字序号:
- set "inifile=C:\MFPC_Client\MFPC_Client.ini"
-
- if not defined #%c% (echo;input error&goto end)
- if not exist "%inifile%" (echo;"%inifile%" not found&goto end)
-
- (for /f "delims=" %%a in ('type "%inifile%"') do (
- set "line=%%a"
- setlocal enabledelayedexpansion
- if /i "!line:~,9!" equ "ServerIP=" (
- echo;ServerIP=!#%c%!
- ) else echo;!line!
- endlocal
- ))>"%tmp%\t.t"
-
- move "%tmp%\t.t" "%inifile%"
-
- call echo;%%#%c%%%
- taskkill /im MFPC_Client.exe /t /f
- start "" "C:\MFPC_Client\MFPC_Client.exe"
- :end
- echo;%info%
- pause
复制代码
|