检查Wix中不存在的第一个安装和注册表值

时间:2013-07-31 21:33:57

标签: wix

 <![CDATA[(NOT Installed) AND (ACCESSRUNTIMECHECK <> "Access.Application.12")]]>

我使用上面的表达式来检查我是否第一次安装,以及ACCESSRUNTIMECHECK(来自注册表的属性)值是否与上述值不匹配。但它无法正常工作。怎么了?

我确信ACCESSRUNTIMECHECK的值等于“Access.Application.12”。

 <Property Id="ACCESSRUNTIMECHECK">
  <RegistrySearch Id="AccessRuntimeSearch" 
                  Root="HKLM"
                  Key="SOFTWARE\Classes\Access.Application\CurVer"
                  Type="raw"  />

</Property>

<Condition Message="Access not installed!">
  <![CDATA[(NOT Installed) AND (ACCESSRUNTIMECHECK <> "Access.Application.12")]]>
 </Condition>

1 个答案:

答案 0 :(得分:1)

表达式必须求值为true才能允许安装。 “或已安装”旨在防止缺少Access干扰修复/卸载。

<Condition Message="Access not installed!">
  ACCESSRUNTIMECHECK ~= &quot;Access.Application.12&quot; Or Installed
</Condition>