@ECHO OFF

ECHO ================= Update Both 1st + 2nd BIOS Region =================

REM for non-boot image
IF EXIST "../../../flash_G.rom" (
	AFUWINx64.EXE ../../../flash_G.rom /p /b /n /k /l /RLC:EJ /SSB:{NONBOOT16M}
)

REM for boot image
AFUWINx64.EXE ../../../flash_T.rom /p /b /n /k /l /RLC:EJ

if %errorlevel% NEQ 0 (
 	if %errorlevel% NEQ 100 (
	ECHO ============ Update 1st BIOS FAIL =============
	goto EXIT1
	)
)


AFUWINx64.EXE /OEMCMD:2B


ECHO ============ Update Both 1st + 2nd BIOS Region Complete =============

:EXIT1	