I have a bootstrapper project in which I do a registry search to check if the program installed is 32bit or 64bit in order to install a driver of the correct platform.
I would like to use a variable in the key called [PRODUCTNAME] ( Key="SOFTWARE\MyCompany\[PRODUCTNAME]" ) that is defined in the Registry.wxs file as a RegistryValue within a component and used in various Product.wxs files in my solution. How can I reference it in my Bundle.wxs?
So far I have tried this:
<util:ComponentGroupRef Id="RegistryComponents" />
In the Bundle tag above my registry searches, and this in a Fragment under the Bundle:
<Fragment>
<ComponentGroup Id="RegistryComponents">
<ComponentGroupRef Id="Registry" />
</ComponentGroup>
</Fragment>
But I get this error: The Bundle element contains an unexpected child element 'util:ComponentGroupRef'.
In my Product.wxs files the component is simply referenced like this:
<Feature Id="ProductFeature" Title="MainApp" Level="1">
<ComponentGroupRef Id="Registry"/>
</Feature>
Is there a nice way of referencing that variable in my Bundle? I'd appreciate the help!
No. Bundles (installed by the Burn engine) use separate searches from MSI packages (installed by the Windows Installer engine). Also, Bundles use
Variableand MSIs usePropertyfor "variables" during the install (again, because different engines).