|
|
tftp 就搞定
@echo off
echo ============================================================================
echo Type or paste the firmware filename below and then press Enter.
echo.
set /p dd-wrt_fn=Firmware Filename:
echo.
if not exist %dd-wrt_fn% goto FNF_ERROR
echo ============================================================================
echo This batch file will upload %dd-wrt_fn% in the current
echo directory to 192.168.11.1 during the router's bootup.
echo.
echo * Set your ethernet card's settings to:
echo IP: 192.168.11.2
echo Mask: 255.255.255.0
echo Gateway: 192.168.11.1.
echo * Unplug the router's power cable.
echo.
echo Press Ctrl+C to abort or any other key to continue . . .
pause > nul
echo.
echo * Re-plug the router's power cable.
echo.
echo ============================================================================
echo Waiting for the router; Press Ctrl+C to abort . . .
echo.
ING
ping -n 1 -w 50 192.168.11.1 > nul
if errorlevel 1 goto PING
echo tftp -i 192.168.11.1 put %dd-wrt_fn%
tftp -i 192.168.11.1 put %dd-wrt_fn%
if errorlevel 1 goto PING
echo.
echo ============================================================================
echo * WAIT for about 2 minutes while the firmware is being flashed.
echo * Reset your ethernet card's settings back to DHCP.
echo * The default router address will be at 192.168.1.1.
echo.
pause
goto END
:FNF_ERROR
echo ============================================================================
echo ERROR: Make sure this batch file and the firmware are in the same directory!
echo.
pause
:END |
|