'ping' is not recognized as an internal or external command operable program or batch file error

Wai picture Wai · Oct 8, 2014 · Viewed 43.4k times · Source

When I do ping www.otbotweb.com I get the error message

'ping' is not recognized as an internal or external command operable program or batch file.

Here is an example:

Command Prompt Ping

Then:

Error Command Prompt

So why? What is wrong am I doing it wrong?

WINDOWS 7 BTW AND 64 Bit

There was some tutorial online that said to look up Systems32. And that didnt even show up! In the search at the image there

Windows menu button

I have also restarted my computer (MANY MANY TIMES)

I've had this for over 6 months and its really beginning to cause me problems.

Also if you believe this is off topic please explain first :P

Answer

Scott C picture Scott C · Oct 8, 2014

Most likely something has removed the system32 directory from your path. Have you installed the Java SDK? It has a reputation for doing that.

To check this, at the command prompt type path (followed by enter)

If c:\windows\system32 isn't there, it needs to be added back in. To do this:

From the desktop, Right click 'Computer', click 'Properties'
     then click 'Advanced system settings' 
            - this should bring up the System Properties - Advanced tab
Click 'Enviornment Variables'
Select the system variables 'PATH'
Edit PATH and add this line to the front
        c:\windows\system32;
or to be generic (in case you've installed windows on a different drive)
        %SystemRoot%\system32
Start a new command window to check if this has worked (or reboot)
      existing command windows will use the old path