@echo off 			
set BIOS_BIN=1E685021.bin
set MB_TYPE = Z68 SLi

if "%windir%"=="" goto :EnvOk
goto :errMsg

:EnvOK
echo ===================================================
echo . BIOS flash tool for DOS
echo .
echo . Start to update the %MB_TYPE% BIOS (%BIOS_BIN%)
echo .
echo . Press 'Y' to program BIOS (Capital Letters)
echo .    or 'N' to Cancel.
echo .
echo . !!!!!! DO NOT TURN OFF POWER OR RESET  !!!!!!
echo . !!!!!!    WHILE BIOS IS UPDATING       !!!!!!
echo ===================================================
cd fptdos
CHOICE /N /C:YN
if errorlevel 2 goto :end
if errorlevel 1 goto :flash
goto :end

:flash
REM set cdir=%cd%
FPT -F ..\%BIOS_BIN%
fpt -greset
CD..
REM cd %cdir%
goto end

:errMsg
echo ===================================================
echo . This program cannot be run in Windows mode.
echo ===================================================
pause

:end
