I am running Windows 10 on my PC. A couple months ago, I installed a Windows Update in the middle of the day. Prior to the update, I had been running a continuous ping from the command prompt. After completing the update, I tried to restart the ping command. I got this error: 'ping' is not recognized as an internal or external command, operable program or batch file. When I run the command prompt as administrator, the ping command is successful. I can't roll back the Windows Update, as it was installed too long ago. How can I get back the ping functionality in my regular command prompt?
First: Try a new, different, non-admin Windows User Account (Profile). Does command work in a different User? If so, damaged Windows Profile. Back up the data in it, and replace it.
Second: If no to the first point, try DISM / SFC.
(1) Open cmd.exe with Run as Administrator.
(2) DISM.exe /Online /Cleanup-image /StartComponentCleanup .
(3) DISM.exe /Online /Cleanup-Image /Restorehealth .
(4) SFC /SCANNOW .
(5) Restart when all the above is complete and test.
Third: If Command is still not working, do a Windows 10 Repair Install:
The first option (Keep Everything) is preferable if it works (usually does). The third option (Keep Nothing) is akin to a fresh install.
You should check your PATH environment variable. The PATH environment variable tells windows where to look for executables that are not in your current path.
In this case, when you run
ping from a regular command prompt your default working directory is usually somewhere in your user folder.
When you run it as admin, the default working directory is
C:\Windows\System32 which is where the ping executable is. That’s why it works as admin.
You can prove this, in a regular command prompt, by fully qualifying the command and typing:
Your PATH environment variable should include
At a command prompt you can type
echo %path% to see the current PATH environment variable. You can modify this variable in classic control panel -> System -> Advanced -> Environment Variables.