Un an unrelated note, I once tried to make a batch file check the routers IP (192.168.1.1, 1.0, 0.1 or 0.0).
Didn't succeed, it's quite quirky :p
@echo off
ECHO --------------------------------
ECHO Checking if it's 192.168.0.0...
ping -n 1 192.168.0.0
ECHO --------------------------------
IF NOT ERRORLEVEL 1 goto :SUCCESS_00
IF ERRORLEVEL 1 goto :01
:01
ECHO Nope!
ECHO --------------------------------
ECHO Checking it it's 192.168.0.1...
ping -n 1 192.168.0.1
ECHO --------------------------------
IF NOT ERRORLEVEL 1 goto :SUCCESS_01
IF ERRORLEVEL 1 goto :10
:10
ECHO Nope!
ECHO --------------------------------
ECHO Checking it it's 192.168.1.0...
ping -n 1 192.168.1.0
ECHO --------------------------------
IF NOT ERRORLEVEL 1 goto :SUCCESS_10
IF ERRORLEVEL 1 goto :11
:11
ECHO Nope!
ECHO --------------------------------
ECHO Checking it it's 192.168.1.1...
ping -n 1 192.168.1.1
ECHO --------------------------------
IF NOT ERRORLEVEL 1 goto :SUCCESS_11
IF ERRORLEVEL 1 goto :FAILURE
:SUCCESS_00
ECHO Success!
ECHO --------------------------------
ECHO You are connected to your router through 192.168.0.0!
ECHO Will ping it continuously now.
ECHO --------------------------------
ping -t 192.168.0.0
:SUCCESS_01
ECHO Success!
ECHO --------------------------------
ECHO You are connected to your router through 192.168.0.1!
ECHO Will ping it continuously now.
ECHO --------------------------------
ping -t 192.168.0.1
:SUCCESS_10
ECHO Success!
ECHO --------------------------------
ECHO You are connected to your router through 192.168.1.0!
ECHO Will ping it continuously now.
ECHO --------------------------------
ping -t 192.168.1.0
:SUCCESS_11
ECHO Success!
ECHO --------------------------------
ECHO You are connected to your router through 192.168.1.1!
ECHO Will ping it continuously now.
ECHO --------------------------------
ping -t 192.168.1.1
:FAILURE
ECHO Nope!
ECHO --------------------------------
ECHO You are not connected to a router through one of these.
pause
goto :END
:END