How to install 7-Zip silently

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

  1. Download both the 32-bit and 64-bit versions of the MSI installation files from http://www.7-zip.org/download.html
  2. 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
  1. Copy the two exe install files and install.cmd to your software package share
  2. 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

Article Downloads

TIP: You may need to right-click and select 'save link as'.

Tagged in

4 comments on “How to install 7-Zip silently

  1. 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”

    1. 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.

    2. 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”

Leave a Comment

Your email address will not be published. Required fields are marked *