Using WiX to install an installer with many files

I have a WiX 3 project that contains hundreds of files and I cannot figure out how to include them using a wildcard. I've tried this:

heat.exe" dir ".\!Build" -gg -ke -template:fragment -out "Files.wxs"

      

This creates a .wxs file for the snippet, but I'm not sure what to do with it. Any help would be much appreciated.

+2


source to share


1 answer


Try this command

heat dir "Your_Directory" -gg -ke -template:Product -out "Files.wxs"

      

It will create this structure in the generated wxs {Files.wxs} file:



<Fragment>
    <DirectoryRef Id="Files">
        <Component Id="Test.ico" Guid="{YOUR_GUID}">
            <File Id="Test.ico" Name="Test.ico" KeyPath="yes" Source="..[path to file]\Test.ico" />
        </Component>
    </DirectoryRef>
</Fragment>

      

You should get one for each file that was in the directory where you used the heat. Once this is done, you just need to add the wxs file to your project, make sure you have the directory created by the createref clause.

+3


source







All Articles