cmd script problem

  • Thread starter Thread starter BigMan
  • Start date Start date
B

BigMan

I've written a bat file of a single line: start "test" ping
www.microsoft.com. A strange thing happens when I execute it on my WinXP Pro
SP2 (with auto updates on) - a lot of cmd windows get open and the system
hangs up. What's the problem and why cannot I start a ping in a separate
window?
 
Hello, BigMan:
On Sun, 14 Nov 2004 10:11:14 +0200: you wrote...

B> I've written a bat file of a single line: start "test" ping
B> www.microsoft.com. A strange thing happens when I execute it on my WinXP
B> Pro SP2 (with auto updates on) - a lot of cmd windows get open and the
B> system hangs up. What's the problem and why cannot I start a ping in a
B> separate window?
B>

The problem is that you called the file ping.bat or ping.cmd. The batch file
then is calling itself over and over again. EIther change the name or change
the line in the batch to
start "test" ping.exe www.microsoft.com
or
start "test" %WINDIR%\System32\ping www.microsoft.com

Btw, if you are actually using www.microsoft.com, it's not pingable. They
drop ICMP packets to reduce DoS attacks.

Regards, Paul R. Sadowski [MVP].
 
Back
Top