views:

337

answers:

1

I'm trying to add the Microsoft_VC90_CRT_x86 merge module to my WiX installer but am having an issue specifying SourceFile. Rather than copying the .msm file within the scope of my build in my make script I would like to access the .msm where it lives on the build system (C:\Program Files\Common Files\Merge Modules). Despite [CommonFilesFolder] being a 'special' WiX variable it seems I am unable to use it to specify SourceFile, as below:

<Merge Id="VCRedist.34FC990B-37A2-47ba-BC6D-D8E0572850B9" Language="1033"
           SourceFile="[CommonFilesFolder]Merge Modules\Microsoft_VC90_CRT_x86.msm" DiskId="1" />
A: 

Nevermind, I was looking at this from completely the wrong direction. Those folder properties specify locations on the target system and not the host building the installer. To access environment variables on the build system you can use: $(env.YourVariable)

As seen http://wix.sourceforge.net/manual-wix2/preprocessor.htm

MattB
Right. "CommonFilesFolder" is a Windows Installer concept, not a WiX toolset concept. $(env.) is a preprocessor variable and is very much a WiX toolset concept.
Rob Mensching

related questions