Compares dotted version strings.
Compares the version string specfied by InstalledVersion to the version specified by MinimumVersion and optionally, MaximumVersion. If InstalledVersion lies between these two versions, then the property specified by the Property is set.
- Parameters:
-
InstalledVersion | version to compare |
MinimumVersion | mimumum allowed version |
MaximumVersion | optional paramater specifying the maximum version allowed |
Property | property to set if the version check passes |
This is a table-driven custom action. It requires the following artifacts:
-
A custom table called CompareVersions.
<CustomTable Id="CompareVersions">
<Column Id="Id" PrimaryKey="yes" Type="string" />
<Column Id="InstalledVersion" Type="string" />
<Column Id="MinimumVersion" Type="string" />
<Column Id="MaximumVersion" Type="string" />
<Column Id="Property" Type="string" />
</CustomTable>
-
An immediate CompareVersions custom action.
<CustomAction Id="CompareVersions" BinaryKey="SystemTools" DllEntry="CompareVersions" Execute="immediate" Return="check" />
-
An execution sequence that schedules the above custom actions before LaunchConditions.
<InstallExecuteSequence>
<Custom Action="CompareVersions" Before="LaunchConditions" Overridable="yes" />
</InstallExecuteSequence>
<InstallUISequence>
<Custom Action="CompareVersions" Before="LaunchConditions" Overridable="yes" />
</InstallUISequence>