cmd script problem

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?
 
P

Paul R. Sadowski [MVP]

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top