I'm using heat.exe to generate fragments similar to 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 the auto-generated wxs file.
I'm then adding them into my feature (in the main WiX file) like so:
<ComponentGroupRef Id="Components"/>
This works fine.
However, I'd also like to add a shortcut to Bar.exe to my start menu. I ideally want to do this in my main wix file, with the Bar.exe component still residing in the auto-generated wxs file. How would I approach this problem without modifying the auto-generated code?
Do you necessarily want it to reside in the definition? You can have it in a separate component, the way it is demonstrated in the manual: http://wix.sourceforge.net/manual-wix3/create_start_menu_shortcut.htm
Otherwise, you should probably transform the heat output with the XSL transform by adding the definition there. Heat.exe accepts the switch to apply XSL transform right after harvesting.
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With