REM This install.cmd is exclusivley for the Softpaq. Do not use this for the DASH directly. REM This single script is created based on the InstallCmdWrapper.exe v1.3 doc @echo off REM The following is required in all INSTALL.CMD files if exist c:\system.sav\util\SetVariables.cmd Call c:\system.sav\util\SetVariables.cmd Set block=%~dp0 CD /D "%block%" REM Remove the REM from the next line if your component does not support Silent Install (Application Recovery) REM Erase /F /Q *.CVA REM Add the command-line to have your component to be installed properly ::::::::::::::::::::::::::::::::: :: Started Installation ::::::::::::::::::::::::::::::::: @setlocal enableextensions set currentpath=%cd% cd %~dp0 echo %cd% if not exist C:\system.sav\logs mkdir C:\system.sav\logs ::::::::::::::::::::::::::::::::: :: HotKey Legacy Uninstallation ::::::::::::::::::::::::::::::::: REM Uninstaling Hotkey legacy "%~dp0DCHU\HotKey_legacy\setup.exe" /s /x /clone_wait /v"/qn /lv %ProgramData%\Hotkey_setup.log REBOOT=REALLYSUPPRESS" echo Hotkey legacy uninstallation completed... ::::::::::::::::::::::::::::::::: :: Fusion Driver Installation ::::::::::::::::::::::::::::::::: md c:\hp\HPQWare\HSAFusion If "%log%"=="" set log=c:\system.sav\logs\CEPS If Exist %FCC_LOG_FOLDER% set log=%FCC_LOG_FOLDER% If NOT Exist %log% md %log% SET MY_LOG=%log%\Fusiondriver.log SET CMDLog=%log%\cmdline.txt SET errflg=0 SET F_block=%~dp0Fusion echo %cd% >> "%MY_LOG%" echo.>> "%MY_LOG%" pushd "%F_block%" echo %cd% >> "%MY_LOG%" echo.>> "%MY_LOG%" @echo %date% %time% ******************** >> "%MY_LOG%" @echo %date% %time% HSA Fusion Driver >> "%MY_LOG%" @echo %date% %time% ******************** >> "%MY_LOG%" echo.>> "%MY_LOG%" @echo %date% %time% Running %0 from "%F_block%" >> "%MY_LOG%" echo.>> "%MY_LOG%" :Install_INF md "C:\Program Files\HP\HP Application Enabling Services\" md c:\hp\bridge\ md c:\programdata\hp\bridge\ md c:\programdata\hp\registration\ md c:\hp\HPQWare\bridge\ xcopy ".\x64\Logging.dll" "C:\Program Files\HP\HP Application Enabling Services" /s/e/y >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% copy Logging.dll : Error Level "%errflg%" >> "%MY_LOG%" if not exist oobeparts\ GOTO SkipOOBEParts xcopy ".\oobeparts\oobe1.txt" "c:\hp\bridge" /s/e/y >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% copy oobe1.txt : Error Level "%errflg%" >> "%MY_LOG%" xcopy ".\oobeparts\sub1.txt" "c:\hp\bridge" /s/e/y >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% copy sub1.txt : Error Level "%errflg%" >> "%MY_LOG%" xcopy ".\oobeparts\oobe2.txt" "c:\programdata\hp\bridge" /s/e/y If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% copy oobe2.txt : Error Level "%errflg%" >> "%MY_LOG%" xcopy ".\oobeparts\sub2.txt" "c:\programdata\hp\bridge" /s/e/y >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% copy sub2.txt : Error Level "%errflg%" >> "%MY_LOG%" xcopy ".\oobeparts\oobe3.txt" "c:\programdata\hp\registration" /s/e/y >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% copy oobe3.txt : Error Level "%errflg%" >> "%MY_LOG%" xcopy ".\oobeparts\sub3.txt" "c:\programdata\hp\registration" /s/e/y >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% copy sub3.txt : Error Level "%errflg%" >> "%MY_LOG%" xcopy ".\oobeparts\oobe4.txt" "c:\hp\HPQWare\bridge" /s/e/y >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% copy oobe4.txt : Error Level "%errflg%" >> "%MY_LOG%" xcopy ".\oobeparts\sub4.txt" "c:\hp\HPQWare\bridge" /s/e/y >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% copy sub4.txt : Error Level "%errflg%" >> "%MY_LOG%" echo.>> "%MY_LOG%" icacls "c:\hp\bridge\oobe1.txt" /inheritance:r /grant:r *S-1-5-18:(F) /grant:r *S-1-5-32-544:(F) /grant:r *S-1-5-20:(R,W) >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% modify oobe1.txt permissions : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\hp\bridge\oobe1.txt" /setowner *S-1-5-18 >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% modify oobe1.txt owner : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\hp\bridge\sub1.txt" /inheritance:r /grant:r *S-1-5-18:(F) /grant:r *S-1-5-32-544:(F) /grant:r *S-1-5-20:(R,W) >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% modify sub1.txt permissions : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\hp\bridge\sub1.txt" /setowner *S-1-5-18 >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% modify sub1.txt owner : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\hp\bridge" /deny Everyone:(OI)(CI)(DE,DC) >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% /deny Everyone:(OI)(CI)(DE,DC) : Error Level "%errflg%" >> "%MY_LOG%" If %errflg% EQU 1332 (set errflg=0) @echo %date% %time% /deny Everyone:(OI)(CI)(DE,DC) : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\hp\bridge" /setowner *S-1-5-18 >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% modify folder owner : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\programdata\hp\bridge\oobe2.txt" /inheritance:r /grant:r *S-1-5-18:(F) /grant:r *S-1-5-32-544:(F) /grant:r *S-1-5-20:(R,W) >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% modify oobe2.txt permissions : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\programdata\hp\bridge\oobe2.txt" /setowner *S-1-5-18 >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% modify oobe2.txt owner : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\programdata\hp\bridge\sub2.txt" /inheritance:r /grant:r *S-1-5-18:(F) /grant:r *S-1-5-32-544:(F) /grant:r *S-1-5-20:(R,W) >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% modify sub2.txt permissions : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\programdata\hp\bridge\sub2.txt" /setowner *S-1-5-18 >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% modify sub2.txt owner : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\programdata\hp\registration\oobe3.txt" /inheritance:r /grant:r *S-1-5-18:(F) /grant:r *S-1-5-32-544:(F) /grant:r *S-1-5-20:(R,W) >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) icacls "c:\programdata\hp\bridge" /deny Everyone:(OI)(CI)(DE,DC) >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% /deny Everyone:(OI)(CI)(DE,DC) : Error Level "%errflg%" >> "%MY_LOG%" If %errflg% EQU 1332 (set errflg=0) @echo %date% %time% /deny Everyone:(OI)(CI)(DE,DC) : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\programdata\hp\bridge" /setowner *S-1-5-18 >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% modify folder owner : Error Level "%errflg%" >> "%MY_LOG%" @echo %date% %time% modify oobe3.txt permissions : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\programdata\hp\registration\oobe3.txt" /setowner *S-1-5-18 >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% modify oobe3.txt owner : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\programdata\hp\registration\sub3.txt" /inheritance:r /grant:r *S-1-5-18:(F) /grant:r *S-1-5-32-544:(F) /grant:r *S-1-5-20:(R,W) >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% modify sub3.txt permissions : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\programdata\hp\registration\sub3.txt" /setowner *S-1-5-18 >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% modify sub3.txt owner : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\programdata\hp\registration" /deny Everyone:(OI)(CI)(DE,DC) >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% /deny Everyone:(OI)(CI)(DE,DC) : Error Level "%errflg%" >> "%MY_LOG%" If %errflg% EQU 1332 (set errflg=0) @echo %date% %time% /deny Everyone:(OI)(CI)(DE,DC) : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\programdata\hp\registration" /setowner *S-1-5-18 >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% modify folder owner : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\hp\HPQWare\bridge\oobe4.txt" /inheritance:r /grant:r *S-1-5-18:(F) /grant:r *S-1-5-32-544:(F) /grant:r *S-1-5-20:(R,W) >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% modify oobe4.txt permissions : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\hp\HPQWare\bridge\oobe4.txt" /setowner *S-1-5-18 >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% modify oobe4.txt owner : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\hp\HPQWare\bridge\sub4.txt" /inheritance:r /grant:r *S-1-5-18:(F) /grant:r *S-1-5-32-544:(F) /grant:r *S-1-5-20:(R,W) >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% modify sub4.txt permissions : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\hp\HPQWare\bridge\sub4.txt" /setowner *S-1-5-18 >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% modify sub4.txt owner : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\hp\HPQWare\bridge" /deny Everyone:(OI)(CI)(DE,DC) >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% /deny Everyone:(OI)(CI)(DE,DC) : Error Level "%errflg%" >> "%MY_LOG%" If %errflg% EQU 1332 (set errflg=0) @echo %date% %time% /deny Everyone:(OI)(CI)(DE,DC) : Error Level "%errflg%" >> "%MY_LOG%" icacls "c:\hp\HPQWare\bridge" /setowner *S-1-5-18 >> "%MY_LOG%" 2>&1 If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% modify folder owner : Error Level "%errflg%" >> "%MY_LOG%" echo.>> "%MY_LOG%" :SkipOOBEParts sc stop hpsysinfocap >> "%MY_LOG%" 2>&1 sc stop hpapphelpercap >> "%MY_LOG%" 2>&1 sc stop hpnetworkcap >> "%MY_LOG%" 2>&1 taskkill /f /im sysinfocap.exe >> "%MY_LOG%" 2>&1 taskkill /f /im apphelpercap.exe >> "%MY_LOG%" 2>&1 taskkill /f /im networkcap.exe >> "%MY_LOG%" 2>&1 echo %cd% >> "%MY_LOG%" echo.>> "%MY_LOG%" PNPUTIL.exe /add-driver "%~dp0Fusion\hpcustomcapdriver.inf" /install >> "%MY_LOG%" 2>&1 @echo %date% %time% hpcustomcapdriver install result : Error Level "%errorlevel%" Error Flag "%errflg%" >> "%MY_LOG%" If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% BASE - ErrorLevel "%errorlevel%" Error Flag "%errflg%" >> "%MY_LOG%" If %errflg% EQU 259 (set errflg=0) @echo %date% %time% BASE - ErrorLevel "%errorlevel% Error Flag "%errflg%" >> "%MY_LOG%" echo %cd% >> "%MY_LOG%" echo.>> "%MY_LOG%" PNPUTIL.exe /add-driver "%~dp0Fusion\hpcustomcapext.inf" /install >> "%MY_LOG%" 2>&1 @echo %date% %time% hpcustomcapext install result : ErrorLevel "%errorlevel%" Error Flag "%errflg%" >> "%MY_LOG%" If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% EXT - ErrorLevel "%errorlevel%" Error Flag "%errflg%" >> "%MY_LOG%" If %errflg% EQU 259 (set errflg=0) @echo %date% %time% EXT - ErrorLevel "%errorlevel%" Error Flag "%errflg%" >> "%MY_LOG%" echo %cd% >> "%MY_LOG%" echo.>> "%MY_LOG%" PNPUTIL.exe /add-driver "%~dp0Fusion\hpcustomcapcomp.inf" /install >> "%MY_LOG%" 2>&1 @echo %date% %time% hpcustomcapcomp install result : ErrorLevel "%errorlevel%" Error Flag "%errflg%" >> "%MY_LOG%" If %Errorlevel% NEQ 0 (set errflg=%Errorlevel%) @echo %date% %time% COMP - ErrorLevel "%errorlevel%" Error Flag "%errflg%" >> "%MY_LOG%" If %errflg% EQU 259 (set errflg=0) @echo %date% %time% COMP - ErrorLevel "%errorlevel%" Error Flag "%errflg%" >> "%MY_LOG%" If Exist %FCC_LOG_FOLDER% @echo PNPUTIL.exe /add-driver hpcustomcapdriver.inf /install >> "%CMDLog%" If Exist %FCC_LOG_FOLDER% @echo PNPUTIL.exe /add-driver hpcustomcapext.inf /install >> "%CMDLog%" If Exist %FCC_LOG_FOLDER% @echo PNPUTIL.exe /add-driver hpcustomcapcomp.inf /install >> "%CMDLog%" echo.>> "%MY_LOG%" @echo %date% %time% END - Error Level %errorlevel% Error Flag "%errflg%" >> "%MY_LOG%" echo.>> "%MY_LOG%" echo.>> "%MY_LOG%" :END_OF_SCRIPT echo %cd% >> "%MY_LOG%" echo.>> "%MY_LOG%" popd echo %cd% >> "%MY_LOG%" echo.>> "%MY_LOG%" ::::::::::::::::::::::::::::::::: :: Hotkey Driver Installation ::::::::::::::::::::::::::::::::: echo. echo ============================================= echo Installing HP HotKey Drivers echo ============================================= echo. set DRlog=C:\system.sav\logs\HPHKD.log @echo %date% %time% Installing HP HotKey Drivers >> %DRlog% echo %PROCESSOR_ARCHITECTURE% | find /i "x86" > NUL && set OS=32BIT || set OS=64BIT echo %OS% Operating System Detected @echo %OS% Operating System Detected >> %DRlog% if %OS%==32BIT GOTO Install64 if %OS%==64BIT GOTO Install64 :Install32 echo Installing 32 bit drivers...>> %DRlog% pnputil.exe /a "%~dp0DCHU\driver\x86\Base\HpqKbFiltr.inf" /i >> %DRlog% 2>&1 set BaseDriverReturn=%ERRO RLEVEL% pnputil.exe /a "%~dp0DCHU\driver\x86\Extension\HpqKbFiltrExtension.inf" /i >> %DRlog% 2>&1 set ExtensionDriverReturn=%ERRORLEVEL% pnputil.exe /a "%~dp0DCHU\driver\x86\Extension\HpqKbSoftwareCompnent.inf" /i >> %DRlog% 2>&1 set ComponentDriverReturn=%ERRORLEVEL% GOTO END :Install64 echo Installing 64 bit drivers...>> %DRlog% pnputil.exe /a "%~dp0DCHU\driver\x64\Base\HpqKbFiltr.inf" /i >> %DRlog% 2>&1 set BaseDriverReturn=%ERRORLEVEL% pnputil.exe /a "%~dp0DCHU\driver\x64\Extension\HpqKbFiltrExtension.inf" /i >> %DRlog% 2>&1 set ExtensionDriverReturn=%ERRORLEVEL% pnputil.exe /a "%~dp0DCHU\driver\x64\Extension\HpqKbSoftwareCompnent.inf" /i >> %DRlog% 2>&1 set ComponentDriverReturn=%ERRORLEVEL% GOTO END :END echo [Base Driver Return] = %BaseDriverReturn% echo [Extension Driver Return] = %ExtensionDriverReturn% echo [Component Driver Return] = %ComponentDriverReturn% @echo %date% %time% HK-BASE - ErrorLevel "%BaseDriverReturn%" >> %DRlog% @echo %date% %time% HK-EXT - ErrorLevel "%ExtensionDriverReturn%" >> %DRlog% @echo %date% %time% HK-COMP - ErrorLevel "%ComponentDriverReturn%" >> %DRlog% ::::::::::::::::::::::::::::::::: :: Hotkey App Installation ::::::::::::::::::::::::::::::::: echo. echo ============================================= echo Installing HP System Information Application echo ============================================= echo. set APlog=C:\system.sav\logs\HPSI.log echo %date% %time% Installing HP System Information Application >> %APlog% echo %date% %time% Parameter Value = [%1] >> %APlog% if [%1]== [] ( goto online ) else ( goto offline ) :offline echo HP System Information Application offline installation started @echo %date% %time% HP System Information Application offline installation started >> %APlog% DISM.exe %1 /Add-ProvisionedAppxPackage /PackagePath:"%~dp0DCHU\app\54e424f990bf4d1791240c003ee9d48b.appxbundle" /Region="all" /LicensePath:"%~dp0app\54e424f990bf4d1791240c003ee9d48b_License1.xml" /dependencypackagepath="%~dp0DCHU\app\Microsoft.VCLibs.140.00_14.0.27323.0_arm__8wekyb3d8bbwe.appx" /dependencypackagepath="%~dp0DCHU\app\Microsoft.VCLibs.140.00_14.0.27323.0_arm64__8wekyb3d8bbwe.appx" /DependencyPackagePath="%~dp0DCHU\app\Microsoft.VCLibs.140.00_14.0.27323.0_x64__8wekyb3d8bbwe.appx" /dependencypackagepath="%~dp0DCHU\app\Microsoft.VCLibs.140.00_14.0.27323.0_x86__8wekyb3d8bbwe.appx" /logpath:%APlog% GOTO END :online echo HP System Information Application online installation started @echo %date% %time% HP System Information Application online installation started >> %APlog% DISM.exe /Online /Add-ProvisionedAppxPackage /PackagePath:"%~dp0DCHU\app\54e424f990bf4d1791240c003ee9d48b.appxbundle" /Region="all" /LicensePath:"%~dp0DCHU\app\54e424f990bf4d1791240c003ee9d48b_License1.xml" /dependencypackagepath="%~dp0DCHU\app\Microsoft.VCLibs.140.00_14.0.27323.0_arm__8wekyb3d8bbwe.appx" /dependencypackagepath="%~dp0DCHU\app\Microsoft.VCLibs.140.00_14.0.27323.0_arm64__8wekyb3d8bbwe.appx" /DependencyPackagePath="%~dp0DCHU\app\Microsoft.VCLibs.140.00_14.0.27323.0_x64__8wekyb3d8bbwe.appx" /dependencypackagepath="%~dp0DCHU\app\Microsoft.VCLibs.140.00_14.0.27323.0_x86__8wekyb3d8bbwe.appx" /logpath:%APlog% GOTO END :END echo [DISM Return Code ] = %ERRORLEVEL% @echo %date% %time% [DISM Return Code ] = %ERRORLEVEL% >> %APlog% cd %currentpath% @echo %date% %time% HP System Information Application Installation completed... >> %APlog% echo HP System Information Application Installation completed... ::::::::::::::::::::::::::::::::: :: Completed Installation ::::::::::::::::::::::::::::::::: REM Erase failure flag file when install succeeded. Most applications return zero to indicate success. ECHO %ERRORLEVEL% >> FAILURE.FLG IF %ERRORLEVEL% EQU 0 ERASE /F /Q FAILURE.FLG IF %ERRORLEVEL% EQU 3010 ERASE /F /Q FAILURE.FLG IF %ERRORLEVEL% EQU 0 ERASE /F /Q FAILURE.FLG IF %ERRORLEVEL% EQU 3010 ERASE /F /Q FAILURE.FLG IF %ERRORLEVEL% EQU 1641 ERASE /F /Q FAILURE.FLG EXIT /B %ERRORLEVEL%