Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have a firwall VPN client on a number of laptops. Access is negotiated through the firewall when an address inside the firewall is pinged, or when the firewall itself is pinged. How on windows XP do I create batch file that will ping an IP address? When I create the batch file now with the simple ping command in it, like "ping www.yahoo.com", place it on the desktop and double click it, a DOS window opens and line after line of the command quickly scrolls through the window, but I don't get ping results and I have to just close the window. What am I doing wrong. Thanks so much for your help.

Hi,
I'll assume you have something like:-
ping host.comYou need to change to :-
ping.exe -t host.com
This will keep running and pinging till you stop it with a CTRL-C.
Good Luck!

Thank you, that sort of works, but still not exactly what I'm looking for. I don't need the file to repeatedly ping. I just need it send out the usual three pings, wait for the results or time out, and then close automatically. I don't even need it to wait for the results as long as it sends the pings out. It just has to ping the firewall to begin the negotiation process (which is handled by the firewall client vpn) and then close. I want to make it as easy as possible for the user so they just double click on the batch file, and have it run and close automatically.

Okay. Here's 3 ways to do it.
1) Edit your batch file and type in your command like this:
CMD /C PING www.yahoo.com2) Edit your shortcut properties and show the target like this:
CMD /C
3) Use example 1 in a Shortcut file without even having to create a batch file:
Right-click on the Desktop, select New, Shortcut. Type this for the location of the item: CMD /C PING www.yahoo.com then click Next, Name your Shortcut and click Finish. There you go.
The /C switch executes the shell command and terminates. If you want to view all the switches, open up a shell and type CMD /?.
Happy computing!!

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |