Redboot access script for windows - a little improvement

Post new topic   Reply to topic    DD-WRT Forum Index -> Contributions Upload
Author Message
dfksnf
DD-WRT Novice


Joined: 07 Oct 2013
Posts: 1

PostPosted: Mon Oct 07, 2013 20:35    Post subject: Redboot access script for windows - a little improvement Reply with quote
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]
Sponsor
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Contributions Upload All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum