I am a student developer and I have built several installers for the company I am working with now. So I am fairly familiar with WIX. We recently decided to have a Build server
As already answered, you need to pass the variables into WiX. We use Nant instead of MSBuild, but the concept remains the same.
Here's a Nant example passing in half a dozen variables to candle (it's not the cleanest example, but is lifted verbatim from a project I worked on)