@echo off 			
set BIOS_BIN=1E777033.bin
set MB_TYPE=EVGA E777

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

:EnvOK
cls
echo ===================================================
echo . BIOS flash tool for WIN64
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, followed by Enter key.
echo .
echo . !!!!!! DO NOT TURN OFF POWER OR RESET  !!!!!!
echo . !!!!!!    WHILE BIOS IS UPDATING       !!!!!!
echo ===================================================
set /p keyin=
if "%keyin%"=="Y" goto :flash
if "%keyin%"=="N" goto :end
goto :EnvOK

:flash
set cdir=%cd%
cd fptwin\64
fptw64 -F ..\..\%BIOS_BIN%
shutdown /s /t 5
cd %cdir%
goto end

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

:end
