Error code 1642

Error code 1642

Summary

Runtime Error 1642 when trying to install a Patch

Symptoms

When trying to install a patch a popup appears that says:

?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. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch#

And in the verbose MSI log you see this:

?Error code 1642. Additional information is available in the log file [1]?

[1] is a placeholder that contains the full path to the build log file.


Cause

The Error has been known to occur in the following scenarios:

A. The patch that is being run was not build for any currently installed product on the machine.

B. The patch was not created to patch the version of the product that is currently installed.


Resolution

A. You will need to install the correct product for this patch. The way you can determine that no product is on this machine that corresponds to this patch is that no MSI log will be created if you have logging enabled.

B. You have two options. You can install the correct version of your product for this patch. The other options is you can engineer this patch to allow this version that is currently installed to be patched with this patch. This can be done one of two ways below depending on the type of patch you have:

Patch Design view:

1. Go to the Patch Design view under Media

2. Select the patch configuration for your patch

3. Go to the Previous Setups section under your patch configuration

You will now need to add an additional item in the Previous Setups section. As an example there is a product with a base version of 1.0. This product has two patches that install versions 1.1 and 1.2 of your product. The first patch configurations latest version entry points to version 1.1 of the product and the previous version entry points to 1.0 of the product. The second patch configurations latest version entry pointed to version 1.2 of the product and the previous version entry points to 1.0 of the product. In this setup the second configuration will not work if version 1.1 is installed on the machine. To make this second configuration work against 1.1 an entry is needed in the Previous Setups section for version 1.1.

QuickPatch:

When you create your new QuickPatch you will get a wizard. In the wizard you need to choose the option ?Based on an existing QuickPatch project?. This is the only option in a quickpatch that will allow you to patch more versions than just the base MSI.

Was this article helpful? Yes No
No ratings
Comments

Hi ,

I have kind of same situation with Installshield 2018.

Here is my situation:

  1. I have base product with version 5.0.0196.0 
  2. I have quick patch project  
  3. created patch1 with version 5.0.0199.0 
  4. created Patch2 with version 5.0.0200.0

Now I have installed Base Product (5.0.0196.0) and Patch1 (5.0.0199.0). everything seems to be ok. 

and when i install Patch2 on top of Patch1, then it fails and get this error "The upgrade cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade.". However when i install Batch product + Patch2 then it works perfectly.

Kindly help me out what is the problem. I'm not getting the solution for this problem. 

Looking forward to reply from anyone soon . Thank you very much in advance. 

REgards

Sathis

Hi,

 

 Did you tried adding the previous setup of 5.0.0199.0  on creating 5.0.0200.0  as mentioned in the KB,

Please check below line from KB article

"To make this second configuration work against 1.1 an entry is needed in the Previous Setups section for version 1.1."

 

Please refer the screenshot attached for adding previous setup from patch design view, Right click on Previous setup node and select "Add New Previous setup" and then select your previous setup.Previous setup.PNG

Hi Varul,

Thank you for the quick response on this. 

Actually , i'm using quick patch project to create these builds (i.e. 5.0.0199.0 & 5.0.0200.0) and i'm not using Basic msi project for patch creation. This been following from long years in our project. 

do you see any solution with Quick patch project?. I don't see any settings in that. Please suggest if any.

Thank you.

Regards

- Sathis

 

For quick patch project you need to use the option "Based on an Existing QuickPatchproject"

 

QuickPatch:

When you create your new QuickPatch you will get a wizard. In the wizard you need to choose the option ?Based on an existing QuickPatch project?. This is the only option in a quickpatch that will allow you to patch more versions than just the base MSI.Based on existing patch project.PNG

Hi Varul,

Thank you so much again for the fast response.

Let me try with this approach and get back on this. 

Regards

Sathis

Hi,

the solution works well with previous patch. Thank you for that. Really appreciated.

But not with all previous patches. For example:

Base MSI version :  5.0.0196.0

Every week we create cumulative patches using the previous patch : i.e. 5.0.0197.0, 5.0.0198.0, 5.0.0199.0, 5.0.0200.0, etc.,

Here 

Base Version (5.0.0196.0) to any of the cumulative patch (5.0.0197.0 / 5.0.0198.0 / etc) works well. 

but 5.0.0198.0 to 5.0.0205.0 doesn't work. 

Windows installer always expect the previous patch to be installed in order to upgrade to the latest patch.

but we wanted to make it work 5.0.0198.0 to 5.0.0205.0 approach.

Is there any possibility to achieve the above scenario?. 

Looking for your support. Thank you.

- Sathis

You go for patch design view to create a patch instead of quick patch, that will help you to add multiple previous patch entries as i have mentioned earlier.

Thank you. As I mentioned my earlier message, i'm using quick patch project, i don't think there is option to add multiple previous patch entries. Isn't it?.

Suggest me.

Thanks

- Sathis

Version history
Revision #:
1 of 1
Last update:
‎Jan 13, 2011 11:34 AM
Updated by: