Wix Custom action to execute upon condition provided - not working

送分小仙女□ 提交于 2020-02-04 04:43:08

问题


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&lt;"12.1.7.2".



来源:https://stackoverflow.com/questions/52287726/wix-custom-action-to-execute-upon-condition-provided-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!