RegistrySearch vs util:RegistrySearch in Burn

2019-02-23 08:05发布

问题:

I am using Burn to build a WiX bootstrapper. I realized that RegistrySearch as shown below does not actually search the registry. I used Process Monitor to monitor registry access.

<Property Id="NETFX35VERSION" Secure="yes">
    <RegistrySearch Id="RegSearchNetFx35" Root="HKLM"
        Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v3.5"
        Name="Version" Type="raw" />
</Property>

However, when I used the util function it was working fine and the registry got queried fine:

<util:RegistrySearch Root="HKLM" 
                     Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v3.5" 
                     Value="Version" 
                     Variable="NETFX35VERSION" />

Is this expected behavior with the WiX Burn tool?

回答1:

Property and RegistrySearch are concepts for .msi packages. Bundles (bootstrappers) aren't processed by the MSI engine so they have other concepts, like Variable and util:RegistrySearch. They're similar and generally bundles have more functionality in searches than the MSI equivalent.