no output for ping command

M

Mike

When I run "ping" command in DOS windows, there is no output and it
returns immediately to command prompt.

What might goes wrong ?

Thanks ahead.
 
J

Jim

Mike said:
When I run "ping" command in DOS windows, there is no output and it
returns immediately to command prompt.

What might goes wrong ?

Thanks ahead.
Invoke ping this way:

Start /Run /Cmd Ping

What you did was

Start /Run Ping

Which displays as you stated.

Jim
 
M

Mike

What site are you pinging? Example:

pingwww.yahoo.com

Malke

Here is what I did and the output:

####################################################

C:\Documents and Settings>ping www.yahoo.com

C:\Documents and Settings>ping www.google.com

C:\Documents and Settings>ping.exe www.google.com

C:\Documents and Settings>%windir%\system32\ping www.google.com

C:\Documents and Settings>%windir%\system32\ping.exe www.google.com

C:\Documents and Settings>%systemroot%\system32\ping www.google.com

C:\Documents and Settings>%systemroot%\system32\ping.exe www.google.com

C:\Documents and Settings>

####################################################
 
M

Mike

What happens with these commands?

pingwww.google.com
ping.exewww.google.com
%windir%\system32\pingwww.google.com
%windir%\system32\ping.exewww.yahoo.com
%systemroot%\system32\pingwww.google.com
%systemroot%\system32\ping.exewww.yahoo.com

Anything work?
Any error messages?

Why don't my commands work?http://internet.cybermesa.com/~bstewart/cmdprompt.html#6

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

InMike <[email protected]> hunted and pecked:






- Show quoted text -

Here is what did:

#####################################
C:\Documents and Settings>ping www.yahoo.com

C:\Documents and Settings>ping www.google.com

C:\Documents and Settings>ping.exe www.google.com

C:\Documents and Settings>%windir%\system32\ping www.google.com

C:\Documents and Settings>%windir%\system32\ping.exe www.google.com

C:\Documents and Settings>%systemroot%\system32\ping www.google.com

C:\Documents and Settings>%systemroot%\system32\ping.exe www.google.com

C:\Documents and Settings>
##########################################
 
M

Mike

Invoke ping this way:

Start /Run /Cmd Ping

What you did was

Start /Run Ping

Which displays as you stated.

Jim

Actually, I used Start/Run/Cmd Ping to invoke "ping" command.
 
W

Wesley Vogel

See if one of these commands works.

ping /?
Should show ping Help.

%systemroot%\system32\dllcache\ping.exe www.yahoo.com

%systemroot%\ServicePackFiles\i386\ping.exe www.yahoo.com

If you had a ping.com, you'd get an error message when using ping with no
extension or path.

If the path was messed up, you'd get a "is not recognized" message.

Sounds like ping.exe might be messed up. If it works with the dllcache or
i386 path then WFP can fix it.

ping.exe normally exists in
C:\WINDOWS\system32
and
C:\WINDOWS\system32\dllcache
or
C:\WINDOWS\ServicePackFiles\I386

The ping.exe in C:\WINDOWS\system32 is the one that gets used. The other
one is for backup. If Windows File Protection is working correctly, the
following should help.

Try this.

Start | Run | Type: system32 | Click OK |

Size the window so you can also see your Desktop.
Scroll down to ping.exe.
Left click and drag ping.exe to your Desktop.
Wait just a minute.
Now scroll down clear to the bottom of system32.
Is there a new ping.exe there?

If there is a new ping.exe delete the one on your Desktop.
Close system32.

If there is NOT a new ping.exe drag the one on your Desktop back into
system32.
Close system32.

If there is a new ping.exe in system32, you'll see something similar to
this in the Event Viewer under System, listed as Information; Windows File
Protection:

Event Type: Information
Event Source: Windows File Protection
Event Category: None
Event ID: 64002
Date: 27-May-07
Time: 9:25:49 AM
User: N/A
Computer: GT5404
Description:
File replacement was attempted on the protected system file
c:\windows\system32\ping.exe. This file was restored to the original version
to maintain system stability. The file version of the system file is
5.1.2600.2180.

If that doesn't help expand a copy of ping.exe from the XP CD.

Ping.exe is on your XP CD listed as PING.EX_ in the I386 folder. The
underscore (_) means that the file is compressed. The compressed file needs
to be expanded to be of any use. To expand it to the proper location...

Insert your XP CD into your CD drive and enter (Copy and Paste) the
following command into the Start | Run box:

expand D:\I386\PING.EX_ c:\windows\system32\ping.exe

Hit your ENTER key or click OK.

NOTE :
Change D to your CD drive letter if different.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
M

Mike

See if one of these commands works.

ping /?
Should show ping Help.

%systemroot%\system32\dllcache\ping.exewww.yahoo.com

%systemroot%\ServicePackFiles\i386\ping.exewww.yahoo.com

If you had a ping.com, you'd get an error message when using ping with no
extension or path.

If the path was messed up, you'd get a "is not recognized" message.

Sounds like ping.exe might be messed up. If it works with the dllcache or
i386 path then WFP can fix it.

ping.exe normally exists in
C:\WINDOWS\system32
and
C:\WINDOWS\system32\dllcache
or
C:\WINDOWS\ServicePackFiles\I386

The ping.exe in C:\WINDOWS\system32 is the one that gets used. The other
one is for backup. If Windows File Protection is working correctly, the
following should help.

Try this.

Start | Run | Type: system32 | Click OK |

Size the window so you can also see your Desktop.
Scroll down to ping.exe.
Left click and drag ping.exe to your Desktop.
Wait just a minute.
Now scroll down clear to the bottom of system32.
Is there a new ping.exe there?

If there is a new ping.exe delete the one on your Desktop.
Close system32.

If there is NOT a new ping.exe drag the one on your Desktop back into
system32.
Close system32.

If there is a new ping.exe in system32, you'll see something similar to
this in the Event Viewer under System, listed as Information; Windows File
Protection:

Event Type: Information
Event Source: Windows File Protection
Event Category: None
Event ID: 64002
Date: 27-May-07
Time: 9:25:49 AM
User: N/A
Computer: GT5404
Description:
File replacement was attempted on the protected system file
c:\windows\system32\ping.exe. This file was restored to the original version
to maintain system stability. The file version of the system file is
5.1.2600.2180.

If that doesn't help expand a copy of ping.exe from the XP CD.

Ping.exe is on your XP CD listed as PING.EX_ in the I386 folder. The
underscore (_) means that the file is compressed. The compressed file needs
to be expanded to be of any use. To expand it to the proper location...

Insert your XP CD into your CD drive and enter (Copy and Paste) the
following command into the Start | Run box:

expand D:\I386\PING.EX_ c:\windows\system32\ping.exe

Hit your ENTER key or click OK.

NOTE :
Change D to your CD drive letter if different.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

InMike <[email protected]> hunted and pecked:













- Show quoted text -


Something weird happens.

When I copy the "ping.exe" from "c:\Windows\System32\" to some other
folder, like "d:\". Then I invoke it like " d:\ping.exe www.hotmail.com"
, I can see the output correctly.

Why the same "ping.exe" will behave differently in different folers ?
I don't quite get it.
 
N

Nightowl

Mike said:
Something weird happens.

When I copy the "ping.exe" from "c:\Windows\System32\" to some other
folder, like "d:\". Then I invoke it like " d:\ping.exe www.hotmail.com"
, I can see the output correctly.

Why the same "ping.exe" will behave differently in different folers ?
I don't quite get it.

Hi Mike

Does it work correctly if you specify the *literal* path, like this:

C:\Windows\System32\ping.exe www.hotmail.com

while it doesn't if you use a system variable such as %systemroot% or
%windir%?

If so, it's likely the data type of the Registry entry for your Path is
wrong -- usually REG_SZ when it should be REG_EXPAND_SZ. The link that
Wesley gave you to Bill Stewart's site has a program called Fixpath that
will change it for you, and instructions on how to do it manually if you
prefer: http://internet.cybermesa.com/~bstewart/cmdprompt.html#6
 
M

Mike

Hi Mike

Does it work correctly if you specify the *literal* path, like this:

C:\Windows\System32\ping.exewww.hotmail.com

while it doesn't if you use a system variable such as %systemroot% or
%windir%?

If so, it's likely the data type of the Registry entry for your Path is
wrong -- usually REG_SZ when it should be REG_EXPAND_SZ. The link that
Wesley gave you to Bill Stewart's site has a program called Fixpath that
will change it for you, and instructions on how to do it manually if you
prefer:http://internet.cybermesa.com/~bstewart/cmdprompt.html#6

No, it still doesn't work if I specify literal path. It's so weird.

Following is what I did:


C:\>c:\WINDOWS\system32\ping.exe www.hotmail.com

C:\>copy c:\windows\system32\ping.exe d:\
Overwrite d:\ping.exe? (Yes/No/All): y
1 file(s) copied.

C:\>d:\ping.exe www.hotmail.com

Pinging www.hotmail.aate.nsatc.net [66.35.214.30] with 32 bytes of
data:

Reply from 66.35.214.30: bytes=32 time=75ms TTL=45
Reply from 66.35.214.30: bytes=32 time=75ms TTL=45

Ping statistics for 66.35.214.30:
Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 75ms, Maximum = 75ms, Average = 75ms
Control-C
^C
C:\>
 
W

Wesley Vogel

Why don't my commands work?
http://internet.cybermesa.com/~bstewart/cmdprompt.html#6

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
Mike said:
Hi Mike

Does it work correctly if you specify the *literal* path, like this:

C:\Windows\System32\ping.exewww.hotmail.com

while it doesn't if you use a system variable such as %systemroot% or
%windir%?

If so, it's likely the data type of the Registry entry for your Path is
wrong -- usually REG_SZ when it should be REG_EXPAND_SZ. The link that
Wesley gave you to Bill Stewart's site has a program called Fixpath that
will change it for you, and instructions on how to do it manually if you
prefer:http://internet.cybermesa.com/~bstewart/cmdprompt.html#6

No, it still doesn't work if I specify literal path. It's so weird.

Following is what I did:


C:\>c:\WINDOWS\system32\ping.exe www.hotmail.com

C:\>copy c:\windows\system32\ping.exe d:\
Overwrite d:\ping.exe? (Yes/No/All): y
1 file(s) copied.

C:\>d:\ping.exe www.hotmail.com

Pinging www.hotmail.aate.nsatc.net [66.35.214.30] with 32 bytes of
data:

Reply from 66.35.214.30: bytes=32 time=75ms TTL=45
Reply from 66.35.214.30: bytes=32 time=75ms TTL=45

Ping statistics for 66.35.214.30:
Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 75ms, Maximum = 75ms, Average = 75ms
Control-C
^C
C:\>
 
M

Mike

Why don't my commands work?http://internet.cybermesa.com/~bstewart/cmdprompt.html#6

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

InMike <[email protected]> hunted and pecked:


No, it still doesn't work if I specify literal path. It's so weird.
Following is what I did:
C:\>c:\WINDOWS\system32\ping.exewww.hotmail.com

C:\>copy c:\windows\system32\ping.exe d:\
Overwrite d:\ping.exe? (Yes/No/All): y
1 file(s) copied.
C:\>d:\ping.exewww.hotmail.com

Pingingwww.hotmail.aate.nsatc.net[66.35.214.30] with 32 bytes of
data:
Reply from 66.35.214.30: bytes=32 time=75ms TTL=45
Reply from 66.35.214.30: bytes=32 time=75ms TTL=45
Ping statistics for 66.35.214.30:
Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 75ms, Maximum = 75ms, Average = 75ms
Control-C
^C
C:\>- Hide quoted text -

- Show quoted text -

Thanks, but the type of my PATH variable is correct.
 
W

Wesley Vogel

And PATH shows what when typed into a command prompt?

Should look something like this...
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem

Type SET, hit Enter and scroll down to PATHEXT.

Should look something like this...
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

As a minumum you should have .COM;.EXE;.BAT;.CMD

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Control\Session Manager\Environment
The Value Data: Path is a Data Type: REG_EXPAND_SZ and the Value Data is
what you see in PATH in a command prompt? Or %SystemRoot% is used in the
registry entry?

This is what I have in the registry.
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program
Files\Intel\DMIX

This is what shows in a command prompt...
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\
Wbem;C:\Program Files\Intel\DMIX


--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
Mike said:
Why don't my commands
work?http://internet.cybermesa.com/~bstewart/cmdprompt.html#6

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

InMike <[email protected]> hunted and pecked:


Mike <[email protected]> wrote on Sun, 27 May 2007:
Something weird happens.
When I copy the "ping.exe" from "c:\Windows\System32\" to some other
folder, like "d:\". Then I invoke it like "
d:\ping.exewww.hotmail.com" , I can see the output correctly.
Why the same "ping.exe" will behave differently in different folers ?
I don't quite get it.
Does it work correctly if you specify the *literal* path, like this:

while it doesn't if you use a system variable such as %systemroot% or
%windir%?
If so, it's likely the data type of the Registry entry for your Path is
wrong -- usually REG_SZ when it should be REG_EXPAND_SZ. The link that
Wesley gave you to Bill Stewart's site has a program called Fixpath
that will change it for you, and instructions on how to do it manually
if you prefer:http://internet.cybermesa.com/~bstewart/cmdprompt.html#6
No, it still doesn't work if I specify literal path. It's so weird.
Following is what I did:
C:\>c:\WINDOWS\system32\ping.exewww.hotmail.com

C:\>copy c:\windows\system32\ping.exe d:\
Overwrite d:\ping.exe? (Yes/No/All): y
1 file(s) copied.
C:\>d:\ping.exewww.hotmail.com

Pingingwww.hotmail.aate.nsatc.net[66.35.214.30] with 32 bytes of
data:
Reply from 66.35.214.30: bytes=32 time=75ms TTL=45
Reply from 66.35.214.30: bytes=32 time=75ms TTL=45
Ping statistics for 66.35.214.30:
Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 75ms, Maximum = 75ms, Average = 75ms
Control-C
^C
C:\>- Hide quoted text -

- Show quoted text -

Thanks, but the type of my PATH variable is correct.
 
N

Nightowl

Mike said:
No, it still doesn't work if I specify literal path. It's so weird.

Following is what I did:


C:\>c:\WINDOWS\system32\ping.exe www.hotmail.com

C:\>copy c:\windows\system32\ping.exe d:\
Overwrite d:\ping.exe? (Yes/No/All): y
1 file(s) copied.

C:\>d:\ping.exe www.hotmail.com

Pinging www.hotmail.aate.nsatc.net [66.35.214.30] with 32 bytes of
data:

<snip>

Hi Mike

Okay. . . so we have established:

Your Path looks correct;
The data type of the Path entry in the Registry is correct;
There is nothing wrong with the actual ping.exe file in
\Windows\System32 (since when you copy it to D:\, it works).

The only thing I can think of is that something is blocking the ping
command when run from that location. Have you checked your firewall in
case you have accidentally set up a rule to do that?
 
M

Mike

Mike said:
No, it still doesn't work if I specify literal path. It's so weird.
Following is what I did:
C:\>c:\WINDOWS\system32\ping.exewww.hotmail.com

C:\>copy c:\windows\system32\ping.exe d:\
Overwrite d:\ping.exe? (Yes/No/All): y
1 file(s) copied.
C:\>d:\ping.exewww.hotmail.com

Pingingwww.hotmail.aate.nsatc.net[66.35.214.30] with 32 bytes of
data:

<snip>

Hi Mike

Okay. . . so we have established:

Your Path looks correct;
The data type of the Path entry in the Registry is correct;
There is nothing wrong with the actual ping.exe file in
\Windows\System32 (since when you copy it to D:\, it works).

The only thing I can think of is that something is blocking the ping
command when run from that location. Have you checked your firewall in
case you have accidentally set up a rule to do that?

The Windows firewall is turned off.

As far as I can remember, this weird thing happened after I cleaned
some virus infecting my system. The virus might screw some settings, I
guess.
 

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