@echo off & title 替换文本内容 By 依梦琴瑶
set IPFile=%ProgramFiles(x86)%\Hintsoft\PubwinClient\ServerIP.txt
set IniFile=E:\tool\pclient\config\config.ini
set /p ServerIP=<"%IPFile%"
(for /f "delims=" %%a in ('type "%IniFile%"') do (
echo %%a|findstr /i "^serverip=" >nul && (
echo serverip=%ServerIP%
) || (
echo %%a
)
))>tmp_Config
move /y tmp_Config "%IniFile%" >nul
pause