Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Patches and Version Checking


2 replies to this topic

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 06 March 2001 - 17:59

I would like to prevent a patch from installing over a newer version of my product, but it doesn't seem to work.

I created three builds of my setup: verion 1.0, version 1.1 and version 1.2
I created a patch from version 1.0 to version 1.1
Installed version 1.2 on a clean test machine, tried to apply the patch.
Result: patch was applied without warning or error messages, i.e. product was downgraded from 1.2 to 1.1.
Desired result: Patch would not be installed over newer version.

In the TargetImages table in the .pcp file I have entered 0xc22 in field ProductValidateFlags in the row for version 1.0.
0xc22 = MSITRANSFORM_VALIDATE_PRODUCT +
MSITRANSFORM_VALIDATE_UPDATEVERSION +
MSITRANSFORM_VALIDATE_NEWGREATERBASEVERSION + MSITRANSFORM_VALIDATE_UPGRADECODE
I expected that MSITRANSFORM_VALIDATE_NEWGREATERBASEVERSION would make sure that the transform would only be applied to older versions of the product, as msi help explains: "Applied version > base version"

(Actually I did this with the patch wizard in IPWI and selected  new version > existing version )

(All setup packages use the same product and upgrade code. The package code and product version have been changed for each build.)

Has anyone succeeded in preventing a patch from downgrading an existing installation? Is anyone using transforms and can tell me what I'm doing wrong?



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 08 March 2001 - 18:10

Okay, after further research I believe this is a bug in MSI 1.2. With the 1.5 beta 1 runtime results are different, and together with the updated msi help in the 1.5 sdk the results make sense. Unfortunately the meaning of the version comparison flags as documented in msi.chm is now quite different from what is documented for the patch wizard in IPWI.

The meaning is: compare installed version (i.e. what currently is on the test machine) vs. the base version of the patch (that you added in the Pervious Packages pane). Since I want to apply my 1.0->1.1 patch only to version 1.0, I should use the NEWEQUALBASEVERSION flag. In IPWI this would be "new version = previous version", although the real meaning is "installed version = base version of the patch"