title: WiX Condition works in MSI but not in Bundle
body: <p>When I'm building my MSI file, and I use a basic condition, the expected happens.  For example, let's say that I have this in Setup File:</p>
  
  <pre><code>&lt;Property Id="myProperty" Value="0"/&gt;
  &lt;Condition Message="Value of myProperty is [myProperty], and it should be 1."&gt;
      &lt;![CDATA[Installed OR myProperty = "1"]]&gt;
  &lt;/Condition&gt;
  </code></pre>
  
  <p>If I build this and run the MSI file, it works -- that is, it displays the error message and quits.</p>
  
  <p><a href="https://i.stack.imgur.com/BTp5u.png" rel="nofollow noreferrer">Working condition when running MSI</a></p>
  
  <p>However, if I put the MSI into a Bundle, it doesn't work.  That is, when I put just this into my Bootstrapper ("Properties" below is the name of my Setup project -- bad name, I realize):</p>
  
  <pre><code>    &lt;Chain&gt;
         &lt;MsiPackage SourceFile="$(var.Properties.TargetPath)"/&gt;
      &lt;/Chain&gt;
  </code></pre>
  
  <p>And then I run the setup file, I get an error.  When the installation starts, it checks the condition, gives me the expected message box (same as above), and then I get this error message:</p>
  
  <p><a href="https://i.stack.imgur.com/jx1FB.png" rel="nofollow noreferrer">Setup Failed</a></p>
  
  <p>Looking at the Log, I get three error messages:</p>
  
  <pre><code>Error 0x80070643: Failed to install MSI package. 
  Error 0x80070643: Failed to execute MSI package. 
  Error 0x80070643: Failed to configure per-machine MSI package.
  </code></pre>
  
  <p>With the exit code:</p>
  
  <pre><code>Exit code: 0x643, restarting: No
  </code></pre>
  
  <p>I'm such a noob at WiX that I'm not even sure how to go about researching what the problem is -- I can't even ask an intelligent question.  Hence, I'm reaching out to you kind folks!</p>
  
  <p>(I'm using WiX 3.10 and Visual Studio 2015)</p>
  
  <p><strong><em>EDIT:</em></strong></p>
  
  <p>Thanks for getting back to me!  I tried your suggestions:</p>
  
  <p>In the installer file, I made the property public and I made it secure.  I left the condition the same, and, since I don't think that I should get the value here as opposed to in the bootstrapper, I left the value of the property out.  Here is the code that I made for the property/condition:</p>
  
  <pre><code>&lt;Property Id="MY_PROPERTY" Secure="yes"/&gt;
  &lt;Condition Message="MY_PROPERTY is [MY_PROPERTY].  Should be 1"&gt;
      &lt;![CDATA[Installed OR MY_PROPERTY = "1"]]&gt;
  &lt;/Condition&gt;
  </code></pre>
  
  <p>Then, in the boostrapper file, I added a child element of  and gave it a value:</p>
  
  <pre><code>&lt;MsiPackage SourceFile="$(var.LCondErrorInstaller.TargetPath)"&gt;
      &lt;MsiProperty Name="MY_PROPERTY" Value="0"/&gt;
  &lt;/MsiPackage&gt;
  </code></pre>
  
  <p>When I ran it, I got almost the same behaviour as I did before, except for one difference -- when I get the error message.  This time, I get the pop-up screen with the Message condition and the same error message as I did before (see "Setup Failed" above), except this time I get it happens little later in the installation, making me think that the condition is, in fact, getting triggered in the bootstrapper.</p>
  
  <p>As far as the log files, they look the same (I'm not sure how to get log files of the MSI when running the Burn file, what I do now is just run the Burn file with the flag "/l", like so:  > <strong>file.exe /l logFile.log</strong>).</p>
  
  <p>For clarity, here are the parts of the log file that appear to be important:</p>
  
  <pre><code>    Error 0x80070643: Failed to install MSI package.
      Error 0x80070643: Failed to execute MSI package.
      Error 0x80070643: Failed to configure per-machine MSI package.
      ...
      Exit code: 0x643, restarting: No
  </code></pre>
  
  <p>I should have been more specific when I initially asked the question about what kind of behaviour I'm looking for...</p>
  
  <p>I will have more than just that one MSI file in the Burn file.  What I want to do is this:  <em>when the Burn file installs, if there is a condition in one of the MSI files that is not met, I want that MSI file to simply not be installed,</em> and the rest of the MSIs to be installed.  I don't care about the UI.  </p>
  
  <p>If there's another way to do this, I'm all ears.</p>