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 .


(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: C:\Windows\System32\ping.exe google.com.

Your PATH environment variable should include C:\Windows\System32.

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.

  • I have already tried this. It didn't make a difference. When I echo %path% from the regular command prompt, it prepends the admin path to the user path, and the admin path includes C:\Windows\System32, so it should be part of the path anyway. But I expected that when I use echo %path% from an admin cmd, it would return the admin path. It doesn't. It returns the same thing as the user -- the admin path + user path. – twelchcp Apr 21 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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