How to reference SystemFolder in WiX Icon.SourceFile property?
问题 To make the long story short, this doesn't work: <Icon Id="msiexec.ico" SourceFile="[SystemFolder]msiexec.exe"/> (Error 4 The system cannot find the file '[SystemFolder]msiexec.exe') And this doesn't work too: <Icon Id="msiexec.ico" SourceFile="$(var.SystemFolder)msiexec.exe"/> Error 3 Undefined preprocessor variable '$(var.SystemFolder)'. 回答1: The second sample in your question will work if you pass var.SystemFolder as a parameter to candle.exe . The <Icon> element is mapped to the Icon MSI