Skip to content

Commit c22ad8c

Browse files
committed
Updated network ip detection
1 parent 3e71e97 commit c22ad8c

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

WebInterface/xampp_update_network_IP.bat

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,23 @@ if exist "C:\xampp" (
2323

2424
echo [INFO] Detecting network IP addresses...
2525

26-
REM Get local IP address - try 192.168.x.x first
26+
REM 10.x.x.x range
2727
set LOCAL_IP=
28-
for /f "tokens=2 delims=:" %%a in ('ipconfig ^| findstr "IPv4" ^| findstr "192.168"') do (
29-
set LOCAL_IP_RAW=%%a
30-
goto :found_local_ip
31-
)
32-
33-
REM Fallback to 10.x.x.x range
34-
if "%LOCAL_IP%"=="" (
3528
for /f "tokens=2 delims=:" %%a in ('ipconfig ^| findstr "IPv4" ^| findstr "10\."') do (
3629
set LOCAL_IP_RAW=%%a
3730
goto :found_local_ip
3831
)
32+
33+
REM Get local IP address - try 192.168.x.x
34+
35+
if "%LOCAL_IP%"=="" (
36+
for /f "tokens=2 delims=:" %%a in ('ipconfig ^| findstr "IPv4" ^| findstr "192.168"') do (
37+
set LOCAL_IP_RAW=%%a
38+
goto :found_local_ip
39+
)
3940
)
4041

42+
4143
:found_local_ip
4244
REM Trim whitespace from LOCAL_IP
4345
if defined LOCAL_IP_RAW (

0 commit comments

Comments
 (0)