2016-09-27 73 views
0

考虑下面的没有默认值...维克斯 - 如何分辨注册表项与没有注册表项

<Property Id="TESTSEARCH"> 
    <RegistrySearch Id="LookingForKeyExists" 
        Root="HKLM" 
        Key="Software\Classes\.ext" 
        Type="raw" /> 
</Property> 

...我能得到的三个条件之一。

  1. 的关键是不存在
  2. 的关键是存在的,但没有设置
  3. 的关键是存在并且具有值

我希望能够告诉之间的区别以下条件。

<Condition Message="The extension .ext is missing"> 
    ??? 
</Condition> 
<Condition Message="The extension .ext has no default value"> 
    ??? 
</Condition> 

但是我所能找到/找出的是两者的OR。

<Condition Message="The extension .ext is either missing or does not have a default value"> 
    TESTSEARCH 
</Condition> 

在不写扩展名的情况下,可以区分两个单独的条件吗?如果是这样,怎么样?

回答

1

我不认为这是可能的,它看起来像Windows安装程序的限制,而不是WiX工具集。 This original article on MSDN规定,明确:

请注意,这是不可能使用RegLocator表只 检查为重点的存在。但是,您可以搜索密钥的默认值 ,并在其值不为空时检索其值。