How to create a support pack installation ?

Answered

Comments

1 comment

  • Avatar
    wojciechka

    Upgrade installers are meant to be installed on top of existing installation and cause original uninstaller to remove both original and upgraded files. This can be used to install a fix that should not be removed separately.

    Regular installers can be used to install changes on top of existing installation. Renaming uninstaller and enabling rollback will cause running the service pack uninstaller to revert files to previous version.

    <project>
      <uninstallerName>uninstall servicepack</uninstallerName>
      <enableRollback>1</enableRollback>
      <rollbackBackupDirectory>${installdir}/servicepackRollbackDirectory</rollbackBackupDirectory>
      <!-- restore files on rollback -->
      <postUninstallationActionList>
        <restoreRollback/>
      </postUninstallationActionList>
      <!-- ... -->
    </project>
    

    The <restoreRollback/> action will restore files from rollback directory after uninstallation finishes. The <restoreRollback/> action is undocumented and unsupported for now.

    The original application's uninstaller can run uninstaller for service pack in unattended mode before actual installation to properly clean up all files by doing:

    <preUninstallationActionList>
      <showProgressDialog>
        <title>Uninstalling service pack</title>
        <actionList>
          <runProgram>
            <program>${installdir}/uninstall servicepack.exe</program>
            <programArguments>--mode unattended</programArguments>
          </runProgram>
          <!-- verify that service pack has been uninstalled - part of removal is done as separate process -->
          <while>
            <actionList>
              <wait ms="5000"/>
            </actionList>
            <conditionRuleList>
              <fileExists>
                <path>${installdir}/uninstall servicepack.exe</path>
              </fileExists>
            </conditionRuleList>
          </while>
        </actionList>
        <ruleList>
          <fileExists>
            <path>${installdir}/uninstall servicepack.exe</path>
          </fileExists>
        </ruleList>
      </showProgressDialog>
    </preUninstallationActionList>
    

    This will roll back files to the original version before main application's uninstaller removes all files. This will cause application and service pack to be properly removed.

Please sign in to leave a comment.