Difference between revisions of "7-Zip"
(Change category name from "NSIS Installers" to "NSIS") |
m |
||
Line 3: | Line 3: | ||
== MSI installer package.xml == | == MSI installer package.xml == | ||
− | < | + | <source lang="xml"> |
<package id="7zip" | <package id="7zip" | ||
name="7-zip 4.57" | name="7-zip 4.57" | ||
Line 14: | Line 14: | ||
<remove cmd='msiexec /qn /x{23170F69-40C1-2701-0457-000002000000}' /> | <remove cmd='msiexec /qn /x{23170F69-40C1-2701-0457-000002000000}' /> | ||
</package> | </package> | ||
− | </ | + | </source> |
Alternatively to the use of the GUID you might use the MSI file for uninstall as well. I prefer this method since some packagers tend to create new GUID strings on each release - so you need to search for the right ID at each release. Using the MSI file obsoletes this step: | Alternatively to the use of the GUID you might use the MSI file for uninstall as well. I prefer this method since some packagers tend to create new GUID strings on each release - so you need to search for the right ID at each release. Using the MSI file obsoletes this step: | ||
− | < | + | <source lang="xml"> |
<?xml version="1.0" encoding="utf-8" ?> | <?xml version="1.0" encoding="utf-8" ?> | ||
<packages> | <packages> | ||
Line 31: | Line 31: | ||
</packages> | </packages> | ||
− | </ | + | </source> |
== MSI installer package.xml for use with existing older exe based installs== | == MSI installer package.xml for use with existing older exe based installs== | ||
Line 38: | Line 38: | ||
Use this if you have existing .exe based installs of 7-Zip (such as 4.20) and you would like to uninstall them before switching to an .msi based install. | Use this if you have existing .exe based installs of 7-Zip (such as 4.20) and you would like to uninstall them before switching to an .msi based install. | ||
+ | <source lang="xml"> | ||
<package id="7-zip" name="7-zip 4.42" revision="1" reboot="false" priority="0"> | <package id="7-zip" name="7-zip 4.42" revision="1" reboot="false" priority="0"> | ||
<check type="uninstall" condition="exists" path="7-Zip 4.42" /> | <check type="uninstall" condition="exists" path="7-Zip 4.42" /> | ||
Line 46: | Line 47: | ||
<remove cmd='msiexec /qn /norestart /x %SOFTWARE%\7-Zip\7z442.msi' /> | <remove cmd='msiexec /qn /norestart /x %SOFTWARE%\7-Zip\7z442.msi' /> | ||
</package> | </package> | ||
− | + | </source> | |
== EXE installer package.xml == | == EXE installer package.xml == | ||
− | < | + | <source lang="xml"> |
<package | <package | ||
id="7zip" | id="7zip" | ||
Line 63: | Line 64: | ||
</remove> | </remove> | ||
</package> | </package> | ||
− | </ | + | </source> |
== 7-Zip EXE installer options == | == 7-Zip EXE installer options == |
Revision as of 12:44, 4 February 2008
A free file compressor/extractor: www.7-zip.org
Contents
MSI installer package.xml
<package id="7zip"
name="7-zip 4.57"
revision="457"
reboot="false"
priority="0">
<check type="uninstall" condition="exists" path="7-Zip 4.57" />
<install cmd='msiexec /qn /norestart /i %SOFTWARE%\7zip\7z457.msi' />
<upgrade cmd='msiexec /qn /norestart /i %SOFTWARE%\7zip\7z457.msi' />
<remove cmd='msiexec /qn /x{23170F69-40C1-2701-0457-000002000000}' />
</package>
Alternatively to the use of the GUID you might use the MSI file for uninstall as well. I prefer this method since some packagers tend to create new GUID strings on each release - so you need to search for the right ID at each release. Using the MSI file obsoletes this step:
<?xml version="1.0" encoding="utf-8" ?>
<packages>
<package id='7-Zip' name='7-Zip Packer' revision='457' priority='50' reboot='false' >
<!-- 7-Zip file packer -->
<check type='uninstall' condition='exists' path='7-Zip 4.57' />
<install cmd='msiexec /i "%SOFTWARE%\software.free\7-Zip v.4.57\7z457.msi" /qn' />
<remove cmd='msiexec /x "%SOFTWARE%\software.free\7-Zip v.4.57\7z457.msi" /qn' />
<upgrade cmd='msiexec /i "%SOFTWARE%\software.free\7-Zip v.4.57\7z457.msi" /qn' />
</package>
</packages>
MSI installer package.xml for use with existing older exe based installs
Background The hosts on my network are a mix of 7-Zip (various versions) .exe and .msi based installs. If you do a .msi based install without first uninstalling the .exe version it will leave some files from the .exe based install intact as well as an entry in "Add/Remove Programs".
Use this if you have existing .exe based installs of 7-Zip (such as 4.20) and you would like to uninstall them before switching to an .msi based install.
<package id="7-zip" name="7-zip 4.42" revision="1" reboot="false" priority="0">
<check type="uninstall" condition="exists" path="7-Zip 4.42" />
<install cmd='%comspec% /c if exist "%PROGRAMFILES%\7-Zip\Uninstall.exe" "%PROGRAMFILES%\7-Zip\Uninstall.exe" /S' />
<install cmd='msiexec /qn /norestart /i %SOFTWARE%\7-Zip\7z442.msi' />
<upgrade cmd='%comspec% /c if exist "%PROGRAMFILES%\7-Zip\Uninstall.exe" "%PROGRAMFILES%\7-Zip\Uninstall.exe" /S' />
<upgrade cmd='msiexec /qn /norestart /i %SOFTWARE%\7-Zip\7z442.msi' />
<remove cmd='msiexec /qn /norestart /x %SOFTWARE%\7-Zip\7z442.msi' />
</package>
EXE installer package.xml
<package
id="7zip"
name="7-Zip" revision="432"
reboot="false" priority="0">
<check type="file" condition="exists" path="%PROGRAMFILES%\7-Zip\7zFM.exe" />
<install cmd='%SOFTWARE%\7-zip\7z432.exe /S'>
<exit code="0" />
</install>
<remove cmd='"%PROGRAMFILES%\7-Zip\Uninstall.exe" /S'>
<exit code="0"/>
</remove>
</package>
7-Zip EXE installer options
"Use the "/S" parameter to do a silent installation and the "/D=dir" parameter to specify the "output directory". These options are case-sensitive. 7-Zip uses the NSIS installer by Nullsoft." - http://www.7-zip.org/faq.html
Links
- 7-Zip FAQ briefly discusses silent install
- 7-Zip on appdeploy.com
- Generic NSIS Installer Command Line Usage