@echo off
cls
SET BIOSFILE= BA93BA04.bin

ChkME81A
if errorlevel 2 goto chksv2
if errorlevel 1 goto ME_update
REM if errorlevel 0 goto BIOS_UPDATE

:BIOS_UPDATE
afu300 %BIOSFILE% /p /b /n
if errorlevel 1 goto chksv
echo.
@echo Update Finish, System must power-off to have the changes take effect!
goto exit

:ME_update
fpt -f %BIOSFILE% -ME
if errorlevel 1 goto chksv2
afu300 %BIOSFILE% /p /b /n
if errorlevel 1 goto chksv
echo.
@echo Update Finish, System must power-off to have the changes take effect!
goto exit
:chksv
echo.
@echo Update Fail, Please check file is correct or Contect vendor!
goto exit

:chksv2
echo.
@echo Need Disable ME For Update BIOS.
@echo ME disable by follow step.
@echo 1. Into BIOS.
@echo 2. Select advanced : PCH-FW Configuration
@echo 3. Firmware Update Configuration. : Me FW Image Re-flash set Enabled.
@echo 4. Select save & Exit : Save Changes and Reset.
@echo Update bios update again.
:exit
@echo on