Access Denied when run ping cmd

Anonymous
2010-01-12T21:39:38+00:00

I have successfully run the following command on an XP machine, but have been unable to duplicate it on my new Windows 7 laptop:

FOR /L %i IN (1,1,254) DO ping -n 1 192.168.0.%i | FIND /i "Reply">> c:\ipaddresses

I get the "Access denied" message. BUT, I AM able to ping individual ip addresses within the range just fine. I have no idea where to look for a fix for this.

Windows for home | Previous Windows versions | Internet and connectivity

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2010-01-12T23:58:31+00:00

    The script runs fine for me on my Windows 7 Ultimate Laptop.

    Did you use an Elevated command prompt? Right Click Command Prompt and run as Administrator?

    192.168.1.72 is my machine other devices are all live and return a valid response (I amended your 192.168.0.x to 192.168.1.x)

    Reply from 192.168.1.72: Destination host unreachable.

    Reply from 192.168.1.72: Destination host unreachable.

    Reply from 192.168.1.72: Destination host unreachable.

    Reply from 192.168.1.72: Destination host unreachable.

    Reply from 192.168.1.72: Destination host unreachable.

    Reply from 192.168.1.72: Destination host unreachable.

    Reply from 192.168.1.72: Destination host unreachable.

    Reply from 192.168.1.72: Destination host unreachable.

    Reply from 192.168.1.65: bytes=32 time=242ms TTL=255

    Reply from 192.168.1.72: Destination host unreachable.

    Reply from 192.168.1.72: Destination host unreachable.

    Reply from 192.168.1.72: Destination host unreachable.

    Reply from 192.168.1.69: bytes=32 time=13ms TTL=128

    Reply from 192.168.1.72: Destination host unreachable.

    Reply from 192.168.1.72: bytes=32 time<1ms TTL=128

    Reply from 192.168.1.72: Destination host unreachable.

    Reply from 192.168.1.72: Destination host unreachable.


    Regards, Mark Parris MVP-DS. UK Community Lead, Active Directory User Group http://adug.co.uk Windows Server User Group http://wsug.co.uk

    3 people found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful