msiexec.exe /i "7z920.msi" /qn /norestart
x86 using MSI from download supressing restart, using default msi name.
msiexec.exe /i "7z920-x64.msi" /qn /norestart
x64 using MSI from download supressing restart, using default msi name.
Optional INSTALLDIR="C:\Program Files\7-Zip" can be added to either line.
/qn works as an optional replacement for /q that is stated in the FAQ (/qn is for quiet with no user interface.)
/norestart is also optional but works during testing
Official FAQ page at http://www.7-zip.org/faq.html
32-bit MSI can be had from the download page at http://www.7-zip.org/download.html
Here I published a tutorial for it and many others programs. Please comment on the blog if you have questions.
http://it-grund.blogspot.com/2012/04/how-to-deployinstall-silently-and.html
32-bit: "7z920.exe" /S /D="C:\Program Files\7-Zip"
64-bit: msiexec.exe /q INSTALLDIR="C:\Program Files\7-Zip" /i "7z920-x64.msi"
For this install I had to uninstall the previous version that the former SysAdmin had installed. For 64bit he used MSIs and for 32bit he used the executable version. Formerly 7-zip 4.65. The following code checks for the new version (9.20) and goes to look for the old version (4.65), uninstalls it if it finds it, or just goes to the install if it doesn't find it. This is set up to handle 32 and 64bit through the same install based on the machine it's installing on.
::New Software Check
REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{23170F69-40C1-2701-0920-000001000000}
IF %errorlevel%==0 goto :END
) ELSE (
if %errorlevel%==1 goto :OLDCHECK
)
:OLDCHECK
::OLD VERSION CHECK
If EXIST "C:\Program Files\7-Zip" goto :UNINSTALL (
) ELSE (
goto :INSTALL
)
:UNINSTALL
::OLD VERSION UNINSTALL
set ProgFiles86Root=%ProgramFiles(x86)%
IF NOT "%ProgFiles86Root%"=="" (
MsiExec /qn /x{23170F69-40C1-2702-0465-000001000000}
) ELSE (
"C:\Program Files\7-Zip\uninstall.exe" /S
)
:INSTALL
set ProgFiles86Root=%ProgramFiles(x86)%
IF NOT "%ProgFiles86Root%"=="" (
MSIEXEC /I 7z920-x64.msi /qn /norestart
) ELSE (
MSIEXEC /I 7z920.msi /qn /norestart
)
:END
SMS files for import into SCCM 2007 Vista x64 and Win7 x64 using Package Definition Format
------------
[PDF]
Version = 2.0
[Package Definition]
Name = 7zip
Version = 9.20 x64
Publisher = GNU
Language = English
Programs = 7zipSetup
[7zipSetup]
Name = 7zip 9.20 x64 Installation
CommandLine = msiexec.exe /i "7z920-x64.msi" /qn /norestart
SupportedClients = Win NT (x64)
Win NT (x64) MinVersion1=6.00.0000.0
Win NT (x64) MaxVersion1=6.00.9999.9999
Win NT (x64) MinVersion2=6.10.0000.0
Win NT (x64) MaxVersion2=6.10.9999.9999
UserInputRequired = False
RemoveProgram = True
AdminRightsRequired = True
CanRunWhen = AnyUserStatus
EstimatedRunTime = 15
EstimatedDiskSpace = 10MB
------------
For More Specifics on modifying this file for your environment see.
About Package Definition File Format.
http://technet.microsoft.com/en-us/library/bb632631.aspx ;
MSI lines can be modified to fit your environment.
MSI deployment msiexec.exe /q /i "<filename.msi>"
Optional
INSTALLDIR="C:\Program Files\7-Zip" to Change Install Directory
/qn or /qb can be substituted for /q
/norestart can be added.
SMS files for import into SCCM 2007 XP x86, Vista x86 and Win7 x86 using Package Definition Format
------------
[PDF]
Version = 2.0
[Package Definition]
Name = 7zip
Version = 9.20 x86
Publisher = GNU
Language = English
Programs = 7zipSetup
[7zipSetup]
Name = 7zip 9.20 x86 Installation
CommandLine = msiexec.exe /i "7z920.msi" /qn /norestart
SupportedClients = Win NT (i386)
Win NT (I386) MinVersion1=5.10.0000.0
Win NT (I386) MaxVersion1=5.10.9999.9999
Win NT (I386) MinVersion2=6.00.0000.0
Win NT (I386) MaxVersion2=6.00.9999.9999
Win NT (I386) MinVersion3=6.10.0000.0
Win NT (I386) MaxVersion3=6.10.9999.9999
UserInputRequired = False
RemoveProgram = True
AdminRightsRequired = True
CanRunWhen = AnyUserStatus
EstimatedRunTime = 15
EstimatedDiskSpace = 10MB
------------
For More Specifics on modifying this file for your environment see.
About Package Definition File Format.
http://technet.microsoft.com/en-us/library/bb632631.aspx ;
MSI lines can be modified to fit your environment.
MSI deployment msiexec.exe /q /i "<filename.msi>"
Optional
INSTALLDIR="C:\Program Files\7-Zip" to Change Install Directory
/qn or /qb can be substituted for /q
/norestart can be added.
32-Bit MSI can be found at http://www.7-zip.org/download.html
7zip 920 x64:
msiexec /i 7z920-x64.msi /q
Very easy to virtualize, one of the few installers which requires numerous tweaks afterwards.
SMS files for import into SCCM 2007 Vista x64 and Win7 x64 using Package Definition Format
------------
[PDF]
Version = 2.0
[Package Definition]
Name = 7zip
Version = 9.20 x64
Publisher = GNU
Language = English
Programs = 7zipSetup
[7zipSetup]
Name = 7zip 9.20 x64 Installation
CommandLine = msiexec.exe /i "7z920-x64.msi" /qn /norestart
SupportedClients = Win NT (x64)
Win NT (x64) MinVersion1=6.00.0000.0
Win NT (x64) MaxVersion1=6.00.9999.9999
Win NT (x64) MinVersion2=6.10.0000.0
Win NT (x64) MaxVersion2=6.10.9999.9999
UserInputRequired = False
RemoveProgram = True
AdminRightsRequired = True
CanRunWhen = AnyUserStatus
EstimatedRunTime = 15
EstimatedDiskSpace = 10MB
------------
For More Specifics on modifying this file for your environment see.
About Package Definition File Format.
http://technet.microsoft.com/en-us/library/bb632631.aspx ;
SMS files for import into SCCM 2007 XP x86, Vista x86 and Win7 x86 using Package Definition Format
------------
[PDF]
Version = 2.0
[Package Definition]
Name = 7zip
Version = 9.20 x86
Publisher = GNU
Language = English
Programs = 7zipSetup
[7zipSetup]
Name = 7zip 9.20 x86 Installation
CommandLine = msiexec.exe /i "7z920.msi" /qn /norestart
SupportedClients = Win NT (i386)
Win NT (I386) MinVersion1=5.10.0000.0
Win NT (I386) MaxVersion1=5.10.9999.9999
Win NT (I386) MinVersion2=6.00.0000.0
Win NT (I386) MaxVersion2=6.00.9999.9999
Win NT (I386) MinVersion3=6.10.0000.0
Win NT (I386) MaxVersion3=6.10.9999.9999
UserInputRequired = False
RemoveProgram = True
AdminRightsRequired = True
CanRunWhen = AnyUserStatus
EstimatedRunTime = 15
EstimatedDiskSpace = 10MB
------------
For More Specifics on modifying this file for your environment see.
About Package Definition File Format.
http://technet.microsoft.com/en-us/library/bb632631.aspx ;
msiexec.exe /i "7z920.msi" /qn /norestart
x86 using MSI from download supressing restart, using default msi name.
msiexec.exe /i "7z920-x64.msi" /qn /norestart
x64 using MSI from download supressing restart, using default msi name.
Silent uninstall for v9.20:
MsiExec.exe /x {23170F69-40C1-2701-0920-000001000000} /qn
I found this to work.
msiexec.exe /i "7z920.msi" /qn /norestart
x86 using MSI from download supressing restart, using default msi name.
msiexec.exe /i "7z920-x64.msi" /qn /norestart
x64 using MSI from download supressing restart, using default msi name.
if you want to reduce and cascade the context menu options of 7-zip then you can find the related registry keys:
[HKEY_CURRENT_USER\Software\7-Zip\Options]
"CascadedMenu"=dword:00000001
"ContextMenu"=dword:00003107
these are my preferred settings. I set them with my admin Notebook copied the values out of the registry and deployed them via GPO.
View inventory records anonymously contributed by opt-in users of the K1000 Systems Management Appliance.