tuto:gestion_de_parc:wpkg:7zip

7 Zip

    • le msi 32bits
    • le msi 64 bits
  • Placez ces fichier dans softwares/7zip
  • placez également le fichier reg.bat (voir ci-dessous)
reg.bat
@echo off
 
SET SC=HKLM\Software\Classes
SET Extn=001-9 7z-0 arj-4 bz2-2 bzip2-2 cab-7 cpio-7 deb-11 dmg-17 gz-14 fat-21 gz-14 gzip-14 hfs-18 iso-8 lha-6 lzh-6 lzma-16 ntfs-22 rar-3 rpm-10 split-9 squashfs-24 swm-15 tar-13 taz-5 tbz-2 tbz2-2 tgz-14 tpz-14 txz-23 vhd-20 wim-15 xar-19 xz-23 z-5 zip-1001-9 7z-0 arj-4 bz2-2 bzip2-2 cab-7 cpio-7 deb-11 dmg-17 gz-14 fat-21 gz-14 gzip-14 hfs-18 iso-8 lha-6 lzh-6 lzma-16 ntfs-22 rar-3 rpm-10 split-9 squashfs-24 swm-15 tar-13 taz-5 tbz-2 tbz2-2 tgz-14 tpz-14 txz-23 vhd-20 wim-15 xar-19 xz-23 z-5 zip-1
 
FOR %%j IN (%Extn%) DO (
	FOR /F "tokens=1,2 delims=-" %%A IN ("%%j") DO (
		REG ADD %SC%\.%%A /VE /D "7-Zip.%%A" /F
		REG ADD %SC%\7-Zip.%%A /VE /D "%%A Archive" /F
		REG ADD %SC%\7-Zip.%%A\DefaultIcon /VE /D "%PROGRAMFILES%\7-Zip\7z.dll,%%B" /F
		REG ADD %SC%\7-Zip.%%A\shell\open\command /VE /D "\"%PROGRAMFILES%\7-Zip\7zFM.exe\" \"%%1\"" /F
        )
)
 
exit
7zip.xml
<?xml version="1.0" encoding="UTF-8"?> 
<packages>
    <package id="7zip"
             name="Gestionnaire d'archives 7-Zip"
             revision="3"
             reboot="false"
             priority="10">
 
        <variable architecture='x86' name="MSI" value="7z920.msi" />
        <variable architecture='x64' name="MSI" value="7z920-x64.msi" />
        <variable name="PKG_VERSION" value="9.20"/>
 
        <check type="uninstall" condition="versiongreaterorequal" path="7-Zip .+" value="%PKG_VERSION%" />
 
        <!-- First Uninstall the .exe -->
        <install cmd='%COMSPEC% /C if exist "%PROGRAMFILES%\7-Zip\Uninstall.exe" "%PROGRAMFILES%\7-Zip\Uninstall.exe" /S' />
        <install cmd='msiexec /i "%SOFTWARE%\7zip\%MSI%" /qn /norestart' />
        <install cmd='%COMSPEC% /C "%SOFTWARE%\7zip\reg.bat" 1>NUL 2>NUL' />
 
        <upgrade include="install" />
        <downgrade include="install" />
 
        <remove cmd='msiexec /x "%SOFTWARE%\7zip\%MSI%" /qn' />
    </package>
</packages>
  • tuto/gestion_de_parc/wpkg/7zip.txt
  • Dernière modification: 13/07/2012 10:12
  • de dani