
Batch Script Version-1 (AutoPingDefaultGW-v1.bat) Source Code:
echo off cls@For /f "tokens=3" %%* in ( 'route.exe print ^|findstr "\<0.0.0.0\>"' ) Do @Set "DefaultGW=%%*" Echo Auto Ping - Default Gateway: %DefaultGW% Echo.ping.exe -t %DefaultGW% |
Batch Script Version-2 (AutoPingDefaultGW-v2.bat) Source Code:
echo off cls Echo Auto Ping - Default Gateway: Echo. for /f "tokens=2 delims=:" %%g in ('netsh interface ip show address ^| findstr "Default Gateway"') do ping -t %%g |
Download Script-1: AutoPingDefaultGW-v1.rar
Download Script-2: AutoPingDefaultGW-v2.rar
Hiç yorum yok:
Yorum Gönder