May be nested under Product, Module, Fragment. The extension provides a simple method of correctly comparing two versions in dotted form. It sets a property if the version is between the minimum and maximum versions.
- Example:
- The following example uses a registry search to get the version of an installed program, then uses SystemTools::CompareVersion to check that a suitable version is installed.
<Wix ... xmlns:AppSecIncSystemTools="http://schemas.appsecinc.com/wix/SystemToolsExtension">
<Product ...>
...
<Property Id="PROGRAM_VERSION">
<RegistrySearch Id='RegistrySearchProgramVer' Type='raw'
Root='HKLM'
Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FFFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF}'
Name='DisplayVersion' />
</Property>
<Condition Message="Incorrect version!">
ProgramVersionCorrect OR Installed
</Condition>
...
</Product>
</Wix>