11

When I do ping www.google.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

What could I be doing wrong?

I'm using Windows 7, 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

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

Luiz
  • 311
  • 1
  • 3
  • 13
  • What does `dir c:\windows\system32\ping* /b` say? And, by the way, copy/paste the test from the console window, don't paste screenshots. – Michael Burr Oct 07 '14 at 23:28
  • I cant copy paste in command prompt – Luiz Oct 07 '14 at 23:29
  • @Luiz187 right click paste. right click select all and hit shift key – Steve Oct 07 '14 at 23:29
  • Yes, you can. Click the little icon in the upper left corner, choose `Edit->Mark`, select the text in the command window, and hit `Enter` (or go back to the same menu and choose `Edit->Copy`). Perhaps you need to find a tutorial that shows you how to use Windows before you try writing batch files. :-) – Ken White Oct 07 '14 at 23:30
  • there is no \ping* /b is that the issue? – Luiz Oct 07 '14 at 23:34
  • most likely it is getting deleted by your lovely anti-virus. Time to yell @ them for it – Steve Oct 07 '14 at 23:37
  • Try running `sfc.exe /scanfile=c:\windows\system32\ping.exe` to see if Windows will restore the protected system file. – Michael Burr Oct 07 '14 at 23:49

2 Answers2

29

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
Scott C
  • 1,660
  • 1
  • 11
  • 18
  • I think i have installed it. – Luiz Oct 07 '14 at 23:39
  • This will probably be the problem - and if the path has been changed then other folders are probably missing as well. – foxidrive Oct 07 '14 at 23:52
  • On your desktop, you should have an icon labelled "Computer" ("My Computer" was older operating systems) Updated my instructions above, including a final step. – Scott C Oct 08 '14 at 00:07
  • Is this it? http://i.imgur.com/ipuJPGF.png – Luiz Oct 08 '14 at 00:20
  • No, that's a long way from the Computer icon on the desktop... Have a read of some instructions on setting environment variables. http://www.computerhope.com/issues/ch000549.htm An alternative would be to press the Windows key+Pause (break) and go to the advanced tab. Good luck – Scott C Oct 08 '14 at 12:11
  • Once you have updated the PATH variables, you have to exit the command prompt and then execute ping again. – manit Sep 24 '15 at 21:19
6

Assuming you are using Win 64bit version of windows. Go under C:\Windows\SysWOW64 and see if you can find PING.EXE under the folder. If not, go download one. Someone or something(virus) might have deleted it

Edited: Go under C:\Windows\System32 to find PING.EXE if you are using 32 bit.

Mahdi Bashirpour
  • 17,147
  • 12
  • 117
  • 144
Steve
  • 11,696
  • 7
  • 43
  • 81