问题
If Property ELECTRICAL_VERSION has 12.1.7.2,12.1.5.2 or any value the condition is evaluated as true and custom action is being executed. I want it to skip if the value is less than 12.1.7.2.
<Property Id="ELECTRICAL_VERSION" Secure="yes">
<RegistrySearch Id="ELECTRICAL_VERSION" Root="HKLM" Key="SOFTWARE\WOW6432Node\12.1.7" Name="ProductVersion" Type="raw" />
</Property>
<CustomAction Id="ElectricalInstallCheck" Execute="immediate" Property="ELECTRICAL_VERSION" Return="check" Value=""/>
<InstallExecuteSequence>
<Custom Action="Install" Before="WriteRegistryValues">ELECTRICAL_VERSION>="12.1.7.2"</Custom>
回答1:
Maybe try NOT ELECTRICAL_VERSION<"12.1.7.2"
.
In your WiX source, escape the <
character: NOT ELECTRICAL_VERSION<"12.1.7.2"
.
来源:https://stackoverflow.com/questions/52287726/wix-custom-action-to-execute-upon-condition-provided-not-working