Computing.Net > Forums > Windows XP > Ping batch file on XP

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Ping batch file on XP

Reply to Message Icon

Name: RBH68
Date: August 1, 2002 at 19:18:14 Pacific
Comment:

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.




Sponsored Link
Ads by Google

Response Number 1
Name: Artur
Date: August 1, 2002 at 22:21:24 Pacific
Reply:

Hi,
I'll assume you have something like:-
ping host.com

You 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!


0

Response Number 2
Name: RBH68
Date: August 2, 2002 at 11:48:38 Pacific
Reply:

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.


0

Response Number 3
Name: DTec
Date: August 2, 2002 at 19:50:32 Pacific
Reply:

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.com

2) 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!!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: Ping batch file on XP

Calling a batch file on a remote co www.computing.net/answers/windows-xp/calling-a-batch-file-on-a-remote-co/132243.html

BATCH FILES IN XP? www.computing.net/answers/windows-xp/batch-files-in-xp/8304.html

cant delete DOS files on XP comp www.computing.net/answers/windows-xp/cant-delete-dos-files-on-xp-comp/76822.html