"rrjmd" <(E-Mail Removed)> wrote in message
news:1A55A180-2463-49A8-A412-(E-Mail Removed)...
> thanks again for your reply. I should have said that before I sent the
> message in I tried for weeks - pinging from the command line as well as
> turning off zone alarm etc.
>
> I did as you suggested, again, and it didn't work - the first time. Then
> with simply pasting your suggested ping to google in the command line
> again
> and repeating - it worked! I got a response that it was pinging google and
> recieving 4 packets back. then it hung.
>
> So I used my "keepopen" bat again - and, lo, for the first time, it also
> opened the new window, processed "ping www.1.google.com" - it recieved
> four
> responses - then it gave me the times - before it simply quit.
>
> I don't know why, this time (out of about 100) it worked - I did nothing
> different [except install 3 of today's window's security updates] but it
> sort
> of did work-- almost.
>
> I don't know why it changed my ping from www.google.com to
> www.1.google.com
> - nor why it recieved four responses to my one ping - nor why it only did
> it
> once when I've got a "goto again" in the file.
>
> after displaying the resulting times the cursor just did a [cr] and set
> there blinking under the first character in the line above it [ but it did
> NOT display the usual c:\\ prompt]
>
> we're close but oh so far.
You're not far at all. You get four pings when the file first runs because
that is the default for the ping command. If you want only one, change the
third line of your batch file to the following:
ping -n 1
www.google.com
That tells it to ping
www.google.com one time. You are being redirected to
www.1.google.com as google probably has a farm and traffic rolls to
different servers based on availability. Finally, you are getting no
response after the four pings of google because you are not waiting long
enough. The commands as provided ping google and then ping localhost 120
times. I assume this is there as you don't need to constantly ping google
to keep the connection open, so it pings google, then pings localhost 120
times just to do something. After the 120 pings of localhost it will then
ping google again. You don't see the pings to localhost in the output
window because of the redirect of output to the nul handle (> nul) that is
at the end of the forth line. Bump the 120 in that line down to a smaller
number if you want it to ping google more often, try 10 if you want to see
it after a short time.
Alternatively, instead of pinging localhost over and over to kill time, you
might try using a sleep utility that will basically sleep for a period of
time and then start your loop again. One such as available at
http://support.teloep.org/download.htm. Download and extract sleep.zip from
that page and then change your batch file as follows:
@echo off
:again
ping -n 1
www.google.com
sleep 10000
goto again
This will ping google only once, sleep for 10 seconds (the parameter to
sleep is in milliseconds) and then loop back and ping google again.
--
Tom Porterfield