Will patch installer automatically find the previous installation

Comments

2 comments

  • Avatar
    juanjo

    The "upgrade" installation type will look for an uninstaller in the installation directory and update it with the new installed files. It is also independent of the existing installation.

    Regarding how this installation directory is detected, you will need to read the information from the registry. You can find a detailed example at the beginning of this section

  • Avatar
    juanjo

    In theory, the feature is intended to make upgrades using revisions of the same project. The installer will then look for the same uninstaller it has configured (same location and uninstaller name). However, you could also use a different project with even a different default uninstaller name and directory. You would just need to redefine it at runtime. For example, if you know the uninstaller is named foo and created under the ${installdir}/uninstaller-dir directory, if you read installdir from the registry, you could use:

    <setInstallerVariable name="project.uninstallerName" value="foo"/>
    <setInstallerVariable name="project.uninstallerDirectory" value="${installdir}/uninstaller-dir"/>
    

Please sign in to leave a comment.