title: Wix - Custom Action Return Code - Handling
body: <p>Please read carefully as I will explain what I'm trying to do. I have a wix installer that calls custom action to validate user input. I want to call next dialog if validation is successful and NOT move if validation is not successful</p>
  
  <ol>
  <li>I have a custom action</li>
  <li>The custom action validates username and password</li>
  <li>If validation is successful, the custom action sets a property ([CONNECTED] = 1) value to 1 </li>
  <li>If validation fails, it sets property value to empty and then pops up a message box that says value incorrect </li>
  <li>The custom action (c#) is executed in my dialog in next button</li>
  <li>The custom action executes fine, and it pops up when there is a failure
  Here is the problem
  If there is failure, a popup is made and my wix installer jumps to the end dialog (FINISH) to only give me option to exit the installation.
  Or it will sometimes give me the next dialog even though it failed.
  Here is the code for executing my custom action. <code>
   &lt;Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="[ButtonText_Next]"&gt;
      &lt;Publish Event="DoAction" Value="MyCustomAction"&gt;1&lt;/Publish&gt;
      &lt;Publish Event="NewDialog" Value="CustomizeDlg"&gt;CONNECTED= "1"&lt;/Publish&gt;
  &lt;/Control&gt;</code></li>
  </ol>
  
  <p>My question is why does it not remain in the current dialog if there is an error meaning it did not return a 1. It goes to the Finish dialog after I click ok.</p>