@echo off 			
set BIOS_BIN=1E658A72.4M
set MB_TYPE=EVGA E658

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 afuwin\64
afuwinx64 ..\..\%BIOS_BIN% /p /b /n /e /c /k /MEUF %2 %3 %4
cd %cdir%

goto end

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

:end
