Can't get version check to work properly...

Jun 22, 2010 at 7:50 PM

I have MySQL v5.1.43 installed, and I'm trying to test for an acceptable version before installing a new MySQL.

I have this code in my config file for the MySQL component:

      <installedcheck path="SOFTWARE\MySQL AB\MySQL Server 5.0" fieldname="Version" fieldvalue="5.0.78" defaultvalue="False" fieldtype="REG_SZ" comparison="version_ge" rootkey="HKEY_LOCAL_MACHINE" wowoption="NONE" type="check_registry_value" description="Installed Check 5.0.78+" />
      <installedcheckoperator type="Or" description="Installed Check Operator" />
      <installedcheck path="SOFTWARE\MySQL AB\MySQL Server 5.1" fieldname="Version" fieldvalue="5.1.00" defaultvalue="False" fieldtype="REG_SZ" comparison="version_ge" rootkey="HKEY_LOCAL_MACHINE" wowoption="NONE" type="check_registry_value" description="Installed Check 5.1.0+" />

and the result is this:

2010-06-22 14:42:03    Checking whether registry value 'SOFTWARE\MySQL AB\MySQL Server 5.0\Version' exists
2010-06-22 14:42:03    *** No registry key found: SOFTWARE\MySQL AB\MySQL Server 5.0\Version, default value: false
2010-06-22 14:42:03    Checking whether registry value 'SOFTWARE\MySQL AB\MySQL Server 5.1\Version' exists
2010-06-22 14:42:03    Registry value: 5.1.43
2010-06-22 14:42:03    -- MySQL 5.0.78 (MySQL 5.0.78): NOT INSTALLED

Why isn't this working?

Thanks in advance...

Coordinator
Jun 22, 2010 at 7:54 PM

You need to nest checks under the OR operator if you want OR behavior.

Jun 22, 2010 at 8:03 PM

Perfect!  That did it!  It is especially cool that you responded so quickly - Thanks DB...