1

When I copy Windows binaries like ping or netstat to a different location on the machine I can't get any output.

Example:

>C:\Windows\System32\ping.exe 127.0.0.1

Pinging 127.0.0.1 with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

>copy C:\Windows\System32\ping.exe n_ping.exe
        1 file(s) copied.

>n_ping.exe 127.0.0.1

>n_ping.exe 127.0.0.1 > test.out

>type test.out

>move n_ping.exe ping.exe

>.\ping.exe 127.0.0.1

>

Issue:

No output from n_ping command, but I see ICMP traffic in Wireshark.


Is there a way to get output from binaries like ping and netstat running outside of Windows folder?

3
  • 1
    Possibly related: Why is DNS apparently involved in issuing “dir” on Windows 10?
    – gronostaj
    Commented Jun 16, 2020 at 12:16
  • From help "You should only ask practical, answerable questions based on actual problems that you face." What is your actual problem? Why are you copying and renaming these files?
    – DavidPostill
    Commented Jun 16, 2020 at 17:17
  • @gronostaj, thanks. it worked. Needed to create the "en-US" folder in the same folder from where I'm running the binary
    – 4d4c
    Commented Jun 17, 2020 at 22:54

1 Answer 1

0

Solved by creating en-US folder with mui files in the same folder where binary is executed (thanks to @gronostaj - Why is DNS apparently involved in issuing "dir" on Windows 10?)

>mkdir en-US

>copy %windir%\System32\en-US\ping.exe.mui .\en-US\
        1 file(s) copied.

>.\ping.exe 127.0.0.1

Pinging 127.0.0.1 with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms
1
  • Adding a screenshot of the sub-folder/files might clarify this solutioni. Commented Jun 19, 2020 at 2:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .