I'm trying to copy a few files into the C:\Windows\System32 folder (and C:\Windows\SysWOW64 respectively) in a simple WIX setup using the SystemFolder variable. However, it always seems to resolve to a weird path I'm not even having the slightest idea where MSI is getting that from.
Basically, SystemFolder resolves to the following: E:\SystemFolder\ (no, that's not a variable, the folder is actually called SystemFolder).
Edit
Alright, it seems that the variable isn't really resolved at all. I don't know where MSI is getting the E:\ from, but as soon as I alias $(var.WindowsSystemFolder), the correctly resolved variable SystemFolder becomes just SystemFolder (plain text), which isn't further processed. Help. :S
Variables.wxi (excerpt)
<!-- Platform Configuration -->
<?if $(var.Platform) = x64 ?>
<?define WindowsSystemFolder = "System64Folder" ?>
<?else ?>
<?define WindowsSystemFolder = "SystemFolder" ?>
<?endif ?>
Product.wsx (excerpt)
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="WINSYSTEMFOLDER" Name="$(var.WindowsSystemFolder)" />
</Directory>
somewhere.wsx
<Fragment>
<DirectoryRef Id="WINSYSTEMFOLDER">
<Component Id="RandomComponent" Guid="7784D238-2502-45B4-B5B3-180D31E56485">
<File Id="RandomFile"
Name="$(var.MyProject.TargetFileName)"
Source="$(var.MyProject.TargetPath)" />
Flags passed to candle
-dDebug -dPlatform=x86 -arch x86