0

Whenever I open up the cmd using start > run > cmd, then I run ping, for example, ping 127.0.0.1 it never runs, nothing happen at all, I just get a new line to type another command, like if I just pressed enter.

However, when I run it using C:\Windows\System32\PING.exe manually or I use the whole path with a specific target C:\Windows\System32\PING.exe 127.0.0.1 directly on the run dialog box or from the cmd itself, it will run normally. So in short, there's something wrong with the ping command when I run it from the cmd using the regular way: shortcut start > run > cmd then ping.

I already have some knowledge about those common cmd issues, like the PATH problem, but that usually have a connection with the command not been recognized as an internal or external command operable program or batch file, for me I don't have that kind of error, because like I said it just blank when I run the command no respond at all.

So I checked the PATH environment variable and everything seems to be okay, so I checked it and I have done it again and again, I even compared it with the default fresh installed Windows 8.1 PATH environment variable, because I have windows 8.1 x64, and again everything seems to be okay to me.

I have done a ton of researches before posting this question, and everything I find is related to the common PATH problem, in every forum I step in it's the same idea, so I tried to make my own post, maybe you will help me find an answer about this strange problem because is making me crazy, it's not stopping me from using ping but it's annoying, so please try to help me instead of making my post off-topic because I have seen this happen to some other question on this topic.

So this is the PATH environment variable value :

C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32\Npcap;C:\Program Files\Java\jdk1.8.0_101\bin;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\AMI\DuOS\;C:\Program Files (x86)\Brackets\command;C:\Program Files (x86)\Skype\Phone\

Those are some screens shot to the strange response :

screen shot trying to ping 127.0.0.1

screen shot trying to ping www.google.com

And they are all the same. always the same response. nothing occurs at all.

Edit 1:

Where command on ping Output :

C:\Windows\System32\PING.EXE

I already made a search command to figure out if there's any bogus ping file and this what came out after running this command dir /a /s c:\ping.*, I found 37 different ping files with different extensions, but most of them are related to trusted software I use, and yes it doesn't mean that may be one of them causing the issue. after all, I didn't catch anything strange so this is the result that comes out, try to check it out you may spot something I didn't notice : DIR - ping files result

I also tried to run the command you suggest from Windows PowerShell and this what came out : Get-ChildItem - ping files result

Edit 2:

I tried everything you suggest everything went well but the problem occurs always when I try to open up the cmd using start > run > cmd, then I run ping on a target, actually am sorry for the long-term response because the time this problem came up I got a new computer this one got dumped up and I forgot all about this over time, so I wasn't using this device for a while now, but after I checked the post response lately I tried to fix the problem again. that's when I figured out that ping actually works fine on PowerShell but still not on the command line.

  • Please edit your question to include the output from where ping – DavidPostill Dec 20 '16 at 12:33
  • I already have refer to that in the description ? – Yassine HADHADI Dec 21 '16 at 10:48
  • No you haven't. Please open a cmd shell and type where ping. Report back with the output. – DavidPostill Dec 21 '16 at 11:26
0

Check your system for bogus ping executables:

Run powershell as admin, right click, run as administrator:

Get-ChildItem -Path C:\ -Recurse -Force -Filter ping* -ErrorAction SilentlyContinue

You should only have results in the following folders:

C:\Windows\WinSxS\
C:\Windows\SysWOW64\ (If system is 64 bit)
C:\Windows\System32\
C:\Windows\Prefetch (This result is not relevant)

If you find anything like ping.cmd, ping.bat or some other ping.exe somewhere in a path statement or the local directory that you are running ping from then that may be your problem.

Try an sfc /scannow

Start > Run > cmd > sfc /scannow

Try a new windows user profile (Pro / Ultimate / Enterprise edition)

Start > Run > compmgmt.msc > Users > Right click > new user > set name and password > log out > log in as new user > try ping

Try a new windows user profile (Home edition)

Start > run > control > user accounts > make changes in PC Settings > Other accounts >  Add an account > without microsoft account > local account > set user name password > finish > log out > log in as new user > try ping

Try from a different shell like powershell

Try from safe mode to rule out malware or other processes causing a problem

Try other commands that are in path statement. Does nslookup work? What abut taskmgr?

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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