#20 How To: Heat - Set the File/@Source with a Preprocessor Var

open
nobody
None
5
2012-09-15
2009-04-24
Brian Rogers
No

The -var switch value of the preprocessor variable you want to use "$(<var|env>.MyVar)". Renaming this value will not impact dynamically created identifiers.

heat.exe dir C:\MyDir -srd -sfrag -var var.MyVar

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<DirectoryRef Id="TARGETDIR">
<Directory Id="dir090ACB8E8D9B8C1F26DE6E8300AA9049" Name="one">
<Component Id="cmpE21824A6879A478E4A884BA6B00C33C9" ...="">
<File Id="filF1BA1271365EB2A130AA3F0BE83E9D6D" Source="$(var.MyVar)\\one\\test.txt" ...=""/>
</Component>
</Directory>

Discussion