title: How do I show Error Message using Managed Custom Actions with Windows Installer
body: <p>I am writing a managed custom action. I am using the DTF Framework from Windows Installer Xml to wrap the managed dll into a usable CA dll. The CA does what it is supposed to, but I am still having trouble with error handling:</p>
  
  <pre><code>Dim record As New Record(1)
  
  ' Field 0 intentionally left blank
  ' Field 1 contains error number
  record(1) = 27533
  session.Message(InstallMessage.Error, record)
  </code></pre>
  
  <p>The above code produces the following text shown in the MSI log:</p>
  
  <blockquote>
    <p>MSI (c) (C4 ! C6) [13:15:08:749]: Product: TestMSI -- Error 27533. The case-sensitive passwords do not match.</p>
  </blockquote>
  
  <p>The error number refers to the code contained in the Error table within the MSI. The Message shown above is correct.</p>
  
  <p>My problem is: Why does Windows Installer NOT create a dialog notifying the user about the error?</p>