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

Reg value & LaunchCondition


3 replies to this topic

chum

chum
  • Full Members
  • 2 posts

Posted 19 July 2010 - 21:06

Starting an installer I need to check some product version stored at MinVersion and MajVersion DWORD values at the registry.

I filled in LaunchCondition, Signature and RegLocator tables.

During installation my MINVER and MAJVER properties get values like #1 and #5 (that's predictable). But when I specify a condition in LaunchConditions like

MINVER_PROP >= #1 AND MAJVER_PROP >= #6

or

MINVER_PROP >= 1 AND MAJVER_PROP >= 6

it looks like it does not work. It looks like it does not compare it as DWORDs but as strings.

What's the proper way to check a DWORD registry value in LaunchCondition?

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 20 July 2010 - 08:51

That's correct, Windows Installer performs string comparison :-(
If these were files then you could perform sort of a numerical comparison using the Signature table. But if these are just string values, you'll need to write a custom action to perform the numerical comparison.

chum

chum
  • Full Members
  • 2 posts

Posted 20 July 2010 - 17:05

QUOTE (Stefan Krueger @ 2010-07-20 08:51)
if these are just string values, you'll need to write a custom action to perform the numerical comparison.

As far as I understand MSI can compare strings in LaunchConditions. That's mean I just can write a condition like the following:

MINVER_PROP >= "#1" AND MAJVER_PROP >= "#6"

but it won't work correctly in case the major version is 10 for example sad.gif

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 22 July 2010 - 09:10

Yes, that's what I wanted to say.
if these are just registry values, you'll need to write a custom action to perform the numerical comparison
because a string comparison will fail as soon as there are more than 1 digits.