Adding a shortcut for a WiX file in another fragment

I use heat.exe to generate fragments like this:

<Fragment>
  <DirectoryRef Id="INSTALLDIR">
    <Component Id="id1" Guid="*">
      <File Id="fid1" KeyPath="yes" Source="SourceDir\Foo1.dll" />
    </Component>
    <Component Id="id2" Guid="*">
      <File Id="fid2" KeyPath="yes" Source="SourceDir\Foo2.dll" />
    </Component>
    <Component Id="id3" Guid="*">
      <File Id="fid3" KeyPath="yes" Source="SourceDir\Bar.exe" />
    </Component>
  </DirectoryRef>
</Fragment>

<Fragment>
    <ComponentGroup Id="Components">
        <ComponentRef Id="id1" />
        <ComponentRef Id="id2" />
        <ComponentRef Id="id3" />
    </ComponentGroup>
</Fragment>

These fragments are stored in an automatically generated wxs file.

Then I add them to my function (in the main WiX file) as follows:

<ComponentGroupRef Id="Components"/>

This works great.

However, I would also like to add a shortcut to Bar.exe in my start menu. I ideally want to do this in my main wix file, and the Bar.exe component is still in the automatically generated wxs file. How can I approach this problem without changing the automatically generated code?

+5
source share
1 answer

All Articles