Lucas Carneiro
Posts: 8
Joined: Wed Sep 22, 2021 9:36 pm

Patch version issue

Thu Sep 23, 2021 8:46 pm

Hello!

Patches are being generated correctly and installation and uninstallation are successful.

However, when installing a patch, if the machine has any previous patches installed, the version of this is being updated with the latest version applied to the machine. For example:
    Original version: 21.0.1
      Patch 01: 21.0.1.1
        Patch 02: 21.0.1.2

        In the image below you can see that the patch of version 21.0.1.1 had its number changed to 21.0.1.2 improperly.
        PatchErrorVersion.png
        PatchErrorVersion.png (122.23KiB)Viewed 9475 times

        Liviu
        Posts: 1035
        Joined: Tue Jul 13, 2021 11:29 am
        Contact:  Website

        Re: Patch version issue

        Mon Sep 27, 2021 12:54 pm

        Hi and welcome to our forums,

        In order for us to further investigate this issue, can you please send us by email to support at advancedinstaller dot com all your projects:

        1. the .AIP (project file) for v21.0.1, 21.0.1.1, v21.0.1.2
        2. and the patch project for 21.0.1.1 and 21.0.1.2

        Best regards,
        Liviu
        ________________________________________
        Liviu Sandu - Advanced Installer Team
        Follow us: Twitter - Facebook - YouTube

        Lucas Carneiro
        Posts: 8
        Joined: Wed Sep 22, 2021 9:36 pm

        Re: Patch version issue

        Mon Sep 27, 2021 7:32 pm

        Hi,

        Email sent with the requested files.
        I'm waiting for a return, thanks!

        Liviu
        Posts: 1035
        Joined: Tue Jul 13, 2021 11:29 am
        Contact:  Website

        Re: Patch version issue

        Wed Sep 29, 2021 12:53 pm

        Hi Lucas,

        I have replied to you over the email.

        Best regards,
        Liviu
        ________________________________________
        Liviu Sandu - Advanced Installer Team
        Follow us: Twitter - Facebook - YouTube

        Lucas Carneiro
        Posts: 8
        Joined: Wed Sep 22, 2021 9:36 pm

        Re: Patch version issue

        Wed Sep 29, 2021 4:01 pm

        Hi Liviu,

        I believe I found the problem. We used some Advanced Installer commands, and when we run the command line:

        Code: Select all

        SetVersion 21.0.1.2 -noprodcode
        to update the installer version, for example, all patch versions were updated as well.

        https://www.advancedinstaller.com/user- ... rsion.html

        Do you know if the patches get the version from the main installer, or if it's possible to specify in this command who needs be to update?

        Best regards,
        Lucas

        Liviu
        Posts: 1035
        Joined: Tue Jul 13, 2021 11:29 am
        Contact:  Website

        Re: Patch version issue

        Thu Sep 30, 2021 10:52 am

        Hi Lucas,
        Do you know if the patches get the version from the main installer, or if it's possible to specify in this command who needs be to update?
        Unfortunately, Advanced Installer does not have such an option to set patch version. Our team did not find any method to set the patch version in the Control Panel → "Uninstall an update" section.

        To be honest with you, I have no idea on how you achieved to set the patch version in the "Uninstall an update" section.

        Using a command like this:

        Code: Select all

        AdvancedInstaller.com /edit "D:\MyProject.aip" /SetVersion 1.2
        
        will change the version for the main package like it does from the Advanced Installer UI, but not for the patches.

        Hope this helps! If you have any other questions, please don't hesitate to contact us.

        Best regards,
        Liviu
        ________________________________________
        Liviu Sandu - Advanced Installer Team
        Follow us: Twitter - Facebook - YouTube

        Lucas Carneiro
        Posts: 8
        Joined: Wed Sep 22, 2021 9:36 pm

        Re: Patch version issue

        Thu Sep 30, 2021 1:22 pm

        Hi Liviu, thanks for the feedback.

        I checked all the points you went through by e-mail and performed several tests. All rules described in the documentation are being followed, including the GUIDs you mentioned.

        I still haven't figured out the real reason for this failure with the demonstrated versions, but talking to the team we believe that using the "Patches to Replace" feature can be a viable alternative to get around this problem since this way we only have a visible patch for the user with the last version applied, and also because we guarantee that the user will uninstall the patches in the correct order if necessary.

        However, when testing this replace feature, informing the ".msp" files in the patch template that it should overwrite, the installation is successful and the software works perfectly.
        PatchesToReplace.png
        PatchesToReplace.png (77.5KiB)Viewed 8756 times
        PatchesToReplace_Installed.png
        PatchesToReplace_Installed.png (88.6KiB)Viewed 8756 times
        But, when uninstalling the patch the version downgrade is done, but the software itself does not revert back to the previous version, as expected.

        Example scenario:
        * Installed version: 21.0.1
        - 1st Patch applied: 21.0.1.1
        - 2nd Patch applied: 21.0.1.2 (overlapping the previous one)
        - 2nd Uninstalled Patch: 21.0.1.2

        After uninstalling the 21.0.1.2 patch, the user-visible patch reverts to 21.0.1.1, but the software does not revert to the content of this version, erroneously getting the 21.0.1.2 patch changes.
        PatchesToReplace_Uninstalled.png
        PatchesToReplace_Uninstalled.png (89.72KiB)Viewed 8756 times
        Could you help me with this problem?

        Best regards,
        Lucas

        Liviu
        Posts: 1035
        Joined: Tue Jul 13, 2021 11:29 am
        Contact:  Website

        Re: Patch version issue

        Fri Oct 01, 2021 9:17 am

        Hi Lucas,

        I’m afraid I still can't find how you set the patch version in the Control Panel → "Uninstall an update" section. After some research on the internet, apparently only Microsoft knows how to set those fields (Version and Publisher details) for Patches.

        However, I think a solution for your problem could be to manually set the patch version into the name of the patch, like most of the vendors do the same for their updates.
        As I can see in my Control Panel, even Microsoft uses the version in the patch name for some updates.
        In the below screenshot you can see how I added the version for the “Test” patch:
        Patch version in name.png
        Patch version in name.png (46KiB)Viewed 8636 times
        You can set this in the patch project --> "Add/Remove (Control Panel)" --> "Display Patch name".
        But, when uninstalling the patch the version downgrade is done, but the software itself does not revert back to the previous version, as expected.
        As for this problem, I've tested your scenario, but I cannot reproduce the behavior.

        When I uninstall the last patch, the application version reverts as expected to the previous patch version. In the below screenshot is the result after I uninstall de patch 2 update:
        AfterPatch2Uninstall.png
        AfterPatch2Uninstall.png (38.07KiB)Viewed 8636 times

        Attached are my sample projects (Test 21.0.1.aip, Test 21.0.1.1.aip, Test 21.0.1.2.aip and the two patches). Can you please test them and let me know if they work as expected on your machine? You only have to add an empty "test.txt" file in the "Files and Folders" page.

        Best regards,
        Liviu
        Attachments
        patch test.zip
        (10.36KiB)Downloaded 259 times
        ________________________________________
        Liviu Sandu - Advanced Installer Team
        Follow us: Twitter - Facebook - YouTube

        Return to “Common Problems”