0

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!

1 Answer 1

0

No. Bundles (installed by the Burn engine) use separate searches from MSI packages (installed by the Windows Installer engine). Also, Bundles use Variable and MSIs use Property for "variables" during the install (again, because different engines).

Sign up to request clarification or add additional context in comments.

2 Comments

Ok thanks. If I can't reference that exact variable, can I achieve the same thing in the Bundle some other way, like do a registry search? Or must I hardcode the product name?
Bind variable or preprocessor variable should both work. The Deployment Dojo walks through all these options. Episode 18 is the summary episode (youtube.com/live/d4DEPW-RO30?feature=share), but you might jump back a few episodes if you need more background. It's about Package but many concepts work for Bundles too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.