Try below updated code, please let me know if you still face issues
cls
@Echo Off
SetLocal EnableDelayedExpansion
if exist new.ini ( del /s /q new.ini )
set "search=1.1.1.1"
set "search2=2.2.2.2"
set "replace=7.7.7.7"
set "replace2=8.8.8.8"
for /F "tokens=*" %%a in (Apservice.ini) Do (
Set "filevalue=%%a"
Set filevalue=!filevalue:%search%=%replace%!
Set filevalue=!filevalue:%search2%=%replace2%!
Echo !filevalue!>>new.ini
)
move /y new.ini Apservice.ini
ause
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…