Reputation: 53
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
<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.
Upvotes: 1
Views: 3569
Reputation: 20780
The return values from custom actions are intended for use by Windows Installer, not you. Returning ActionResult.Failure tells Windows that your CA failed so badly that the installation needs to finish. If your CA works fine and is not fatal to the installation process then return a success result. Use property values to denote user results.
In my experience the more usual method to deal with that type of dialog is to use the normal sequence from one dialog to the next. The only difference is that you start the dialog with the Next button disabled and Enable it if your user verification succeeds.
Upvotes: 2