I wonder if it's possible to create support packs on top of an existing installation? I realize that one can create an upgrade installer. However, does this type of installation support uninstall feature including the restoration of the files when the upgrade is removed?

asked 21 Nov '11, 12:06

GigaG's gravatar image

accept rate: 0%

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.

  <uninstallerName>uninstall servicepack</uninstallerName>
  <!-- restore files on rollback -->
  <!-- ... -->

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:

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

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.


answered 22 Nov '11, 07:42

wojciechka's gravatar image

wojciechka ♦♦
accept rate: 26%

How will the rollback work if I have more than one updates? Say I installed Patch 1, 2, and 3. If I try to rollback #2 without #3, will the installer detect that and stop me from doing it? (Rolling back #2 without #3 can be dangerous if #2 and #3 updates a common set of files.)If #2 and #3 updates totally different files, rollback #2 without #3 is safe, in this case will the installer let me do it?

(21 May '12, 20:17) gt8967884

It is possible by storing current patch level in a file - for example using iniFileGet/iniFileSet. The <postinstallationactionlist> can store current version and when running an uninstaller, it can check the latest version.

If patches have to be applied in specific order or if patching system is cumulative, this could also be used to check that Patch #2 is not installed after Patch #3.

(22 May '12, 03:55) wojciechka ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 21 Nov '11, 12:06

Seen: 1,558 times

Last updated: 22 May '12, 03:55