Problems handling upgrade scenario



  • Avatar
    Philippe Renon


    Other "solutions" to implement approach 1 would be:

    - to make the unstallation of files on abort optional

    - to add a new action list that gets invoked once the installer is done with everything and that gets invoked in all cases.


  • Avatar


    Please accept my sincere apologies for the delay in my reply. Regarding this issue, perhaps the following solution - building an upgrade installer in normal mode - would be a solution. In this way you just add the files in the installation directory to the new uninstaller.

            <!-- Add the files installed by the previous
            installation to the uninstaller -->
                 <isTrue value="${isUpgradeMode}"/>

    You can find more information about this solution in the following section of our manual:




  • Avatar
    Philippe Renon


    Thanks for the answer. Turns out "Approach 2" works. What prevented the directory renaming was the antivirus.
    It is not possible to rename the install dir while the antivirus is scanning the newly installed content.

    To work around it, I used a "safe rename" that tries to rename until it succeeds.


    <stringParameter name="origin" />
    <stringParameter name="destination" />
    <platformTest type="windows" />
    <antivirusTest type="enabled" />
    <fileTest condition="not_exists" path="${destination}" />
    <renameFile origin="${origin}" destination="${destination}">
    <logMessage text="Failed to rename ${origin} to ${destination}, retrying..." />
    <wait ms="1000" />
    <renameFile origin="${origin}" destination="${destination}" />



Please sign in to leave a comment.