Windows XP error, Ping not recognized as a command

Posted by: Waterman981

Windows XP error, Ping not recognized as a command - 26/06/2003 15:41

Anyone seen this before or have any idea how to fix it. I have no idea how it happened. In my network I can browse other XP machines, but nothing else (2000, 98) I haven't changed any network settings lately. I noticed this when trying to access my Tivo. I still get internet access... can hit my router, and have no problem with my empeg.

Posted by: jbauer

Re: Windows XP error, Ping not recognized as a command - 26/06/2003 16:05

Type "path" and hit enter... Do you have a path set to \windows\system32?

- Jon
Posted by: JBjorgen

Re: Windows XP error, Ping not recognized as a command - 26/06/2003 16:08

How did you go about getting that command prompt? On one machine I have, I get similar results if I just do Start->Run cmd, but if I bring it up from the shortcut on the start menu, it works ok.
Posted by: Waterman981

Re: Windows XP error, Ping not recognized as a command - 26/06/2003 16:10

it's in there....
Posted by: Waterman981

Re: Windows XP error, Ping not recognized as a command - 26/06/2003 16:11

I did do a run->cmd... but I get the same results either way.
Posted by: Magnus

Re: Windows XP error, Ping not recognized as a com - 26/06/2003 20:01

I know the $PATH has already been mentioned and you said the \windows\system32 directory was in there, but you might want to try running the commands with the full path anyway just to test. Something like:
\windows\system32\ping 192.168.1.1
The last time I saw something like this (on a 2000 box, so \winnt instead of \windows) that got it to work. No idea what causes it though.

-Magnus
Posted by: msaeger

Re: Windows XP error, Ping not recognized as a com - 26/06/2003 20:57

How about just do a search for ping.exe and see if the file is still there.
Posted by: Waterman981

Re: Windows XP error, Ping not recognized as a com - 26/06/2003 23:24

Ok, so the files are there, I don't have a virus. It is using the %systemroot% variable, and when I do a start->run->cmd %systemroot% it does bring up c:\windows like it should. In my autoexec.bat it is appending one line to the path. Hrmm... as I am messing with this my path gets reset every time I either open or close the command window. If I set the path it all works... but reopen the window and the old path statement is back.
Posted by: juenk

Re: Windows XP error, Ping not recognized as a com - 27/06/2003 04:44

It is using the %systemroot% variable, and when I do a start->run->cmd %systemroot% it does bring up c:\windows like it should. In my autoexec.bat it is appending one line to the path.

Are you sure the autoexec.bat is run when you open a command box? Or only when the system is started in DOS mode (does such a thing still exists in XP ?)

Hrmm... as I am messing with this my path gets reset every time I either open or close the command window. If I set the path it all works... but reopen the window and the old path statement is back.

Same behaviour in W2K, Linux terminal etc. Each time you open a command line session, the system starts with the defaults. Once leaving this session (e.g. with 'Exit') the local changes are lost.

You can try this by
1 opening a command box
2 check the Path
3 start a new child process ("command.exe") by typing that command on the prompt.
4 The path will be inherited from the previous process. You can change it here.
5 Leave this child session againg ("Exit")
6 Check the Path, it should be in the original state before your change.
Posted by: FlibblE

Re: Windows XP error, Ping not recognized as a com - 27/06/2003 09:08

Have you tried setting the path in the 'My Computer' properties page, under Environment Variables on the Advanced tab? Mine was SET correctly, but I found that if I appended something like ";c:\" to it then it WORKED correctly!

Cheers.
Posted by: Waterman981

Re: Windows XP error, Ping not recognized as a com - 27/06/2003 16:43

So that is where the path is set for each time you open the command prompt. Since something was screwed up I replaced every instance of %systemroot% with the actual path. Everything works now! Thanks for the help everyone!
Posted by: lectric

Re: Windows XP error, Ping not recognized as a com - 27/06/2003 17:17

Mayhaps you should check your registry. The key that controls Systemroot is HKLM/Software/Microsoft/Windows/CurrentVersion

There's a string value for SystemRoot.

Posted by: Waterman981

Re: Windows XP error, Ping not recognized as a com - 28/06/2003 11:23

I have no system root entry, only ones that refrence it. What is the string value I should enter, the name and type.
Posted by: lectric

Re: Windows XP error, Ping not recognized as a com - 28/06/2003 11:48

The string is SystemRoot and the value is c:\windows. Remember, it's not a subkey, just a value. Better yet, just open this attachment. (Have to right click and save it first.)
Posted by: Waterman981

Re: Windows XP error, Ping not recognized as a com - 28/06/2003 11:55

Cool! I placed %systemroot% back into my path and it works again. I wonder why it wasn't in the registry. Thanks for the help!
Posted by: lectric

Re: Windows XP error, Ping not recognized as a com - 28/06/2003 17:43

No problem and I'm rather curious too... I wonder if some spyware/trojan removed it.