Following the excellent suggestion I have moved some variables to WXI file. How do I include it in WXS file?
File created by the WiX toolset, a Windows installer developing program; contains a top-level container element called, <Include>, which is the root element of the file; similar to header (. H) files used by C++ code. An example of the <Include> root file is below: <Include>
A wix variable can be referenced as $(var. foo) . Such a variable can be defined by passing -d command line arguments to candle.exe .
Basically the heat command generates a wxs file with the above component in it. Then all you need to do is to include this component or component group in your main installer. It will then create the registry entries instead of running regasm. The uninstall would then remove these registry entries.
use <?include ?> preprocessor tag, for example:
<?include include.wxi ?>
for reference:
http://wix.sourceforge.net/manual-wix2/preprocessor.htm
Although this is about wix 2.0 and uses a file with extension .wxs - the game stays the same, as only the "include" element is required to exist in the file.
A good article how to use this can be found here: http://weblogs.sqlteam.com/mladenp/archive/2010/02/17/WiX-3-Tutorial-Understanding-main-WXS-and-WXI-file.aspx
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