Wix Custom action to execute upon condition provid

2019-07-16 07:01发布

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条回答
2楼-- · 2019-07-16 07:33

Maybe try NOT ELECTRICAL_VERSION<"12.1.7.2".

In your WiX source, escape the < character: NOT ELECTRICAL_VERSION&lt;"12.1.7.2".

查看更多
登录 后发表回答