@echo off
echo.
echo ******************************************************************************
echo *******Intel Management Engine 15.0 Sofware Driver Installation [START]*******
echo ******************************************************************************
echo.

rem =============================Check for vPro=============================
"%~dp0TpDevPE.exe" /CM "PCI\VEN_8086&DEV_A0E3"
if errorlevel 1 GOTO NonvPro_Install
rem =============================Check for vPro=============================

:Vpro_Install
rem =======================MESW drivers and Components(vPro)======================
echo.
echo.
echo System is vPro...
echo Installing MEI(HECI) and SOL drivers...
echo.

pnputil /add-driver "%~dp0MEI_SOL_Drivers\MEI\win10\heci.inf" /install
pnputil /add-driver "%~dp0MEI_SOL_Drivers\SOL\mesrl.inf" /install

echo.
echo.
echo Installing ME Software Components(iCLS, JHI, LMS, WiMAN and Extension INFs)...
echo.

pnputil /add-driver "%~dp0MESW_Components\ICLS\iclsClient.inf" /install
pnputil /add-driver "%~dp0MESW_Components\JHI\win10\DAL.inf" /install
pnputil /add-driver "%~dp0MESW_Components\LMS\LMS.inf" /install

pnputil /add-driver "%~dp0MESW_Components\wiman_wlan_extension\wiman_wlan_extension.inf" /install
pnputil /add-driver "%~dp0MESW_Components\WiMan\WiMan.inf" /install

GOTO END

:NonvPro_Install
rem =======================MESW drivers and Components(non-vPro)======================
echo.
echo.
echo System is non-vPro...
echo Installing MEI(HECI) driver...
echo.

pnputil /add-driver "%~dp0MEI_SOL_Drivers\MEI\win10\heci.inf" /install

echo.
echo.
echo Installing ME Software Components(iCLS, JHI, LMS and OEMExtension INF)...
echo.

pnputil /add-driver "%~dp0MESW_Components\ICLS\iclsClient.inf" /install
pnputil /add-driver "%~dp0MESW_Components\JHI\win10\DAL.inf" /install
pnputil /add-driver "%~dp0MESW_Components\LMS\LMS.inf" /install

:END

echo.
echo ******************************************************************************
echo ********Intel Management Engine 15.0 Sofware Driver Installation [END]********
echo ******************************************************************************
echo.


