w10install/scripts/unpack-7zip.cmd
Michael H.G. Schmidt f6c15ef408 bugfix
2023-03-12 11:59:05 +01:00

32 lines
630 B
Batchfile

@echo off
set SCRIPTS=..\scripts
set SOFTWARE=..\software
set T=%SystemDrive%\TEMP
set TOOLS=%SystemDrive%\tools
set MSI=7z-setup.msi
if NOT EXIST %SOFTWARE%\%MSI% (
echo ERROR: %SOFTWARE%\%MSI% not found!
exit /b
)
echo ####### %0 #######
echo unpacking 7-zip ...
cd %SOFTWARE%
@echo on
msiexec /a %MSI% TARGETDIR=%T% /qn
@echo off
cd %SCRIPTS%
echo moving 7-zip binaries to tools folder ...
move /Y %T%\Files\7-Zip\7z.exe %TOOLS%
move /Y %T%\Files\7-zip\7z.dll %TOOLS%
move /Y %T%\Files\7-zip\7zCon.sfx %TOOLS%
del /F /Q %T%\%MSI% 1>nul 2>nul
rd /S /Q %T%\Files
echo ####### %0 #######