4

This question already has an answer here:

When I type these:

ping yahoo.com 

or

ping -n or ipconfig

The answer is just this

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

or

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

i tried these 2 solutions.

Go to Properties in My computer, Advanced system settings → Advanced → Environment Variables Select 'PATH' from the list of system variables and edit and set PATH to c:\windows\system32 ; this will solve your problem.

If still you have a problem, do the below steps

Control Panel → System and security → Windows Firewall → Advanced settings → Inbound rules → New rule → custom rule

Im Protocol and ports: Protocol: ICMPv4 on the same panel go to customize, choose "Specific ICMP types", check the box "echo request"

but it is still a problem, how can I solve it?

marked as duplicate by Ƭᴇcʜιᴇ007, Kevin Panko, Windos, DavidPostill, Raystafarian Nov 4 '14 at 17:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • I had a similar issue, and was able to run ping and other commands only if I navigated into c:\windows\system32 within DOS and ran the command from that location. I don't know why it would work from there, as PATH was set to the same location. The issue disappeared with a new machine, but I never did figure out why. – Dallas Apr 25 '14 at 19:00
  • check your PATH (invoking path command), perhaps it is broken with space not escaped or non printable charaters ? – mpromonet Sep 4 '14 at 17:27
  • 2
    the error definitely points to a PATH problem – Keltari Sep 4 '14 at 17:47
7

When you updated your Path variable, did you close and then reopen the Command Prompt before you tried running those commands again? Because you need to (or possibly restart).

It sounds like your Path variable may have been overwritten by accident.

If you navigate to C:\WINDOWS\system32, and try to run ping from there, does it work? If so, it is your PATH variable that has the problem.

0

The path is now managed by Windows 7 and not the autoexec.bat or autoexec.nt files. To change the system environment variables, follow the below steps.

From the desktop, right-click My Computer and click Properties.
In the System Properties window, click on the Advanced tab.
In the Advanced section, click the Environment Variables button.
Finally, in the Environment Variables window (as shown below), highlight the Path variable in the Systems Variable section and click the Edit button. Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon as shown below.

This is the default PATH environment variable setting on fresh install of Windows 7

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

-1

It's not clear what kind of OS you are using, since both OS/2 and Windows NT have cmd.exe.

In the case of Windows, you might try re-expanding the files from your install disk (asumming windows xp or earlier). Maybe you need to set your NIC to use TCP/IP, which might reinstall these files.

  • OS/2 has been discontinued since 2001 ! Is it still used by anyone? – userSteve Jun 4 '18 at 15:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.