# Make pinging faster while looking for a Windows PC

This code pings 1 time every IP while using TTL to identify if it's a Windows PC. If so, it outputs it. It's very slow, so is there any way to make it go faster (1-255 in 12 min)?

@echo off
echo running, it will take a long time to scan
(
FOR /L %%N in (1 1 254) DO (
FOR /f "tokens=1,3 delims=: " %%A IN ('ping -n 1 192.168.250.%%N ^| find "TTL=128"') DO ECHO %%B

)
) >ip.txt

echo done
get_info.bat

• What is in get_info.bat? – Quill Jan 14 '16 at 13:38
• a bunch of Wmic commands, not so important, can post if interested – TmCookieMonster Jan 14 '16 at 13:40

ping -w 500 -n 1 192.168.250.%%N