This tool is used for keeping your computer/server is connected to the Internet and runs a batch file when the tool detects that the status has changed. The status is a number that is reached by the %1 variable in the batch file. The batch file is the exe filename but instead of ending .exe its .bat This tool was made for detecting my server ports being offline

Here’s the Batch file code list:

-1 The Internet is working

0 The port is closed but Internet is available

1 The port is open and reachable

2 No Internet

NOTE SEE HELP BEFORE USING, YOU CAN TYPE PINGER.EXE /?

For my Server I put the following lines in the pinger.bat file:

@echo off
if "%1"=="0" goto connect
if "%1"=="-1" goto connect
exit /b 0
:connect
exit /b %errorlevel%