@echo off
set #=q&set/azx=0x53b7e0b4
title Any question +%#%%#% %zx%
cd /d "%~dp0"
for /f "delims={,}" %%a in ('wmic NICCONFIG where "IPEnabled=TRUE" get IPAddress^|find "."') do set ip=%%~a
if not defined ip (goto end)
echo;%ip%
set "file=db_config.properties"
powershell -NoProfile -ExecutionPolicy bypass ^
$text=[IO.File]::ReadAllText('%file%', [Text.Encoding]::Default);^
$text=$text -replace '(\d+\.){3}\d+','%ip%';^
[IO.File]::WriteAllText('%file%', $text, [Text.Encoding]::Default);
:end
echo;Any question +%#%%#% %zx%
pause