ehardin
Posts: 85
Joined: Fri Jul 13, 2007 8:10 pm

Patch Sequence 2.0 errors

I installed the my base target program to my machine 1.1.0.0
I then changed the version# in the program's exe to 1.1.1.0 and created a new .msi
I created a Patch with that new msi as the "upgraded image" and the original msi as the "Target image".
In the Patch Sequence section I created a "Family" and called it "P1110" and left the target as "Use Product Code" and the Sequence as 1.0 and kept "Supersede earlier patches" as unchecked.
I then installed that patch without problems.

I then changed the version# in the program's exe to 1.1.2.0 and created a new .msi
I created a new Patch with that new 1.1.2.0 msi as the "upgraded image" and the original msi as the "Target image".
In the Patch Sequence section I created a second "Family" and called it "P1120" and left the target as "Use Produce Code" and the Sequence as 2.0 and kept "Supersede earlier patches" as unchecked.
When trying to install the patch I get the Windows Installer error
"The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing or the upgrade patch may update a different version of the program"

I have tried checking and unchecking the box "Supersede earlier patches".
In the "Add/Remove" section I have tried checking and unchecking the box "Allow Patch Removal"
I have tried various combinations of all of the above including leaving just one "Family" and incrementing the sequence number (ie leaving the "Family" as "P1110" but changing the Sequence number to 2.0)

I don't always get the same error as the one above (I still had that on the screen to quote) but I got error such as "previous patch could not be uninstalled" (hence checking the box to "Allow Patch Removal" at one point but that just caused a different error.

All I want to do is have subsequent patches update the original target to which previous patches have already been applied. Each subsequent patch is cumulative in that it contains all previous changes.

What am I missing?

Ed
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Patch Sequence 2.0 errors

Hello Ed,
When trying to install the patch I get the Windows Installer error
"The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing or the upgrade patch may update a different version of the program"
Let's assume we have three different package versions : v1, v2, v3.
This error can appear because you have installed a patch from v1 to v2 and then you try to install a patch from v1 to v3. As the current version installed on the machine is v2, the patch could not detect v1 thus, it prompts the user the program is missing.

The solution would be to create two target images for your upgraded image. In this way if the first version is present on the machine, the patch will install the third version but if the second version is installed in the machine, the patch will also install the third version. Please take a look how "Images" page is configured for this scenario in the attached screenshot, where YourAppli represents v3 upgraded image and YourAppli_1 and YourAppli_2 represent v1 and v2 target images.
All I want to do is have subsequent patches update the original target to which previous patches have already been applied. Each subsequent patch is cumulative in that it contains all previous changes.\
To achieve this, you could create a new patch project for each new upgraded package version that should contain all the previous installations as target images.

Please note that when authoring patches there are some restrictions. For more information, please take a look on this article: Creating Patches

Best regards,
Sorin
Attachments
screenshot1.jpg
screenshot1.jpg (12.07 KiB) Viewed 4065 times
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ehardin
Posts: 85
Joined: Fri Jul 13, 2007 8:10 pm

Re: Patch Sequence 2.0 errors

Sorin,

Thank you very much. I believe this points me in the right direction. However, now when I try to run the v3 patch (with V1 and V2 as targets) I get the Windows Installer error "Uninstallation of the patch package is not supported".

Because of all of my experimentation I don't know if patch V2 had the Add/Remove -> "Allow Patch Removal" checked or not. Without starting over from scratch I won't know if this is indeed the problem or even if I should be checking or unchecking this box. In my scenario which should I be doing. I don't see that it is necessary for me to check this box but then what is the error message trying to say? If I am patching over V2 with V3 why would the V2 patch need to be uninstalled or is this the process mandated?

Ed
ehardin
Posts: 85
Joined: Fri Jul 13, 2007 8:10 pm

Re: Patch Sequence 2.0 errors

Sorin,

PS. Checking the box in Add/Remove -> "Allow Patch Removal" for both Patch V2 and also Patch V3 did the trick.
Whew! Thanks a million.

Ed
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Patch Sequence 2.0 errors

Hello,

You are welcome!
I'm glad you've sorted things out. Please let me know if you have any other questions.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”