I have been having issues with my ISP‘s WiFi router, so I decided to create a batch file I could run as-needed to check internet connectivity.
@echo off cls set "router=192.168.0.1" set /p "router=Enter router IP address or press [ENTER] for default [%router%]: " @ping %router% -n 1 | FIND "Reply" @ping google.com -n 1 | FIND "Reply" @ping bing.com -n 1 | FIND "Reply" echo Press any key to exit... pause >nul
Save that as `ping.bat` and put in somewhere convenient. Then…
If you want to pin the command to your Windows start menu or taskbar, follow these instructions…
- Right-click inside a folder or your Desktop and select:
New > Shortcut
- Enter the following in the “location” field:
cmd /c “C:\path\to\your\ping.bat”
- Give the shortcut a meaningful name, I used:
Check Internet Connection
- Right-click and pin to your start menu or taskbar.