:: ==== =========================== ====
::      Intel ICPS for EVO system
:: =====================================

pushd %~dp0
DeviceCheck.exe /All /HWID /D /S:"PCI\VEN_10DE&DEV_25A9"
if %errorlevel%==0 goto :skip

DeviceCheck.exe /All /HWID /D /S:"PCI\VEN_10DE&DEV_1F9F"
if %errorlevel%==0 goto :skip

DeviceCheck.exe /All /HWID /D /S:"PCI\VEN_14C3&DEV_7961"
if %errorlevel%==0 goto :skip

DeviceCheck.exe /All /HWID /D /S:"PCI\VEN_10EC&DEV_B852"
if %errorlevel%==0 goto :skip

:install_ICPS
rem .\FPTW64.exe -u -n "Intel(R) ICPS SW SKUing Eligible" -v Enabled
rem .\FPTW64.exe -commit
pnputil /add-driver Drivers\ICPSComponent.inf /install
pnputil /add-driver Drivers\ICPSExtension.inf /install
timeout 02

:install_App
start /w dism /online /Add-ProvisionedAppxPackage /PackagePath:App\ICPS.appx /LicensePath:App\ICPS_License1.xml /region="all"

:install_pass
echo IPCS install success!
timeout 02
goto :end

:skip
echo not EVO system and skip it!
timeout 02

:end
echo done

