title: Windows Installer Toolkit (WIX) Dialog Condition not working
body: <p>this thing drives me mad.</p>
  
  <p>What I have is a custom Exit dialog with some controls on it. Here is the source:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"&gt;
      &lt;Fragment&gt;
          &lt;UI&gt;
              &lt;Dialog Id="MyExitDialog" Width="370" Height="220" Title="!(loc.ExitDialog_Title)"&gt;
                  &lt;Control Id="Finish" Type="PushButton" X="236" Y="200" Width="56" Height="17" Default="yes" Cancel="yes" Text="!(loc.WixUIFinish)" /&gt;
                  &lt;Control Id="Cancel" Type="PushButton" X="304" Y="200" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUICancel)" /&gt;
                  &lt;Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.DiskCostDlgBannerBitmap)" /&gt;
                  &lt;Control Id="InstallText" Type="Text" X="25" Y="53" Width="330" Height="50" Text="Product [ProductName] was successfully installed" &gt;
                      &lt;Condition Action="show"&gt;NOT Installed&lt;/Condition&gt;
                  &lt;/Control&gt;
                  &lt;Control Id="UninstallText" Type="Text" X="25" Y="53" Width="330" Height="50" Text="Product [ProductName] was successfully removed." &gt;
                      &lt;Condition Action="show"&gt;Installed&lt;/Condition&gt;
                  &lt;/Control&gt;
                  &lt;Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" /&gt;
                  &lt;Control Id="Back" Type="PushButton" X="180" Y="200" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUIBack)" /&gt;
                  &lt;Control Id="BottomLine" Type="Line" X="0" Y="190" Width="370" Height="0" /&gt;
                  &lt;Control Id="Description" Type="Text" X="25" Y="23" Width="340" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.ExitDialogDescription)" /&gt;
                  &lt;Control Id="Title" Type="Text" X="15" Y="6" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.ExitDialogTitle)" /&gt;
                  &lt;Control Id="LaunchAfterExitCheckBox" Type="CheckBox" X="25" Y="145" Width="330" Height="18" CheckBoxValue="1" Property="LAUNCHAFTEREXIT" Text="Run application after installation" &gt;
                      &lt;Condition Action="show"&gt;NOT Installed&lt;/Condition&gt;              
                  &lt;/Control&gt;
              &lt;/Dialog&gt;
              &lt;InstallUISequence&gt;
                  &lt;Show Dialog="MyExitDialog" OnExit="success" Overridable="yes" /&gt;
              &lt;/InstallUISequence&gt;
              &lt;AdminUISequence&gt;
                  &lt;Show Dialog="MyExitDialog" OnExit="success" Overridable="yes" /&gt;
              &lt;/AdminUISequence&gt;
          &lt;/UI&gt;
      &lt;/Fragment&gt;
  &lt;/Wix&gt;
  </code></pre>
  
  <p>Those of you beeing familiar with the WIX sources will easily recognize that I have cloned the ExitDialog contained in WIX, and given it the same layout as almost all other dialogs (horizontal banner on top), to work around the "letterbox" bug (Windows background shining through controls). Now the problem is, that die "Launch application" Checkbox does appear on install and on uninstall, seems the condition has no effect. I can, however, successfully tick and untick the checkbox by setting the LAUNCHCONDITION property, so tehre is some live in this thing. The whole issue is somewhat weird, because 10 lines futher up I use the exactly same condition to switch texts between "InstallText" and "UninstallText", and this works just fine.</p>
  
  <p>This is the original code from the ExitDialog:</p>
  
  <pre><code>&lt;Control Id="OptionalCheckBox" Type="CheckBox" X="135" Y="190" Width="220" Height="40" Hidden="yes" Property="WIXUI_EXITDIALOGOPTIONALCHECKBOX" CheckBoxValue="1" Text="[WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT]"&gt;
      &lt;Condition Action="show"&gt;WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT AND NOT Installed&lt;/Condition&gt;
  &lt;/Control&gt;
  </code></pre>
  
  <p>OK, they have another condition AND-ed, which doesn't exist in my project, but so what? My condition should work nicely, but it doesn't. I have been staring at those few lines for hours now, and tried this and that, no success.</p>
  
  <p>What am I missing???</p>
  
  <p>Thx, Armin.</p>