@ECHO OFF

reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set OS=x86 || set OS=x64

CLS

echo Updating the ME Firmware...
echo.


IF %OS%==x86 GOTO Corp_32bit

:Corp_64bit
%~dp0FWUpdLcl64.exe -F %~dp0ME9.1_5M_Production.bin -OEMID 4C656E6F-766F-0000-0000-000000000000 -generic -allowsv -y
GOTO RESTART

:Corp_32bit
%~dp0FWUpdLcl.exe -F %~dp0ME9.1_5M_Production.bin -OEMID 4C656E6F-766F-0000-0000-000000000000 -generic -allowsv -y


:RESTART
Shutdown.exe -r -t 10

:END
