@echo off

echo Start Installing Intel GFX APP...
@set L=C:\windows\temp\Driver_install.log
@set IP=[===========Install Pass===========]
@set IPR=[===========Install Pass, Restart is need===========]
@set IF=[===========Install Fail===========]

@echo [%time%]Install Intel GFX APP >> %L%
DISM /Online /Add-ProvisionedAppxPackage /PackagePath:"%~dp0Apps\e86732743f0442d0b2e8529c37c06f65.appxbundle" /licensepath:"%~dp0Apps\e86732743f0442d0b2e8529c37c06f65_License1.xml" /DependencyPackagePath:"%~dp0Apps\Microsoft.NET.Native.Framework.2.2_2.2.27912.0_arm__8wekyb3d8bbwe.appx" /DependencyPackagePath:"%~dp0Apps\Microsoft.NET.Native.Framework.2.2_2.2.27912.0_arm64__8wekyb3d8bbwe.appx" /DependencyPackagePath:"%~dp0Apps\Microsoft.NET.Native.Framework.2.2_2.2.27912.0_x64__8wekyb3d8bbwe.appx" /DependencyPackagePath:"%~dp0Apps\Microsoft.NET.Native.Framework.2.2_2.2.27912.0_x86__8wekyb3d8bbwe.appx" /DependencyPackagePath:"%~dp0Apps\Microsoft.NET.Native.Runtime.2.2_2.2.28604.0_arm__8wekyb3d8bbwe.appx" /DependencyPackagePath:"%~dp0Apps\Microsoft.NET.Native.Runtime.2.2_2.2.28604.0_arm64__8wekyb3d8bbwe.appx" /DependencyPackagePath:"%~dp0Apps\Microsoft.NET.Native.Runtime.2.2_2.2.28604.0_x64__8wekyb3d8bbwe.appx" /DependencyPackagePath:"%~dp0Apps\Microsoft.NET.Native.Runtime.2.2_2.2.28604.0_x86__8wekyb3d8bbwe.appx" /DependencyPackagePath:"%~dp0Apps\Microsoft.VCLibs.140.00_14.0.29231.0_arm__8wekyb3d8bbwe.appx" /DependencyPackagePath:"%~dp0Apps\Microsoft.VCLibs.140.00_14.0.29231.0_arm64__8wekyb3d8bbwe.appx" /DependencyPackagePath:"%~dp0Apps\Microsoft.VCLibs.140.00_14.0.29231.0_x64__8wekyb3d8bbwe.appx" /DependencyPackagePath:"%~dp0Apps\Microsoft.VCLibs.140.00_14.0.29231.0_x86__8wekyb3d8bbwe.appx" /Region="All"  >> %L%

@set value=%errorlevel%
@if %errorlevel%==0 (echo [%time%]%IP% >> %L% & set value=0)
@if %errorlevel%==259 (echo [%time%]%errorlevel% >> %L% & set value=0)
@if %errorlevel%==3010 (echo [%time%]%IPR% & echo [%time%]%IPR% >> %L% & set value=0)
@if not %value%==0 (echo [%time%]%IF% >> %L%  & exit /b 1)

:resultpass
@echo [%time%]========= Intel GFX APP Install complete========= >> %L%
@echo [%time%]========= Intel GFX APP Install complete=========
ECHO ERRRORLEVEL=%ERRORLEVEL% >> %L%
pause
EXIT /B 0

:ERR
echo [%time%]%IF% >> %L%
echo [%time%]%IF%
ECHO ERRRORLEVEL=%ERRORLEVEL% >> %L%
pause
EXIT /B 1