Wix Condition Error - Failed to parse condition


I am trying to use a variable that I am setting from my custom UI. I am seeing in the logs where it sets the value, but everything I've tried the condition fails.

Here is the code in question:

<MsiPackage SourceFile="$(var.Recorder.Installer.TargetPath)" InstallCondition="[InstallRecorder]"
              Visible="no" EnableFeatureSelection="yes" Name="Recorder.Installer" Id="Recorder.Installer"

I am setting [InstallRecorder] to the string '1' as true and '0' as false.

With that said, this is what I've tried:

[InstallRecorder]=1 [InstallRecorder]='1' InstallRecorder=1 'InstallRecorder'='1'

If someone could please tell me what I'm doing wrong, or provide a good link this would be very helpful.

Also, here is the exact logs that I'm seeing if this helps.

[1194:0AC0][2020-08-13T05:39:46]i000: Setting string variable 'InstallRecorder' to value '1'
[1194:0AC0][2020-08-13T05:39:46]i000: Starting Installation
[1194:0F64][2020-08-13T05:39:46]i200: Plan begin, 1 packages, action: Install
[1194:0F64][2020-08-13T05:39:46]e000: Error 0x8007000d: Failed to parse condition "[InstallRecorder]". Unexpected character at position 0.
asked on Stack Overflow Aug 13, 2020 by 3xGuy

1 Answer


After a day of pulling my hair out, I finally figured out what my issue was.

I changed this:

  <Variable Name="InstallRecorder" Value="0" />
  <Variable Name="InstallDataTransport" Value="0"/>

To this:

<Variable Name="InstallRecorder" bal:Overridable="yes" Type="numeric" Value="0" />
<Variable Name="InstallDataTransport" bal:Overridable="yes" Type="numeric" Value="0"/>

And then just accessed it like:

InstallCondition="InstallDataTransport = 1"
answered on Stack Overflow Aug 14, 2020 by 3xGuy

User contributions licensed under CC BY-SA 3.0