 REM ========================================================
REM   Driver deliverable installation
REM 
REM   Template Version: V1.01
REM ========================================================

REM %Description of deliverable%
@ECHO OFF
if /i not "%~1" == "" if exist %~1 SET "FCC_LOG_FOLDER=%~1"
if defined FCC_LOG_FOLDER (SET "APP_LOG=%FCC_LOG_FOLDER%\%~n0.log") else (SET "APP_LOG=C:\System.sav\Logs\%~n0.log")

ECHO ############################################################# >> %APP_LOG%
ECHO  [%DATE%]                                                     >> %APP_LOG%
ECHO  [%TIME%] Beginning of the %~nx0                              >> %APP_LOG%
ECHO ############################################################# >> %APP_LOG%

REM ------------------- Script Entry ------------------------
:INSTALL
echo [%TIME%] DISM.exe /Online /Add-ProvisionedAppxPackage >> %APP_LOG%
DISM.exe /Online /Add-ProvisionedAppxPackage /PackagePath:RstHsaBridge_17.8.1005.0_x64_bundle.appxbundle /DependencyPackagePath:Microsoft.VCLibs.140.00.UWPDesktop_14.0.27810.0_x64__8wekyb3d8bbwe.appx /LicensePath:1c32c2fe50734f3a87299996a6bb2b1c_License1.xml /LogPath:%FCC_LOG_FOLDER%\dism.log /Region="all" 
if errorlevel 1 echo [%TIME%] DISM command failed. >> %APP_LOG% & goto RESULTFAILED
echo [%TIME%] DISM command success. >> %APP_LOG%

GOTO END

:RESULTFAILED
ECHO ERRRORLEVEL=%ERRORLEVEL% >> %APP_LOG%
ECHO ERRRORLEVEL=%ERRORLEVEL% >> %~dp0..\..\FAILURE.FLG
GOTO END

:END
EXIT /B %errorlevel%
