dfksnf DD-WRT Novice
Joined: 07 Oct 2013 Posts: 1
|
Posted: Mon Oct 07, 2013 20:35 Post subject: Redboot access script for windows - a little improvement |
|
Getting a "destination host is unreachable" (which happens when the device is dead, i guess) launches putty.exe, I've fixed that and improved the script a bit - here is my contribution.
Hope you like it.
P.S, it uses argv #1 of course this could be changed to a constant
Code: | @echo off
SET HOST=%1
:loop
for /f %%i in ('ping -n 1 -w 1 %HOST% ^| find /c "Reply from %HOST%"') do (
if %%i == 1 (
echo Got reply! launching and quiting
putty.exe telnet://%HOST%:9000 -m redboot.txt
exit
)
if %%i == 0 (
cls
echo %time% no reply ^(Yet ;^)
)
)
goto loop | [/quote] |
|