REM
REM EFU update 2.02 (13 March 2013)
REM
REM For A2340912.rom
@echo off
cd c:\BIOS
goto start

:update_run
cls
afuwin A2340912.rom /p /n /b /r
echo.
echo BIOS update completed.
echo.
echo *****************************************************************
echo Please check the BOOT BLOCK, MAIN BLOCK and NVRAM BLOCK are done.
echo *****************************************************************
echo.
echo Please SHUT DOWN the Windows ^> Restart ^> reload BIOS default.  
echo.
goto end

:start
cls
echo. 
echo. 
echo Main Menu
echo =========
echo. 
echo [B] Backup BIOS from Windows
echo [U] Update BIOS from Windows
echo [R] Restore BIOS from Windows
echo [E] Exit
echo.
echo.
choice /c BURE 
if errorlevel=4 goto end
if errorlevel=3 goto restore
if errorlevel=2 goto update
if errorlevel=1 goto backup
goto start

:restore
cls
echo. 
echo. 
echo Restore BIOS Menu
echo ================
echo. 
echo [C]onfirm Restore BIOS
echo [E]xit
echo.
echo ***********************************************************
echo This process will restore the BIOS from "backup.rom" image.
echo ***********************************************************
echo.
choice /C CE 
if errorlevel=2 goto end
if errorlevel=1 goto restore_run

:restore_run
cls
afuwin backup.rom /p /n /b /r
echo.
echo BIOS restore completed.
echo.
echo *****************************************************************
echo Please check the BOOT BLOCK, MAIN BLOCK and NVRAM BLOCK are done.
echo *****************************************************************
echo.
echo Please SHUT DOWN the Windows ^> Restart ^> reload BIOS default.  
echo.
goto end
****************************************

:backup
cls
echo. 
echo. 
echo Backup Menu
echo ===========
echo. 
echo [C]onfirm backup BIOS
echo [E]xit
echo.
echo (Default backup file name "backup.rom".)
echo.
echo.
choice /c CE
if errorlevel=2 goto end
if errorlevel=1 goto backup_run

:backup_run
cls
echo.
afuwin backup.rom /o
echo.
echo ****************************************
echo Please check the backup process is done.
echo ****************************************
echo.
choice /C ME /M "[M]ain menu or [E]xit.
if errorlevel=2 goto end
if errorlevel=1 goto start

:update
cls
echo. 
echo. 
echo BIOS update Menu
echo ================
echo. 
echo [C]onfirm Update BIOS
echo [E]xit
echo.
choice /C CE 
if errorlevel=2 goto end
if errorlevel=1 goto update_run

:end
echo.
echo Press any key to EXIT.
pause > nul