The following process shows how to setup a 7-Zip silent installer that will work with 32-bit and 64-bit versions of Windows.
It can be used to distribute 7-Zip to computers using a software management tool such as SCCM (System Config Configuration Manager).
It has been written for 7-Zip version 22 but should work for other versions.
Build instructions
- Download both the 32-bit and 64-bit versions of the MSI installation files from http://www.7-zip.org/download.html

- Create a text file called install.cmd and copy in the following information
@echo off cls echo -------------------------------------------------------- echo . echo . Installing 7-Zip - Please Wait. echo . (This window will close once installed) echo . REM Silent install 7-Zip for 64-bit if defined ProgramFiles(x86) "%~dp07z2200-x64.msi" /q if defined ProgramFiles(x86) exit REM Silent install 7-Zip for 32-bit "%~dp07z2200.msi" /q
- Copy the two exe install files and install.cmd to your software package share
- You can now create your SCCM package or deploy the software by using install.cmd
More information
For more information on creating SCCM packages see distribute software using SCCM.
For more information on silent installs with 7-Zip see http://www.7-zip.org/faq.html
Maybe don’t use 3 quote marks in one line of code.
May be error in the end of code
@echo off
cls
echo ——————————————————–
echo .
echo . Installing 7-Zip – Please Wait.
echo . (This window will close once installed)
echo .
REM Silent install 7-Zip for 64-bit
if defined ProgramFiles(x86) “%~dp07z1604-x64.msi” /q INSTALLDIR=”%PROGRAMFILES(x86)%7-Zip”
if defined ProgramFiles(x86) exit
REM Silent install 7-Zip for 32-bit
“%~dp07z1604.msi” /q INSTALLDIR=”%PROGRAMFILES%7-Zip”
Hey – Im not seeing any errors or having issues running that code, but I do see that you now no longer need to specify the INSTALLDIR. So if you’re having issues try removing that from the commands.
REM Silent install 7-Zip for 32-bit
“%~dp07z1604.msi” /q”
instead of
REM Silent install 7-Zip for 32-bit
“%~dp07z1604-x64.msi” /q”