Does anyone know if/how I can stop a WiX-based MSI installer from proceeding to the next dialog when a certain condition is met? I have the following code:
<Dialog Id="SelectIISApplicationPoolUserDialog" Width="370" Height="270" Title="$(var.ApplicationPoolUserDialogTitle)">
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)">
<Publish Property="APPLICATIONPOOLUSER" Value="{}">WEBSITE_APPLICATIONPOOLUSERTYPE = "local"</Publish>
<Publish Property="APPLICATIONPOOLUSER" Value="1">WEBSITE_APPLICATIONPOOLUSERTYPE = "domain"</Publish>
<Publish Event="DoAction" Value="CheckPortNumber">1</Publish>
</Control>
CheckPortNumber refers to this:
<Binary Id="IISCA" SourceFile="binaries/MyCustomActions.IIS.CA.dll" />
<CustomAction Id="CheckPortNumber"
BinaryKey="IISCA"
DllEntry="IsFreePort"
Execute="immediate" />
Also, somewhere else, we have this declare:
<Publish Dialog="SelectIISApplicationPoolUserDialog"
Control="Next"
Event="NewDialog"
Value="SetSqlServerConnectionDialog">ISPORTFREE</Publish>
When I run the installer and get to the dialog to select the application pool user, I click next. The custom action then checks the portnumber and sets the ISPORTFREE variable. However, the next dialog isn't shown, regardless of the result of ISPORTFREE. But when I click Next a second time, the next dialog is shown.
So what I want is: when I click next and the entered portnumber is in use, I get a warning and don't proceed to the next dialog. If it isn't in use, I proceed to the next dialog.