Search code examples
wixwindows-installerwix3

WIX Toolset include multiple files


We have a file structure with multiple files and folders. I a ma total newb to the wix toolset and not quite sure, how to include all of these files and keep the directory structure. I know, that I can add files like this:

<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
  <Component Id="ProductComponent">
    <File Id="FILE_InstallMeTXT" Source="InstallMe.txt" KeyPath="yes"/>
  </Component>
</ComponentGroup>

But do I have to do this for every single file (we have > 200 files).

Kind regards!


Solution

  • Take a look at the heat tool here. For first time setup this does a great job of getting all the components created in the wix format. There are some examples at the bottom of that page.

    I like to use -suid so that the components and directories use actual names instead of hash generated names.

    There should be other resources online and certainly stackoverflow questions about doing more complicated things with Heat.exe

    As an anectdotal example, I use heat.exe during our build process to harvest the 'help' for our product which has over 2000 files.