开发者

RegistrySearch not working in Wix project

I'm trying to add a check in my installer, so that if a specific registry key is not present it has to fail. That's roughly what I'm doing:

<Property Id="REGVALUE">
  <RegistrySearch Id="regval" Root="HKLM" Key="SOFTWARE\Foo" Type="raw"/>
</Property>
<Condition Message="Valid Foo value not present. Found [REGVALUE]">
  <![CDATA[REGVALUE = "Bar" OR REMOVE ~= "ALL"]]>
</Condition>

The problem I'm having is that this condition always fail. I tried querying different registry keys开发者_如何学Go and no matter what I try, I always get a blank value. In the install log I can't see any access to the registry, nor any error related to the registry. So I'm a bit lost. Am I missing something obvious?


Found the problem. The issue was an incorrect ordering of actions in the installer ui sequence, which caused the conditions to be checked before running the registry queries.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜