<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<pre>Le 2015-02-10 16:42, Holger Kröber a écrit :

>  Is it ok, to put all the patches in one package or is it better to
> create a package for every patch (i would prefer one big package,
> since there are >10 patches)?

One package should be OK.  I install PCs the same way you do (basically).  I use "super-packages" for things like Adobe Reader, which _demands_ multiple patches in sequences.

Here's my current Adobe Reader package:

<package
        id="adobereader"
        name="Adobe Reader"
        revision="%version%"
        priority="50">

        <variable name="version" value="11.0.10" />
        <variable name="PKG_ATT" value="SUPPRESS_APP_LAUNCH=YES AgreeToLicense=Yes ALLUSERS=1" />
        <variable name="LCID" value="1036" /> <!-- 1034 Spanish ; 1031 Deutsch -->

        <check type="uninstall" condition="versiongreaterorequal" value="%version%" path="Adobe Reader XI .+" />

        <!-- Install with the MSI -->
        <commands>
        
                <command type="install" cmd='cscript %CHECKPROC% AcroRd32.exe' />
                <command type="install" cmd='msiexec /qn /i "%SOFTWARE%\Outils_Bureautique\adobereader\AdbeRdr11000_fr_FR.msi" TRANSFORMS="%SOFTWARE%\Outils_Bureautique\adobereader\ar11-chp.mst" %PKG_ATT%'>
                        <condition>
                                <check type="logical" condition="not"><check type="uninstall" condition="exists" path="Adobe Reader XI .+" /></check>
                        </condition>
                        <exit code="0" />
                        <exit code="3010" reboot="false" />
                </command>
                <command type="install" cmd='msiexec /qn /update "%SOFTWARE%\Outils_Bureautique\adobereader\AdbeRdrUpd11004.msp"' >
                        <condition>
                                <check type="logical" condition="or">
                                        <check type="logical" condition="not"><check type="uninstall" condition="exists" path="Adobe Reader XI .+" /></check>
                                        <check type="uninstall" condition="versionsmallerthan" value="11.0.04" path="Adobe Reader XI .+" />
                                </check>
                        </condition>
                        <exit code="0" />
                        <exit code="3010" reboot="false" />
                </command>
                <command type="install" cmd='msiexec /qn /update "%SOFTWARE%\Outils_Bureautique\adobereader\AdbeRdrUpd11006.msp"' >
                        <condition>
                                <check type="logical" condition="or">
                                        <check type="logical" condition="not"><check type="uninstall" condition="exists" path="Adobe Reader XI .+" /></check>
                                        <check type="uninstall" condition="versionsmallerthan" value="11.0.06" path="Adobe Reader XI .+" />
                                </check>
                        </condition>
                        <exit code="0" />
                        <exit code="3010" reboot="false" />
                </command>
                <command type="install" cmd='msiexec /qn /update "%SOFTWARE%\Outils_Bureautique\adobereader\AdbeRdrUpd11007.msp"' >
                        <condition>
                                <check type="logical" condition="or">
                                        <check type="logical" condition="not"><check type="uninstall" condition="exists" path="Adobe Reader XI .+" /></check>
                                        <check type="uninstall" condition="versionsmallerthan" value="11.0.07" path="Adobe Reader XI .+" />
                                </check>
                        </condition>
                        <exit code="0" />
                        <exit code="3010" reboot="false" />
                </command>
                <command type="install" cmd='msiexec /qn /update "%SOFTWARE%\Outils_Bureautique\adobereader\AdbeRdrUpd11009.msp"' >
                        <condition>
                                <check type="logical" condition="or">
                                        <check type="logical" condition="not"><check type="uninstall" condition="exists" path="Adobe Reader XI .+" /></check>
                                        <check type="uninstall" condition="versionsmallerthan" value="11.0.09" path="Adobe Reader XI .+" />
                                </check>
                        </condition>
                        <exit code="0" />
                        <exit code="3010" reboot="false" />
                </command>
                <command type="install" cmd='msiexec /qn /update "%SOFTWARE%\Outils_Bureautique\adobereader\AdbeRdrUpd11010_incr.msp"' >
                        <condition>
                                <check type="logical" condition="or">
                                        <check type="logical" condition="not"><check type="uninstall" condition="exists" path="Adobe Reader XI .+" /></check>
                                        <check type="uninstall" condition="versionsmallerthan" value="11.0.10" path="Adobe Reader XI .+" />
                                </check>
                        </condition>
                        <exit code="0" />
                        <exit code="3010" reboot="false" />
                </command>

                <command type="upgrade" include="install"/>
                <command type="downgrade" include="install"/>
         
                <command type="remove" cmd='cscript %CHECKPROC% AcroRd32.exe' />
                <command type="remove" cmd='msiexec /qn /x{AC76BA86-7AD7-%LCID%-7B44-AB0000000001}' >
                        <exit code="0" />
                </command>
        </commands>
        
</package><br /><br />The first command tests whether Reader is running.  Then, the main program is installed only if there's no Uninstall record of it.  Then, each patch is run only if either the software wasn't installed in the first place, or the installed software's patch level is lower than the patch to run.<br /><br />To add a patch, you just copy/paste the last patch 'block', adapt the filename and the version check value, then update the package's version variable.<br /><br />Of course for that to work with your particular software, it must use the correct patch level in its Uninstall version field.<br /><br />N.
</pre>
</body></html>