I need to create a batch file, in Windows, that will ping an IP address, and if the host is alive, do nothing, but if the host is not responding, execute a DNS command using the dnscmd.exe file.
I have the dnscmd.exe syntax worked out and that works fine when I execute it manually or in a simple batch.
Where I need help is coming up with the right syntax to execute a ping, and depending on the result, either do nothing, or execute the dnscmd command string.
I think I've figure out the best way to determine success or failure of the ping. If you key in on checking for the appearance of "TTL=" that will tell you success or failure. I just can't come up with a way to execute the ping, look for TTL= and then perform either an exit or run my dnscmd command.