In my wix installer, I want to check for a version of ESRI ArcMap which I can find by:
<Property Id="ARC10INSTALLED">
<RegistrySearch Id="Arc10Search" Root="HKLM" Key="SOFTWARE\ESRI\ArcGIS" Name="RealVersion" Type="raw" />
</Property>
I want starts with 10 and I've tried accomplishing it by using this condition:
<Condition Message="ArcGIS Desktop 10 or 10.1 must be installed"><![CDATA[ARC10INSTALLED AND ARC10INSTALLED >= "10.0.0"]]></Condition>
But that doesn't seem to work, any suggestions?
The value returned by the RegistrySearch element depends on the @Type
attribute value, as well as on the data type of that value in the registry. Hence, in case you specify raw
as a value of Type
attribute, the result you'll get will most likely contain a certain prefix. For instance, if it's REG_BINARY
you'll get the value prefixed with #
. You should consider this in the operations of comparison.
As for the string comparison in particular, I would use the substring operators supported by the MSI condition syntax. It supports 'starts with', 'ends with' and 'contains', which looks like the best way to identify your value 10.
somewhere in the value you receive in ARC10INSTALLED property.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With