Geeks With Blogs
Cogito Ergo Code If I don't put it here - I will surely forget!

Anytime you go beyond a very simple Installer script, you will need to pass in variables into WIX (e.g. selecting assemblies from the \Release\ or \Debug\ folders, or retitling the MSI for a "Debug" build installer).

Your WIX Script (WixVarDemo.wxs) might Include a few variables like this:

    <File Source='..\Solutions\bin\$(var.DLLFOLDER)\Image.png' ... />


  <Directory Id="ProgramMenuDir" Name='Howard' LongName="Howard$(var.FOLDERNAME)">

You would compile the script (and pass the variables like this).

> candle.exe -dDLLFOLDER=Debug -dFOLDERNAME=" (Demo)" -dEMPTYVAR="" WixVarDemo.wxs

Note: We can also pass empty variables (for a shortcut to read "MonsterApp" or "MonsterApp (Debug Build)".  The empty quotes ("") are not needed, but are clearer and safer (especially when passing in variables from MSBuild).



Posted on Tuesday, January 20, 2009 2:40 PM WIX , MSBuild | Back to top

Comments on this post: WIX Variables

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Howard Ricketts | Powered by: