Automatically ping the default gateway (XP)

TechnoPro

Golden Member
Jul 10, 2003
1,727
0
76
Normally, at a command prompt, one would run an IPCONFIG /ALL command to obtain the default gateway, then PING that IP address. This is a 2 step process I was hoping to automate into one script.

Basically, I would like to display the default gatweay, set it as a local variable, then ping that variable. Any ideas on how to accomplish this?