While harvesting files for heat.exe, I would like to exclude the files with the extension .exe from the input folder since it fetches all the files in the folder at first place.
Below is my code.
"%WIX_PATH%\Heat.exe" dir "%input_folder%" -cg SourceProjectComponents -dr INSTALLLOCATION -scom -sreg -srd -var var.BasePath -gg -sfrag -var var.BasePath -out "%output_folder%\Output.wxs"
PS: the input_folder consists of severall .dll and .exe files. hence individual harvesting of the file wasn't possible.
Thanks in advance.
I had the same issue where I had lots of files that I needed to include into the WXS file in a project and I wrote an open source command line application to generate XMLs of directory structure, files and components while ignoring folders, extensions, files etc via a .wixignore file (formatted similar to .gitignore).
You can take a look at the it here.
You will need to use an XSLT transform.
Something like this should work for you; Just include
-t <Path to the xslt file>
in your command line for heat.This XSLT outputs a new XML file that contains all XML nodes of the input, except if any nodes are
<Component>
elements with.exe
<File>
elements.RemoveExeComponentsTransform.xslt