WiX Make a Sub-Dir a Component Group when running heat <p>Hello all my fellow WiX'ers,</p> <p>I was wondering if it possible, and if so where I can go to learn how to do it, to run heat on a directory and have each directory inside that one be it's own Component Group.</p> <p>Example:</p> <ul> <li>Root Directory <ul> <li>Sub Dir 1 <ul> <li>Sub Sub Dir 1</li> <li>Sub Sub Dir 2</li> <li>Sub Sub Dir 3</li> </ul></li> <li>Sub Dir 2 <ul> <li>Sub Sub Dir 1</li> <li>Sub Sub Dir 2</li> <li>Sub Sub Dir 3</li> </ul></li> <li>Sub Dir 3 <ul> <li>Sub Sub Dir 1</li> <li>Sub Sub Dir 2</li> <li>Sub Sub Dir 3</li> </ul></li> </ul></li> </ul> <p>Then run a heat command in the Build Event of the VS2010 project (example below): </p> <pre><code>heat dir "Root Directory" -gg -sfrag -srd -dr INSTALLFOLDER -out MyWXS.wxs </code></pre> <p>and then have that WXS file structured like so:</p> <pre><code>&lt;Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"&gt; &lt;Fragment&gt; &lt;DirecotryRef Id="INSTALLFOLDER"&gt; &lt;Directory Id="dir84156489" Name="Sub Dir 1"&gt; ... &lt;/Directory&gt; &lt;Directory Id="dir84156489" Name="Sub Dir 2"&gt; ... &lt;/Directory&gt; &lt;Directory Id="dir84156489" Name="Sub Dir 3"&gt; ... &lt;/Directory&gt; &lt;/DirectoryRed&gt; &lt;/Fragment&gt; &lt;Fragment&gt; &lt;ComponentGroup Id="Sub Dir 1"&gt; ... &lt;/ComponentGroup&gt; &lt;ComponentGroup Id="Sub Dir 2"&gt; ... &lt;/ComponentGroup&gt; &lt;ComponentGroup Id="Sub Dir 3"&gt; ... &lt;/ComponentGroup&gt; &lt;/Fragment&gt; &lt;/wix&gt; </code></pre> <p>If there is any confusion in my question or if anyone has any additional questions for me please let me know. Thank you and I look forward to hearing from you.</p> <p><strong>EDIT</strong> Using the following xslt file I am getting the WXS structure that follows after:</p> <pre><code>**XLST File** &lt;?xml version="1.0" encoding="utf-8"?&gt; </code></pre> <p></p> <p></p> <p> </p> <p> </p> <pre><code>**WXS File Result** &lt;Wix&gt; &lt;Fragment&gt; &lt;DirectoryRef Id="INSTALLFOLDER"&gt; &lt;Directory Id="dir846546" Name="SubDir1"&gt; ... &lt;/Directory&gt; &lt;Directory Id="dir846546" Name="SubDir2"&gt; ... &lt;/Directory&gt; &lt;Directory Id="dir846546" Name="SubDir3"&gt; ... &lt;/Directory&gt; &lt;/DirectoryRef&gt; &lt;/Fragment&gt; &lt;wix:Fragment xmlns:wix="http://schemas.microsoft.com/wix/2006/wi"&gt; &lt;wix:ComponentGroup Id="SubDur1"&gt; ... &lt;/wix:ComponentGroup&gt; &lt;/wix:Fragment&gt; &lt;wix:Fragment xmlns:wix="http://schemas.microsoft.com/wix/2006/wi"&gt; &lt;wix:ComponentGroup Id="SubDur2"&gt; ... &lt;/wix:ComponentGroup&gt; &lt;/wix:Fragment&gt; &lt;wix:Fragment xmlns:wix="http://schemas.microsoft.com/wix/2006/wi"&gt; &lt;wix:ComponentGroup Id="SubDur3"&gt; ... &lt;/wix:ComponentGroup&gt; &lt;/wix:Fragment&gt; &lt;/Wix&gt; </code></pre> <p>No matter what I do I cannot get the Directories to be created as component groups...</p>