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
- I have a custom action
- The custom action validates username and password
- If validation is successful, the custom action sets a property ([CONNECTED] = 1) value to 1
- If validation fails, it sets property value to empty and then pops up a message box that says value incorrect
- The custom action (c#) is executed in my dialog in next button
- 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.
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="[ButtonText_Next]"> <Publish Event="DoAction" Value="MyCustomAction">1</Publish> <Publish Event="NewDialog" Value="CustomizeDlg">CONNECTED= "1"</Publish> </Control>
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.