[wix-users] SpawnDialog: Allowing user to return or continue to next dialog

Bryan Dam bryand at recastsoftware.com
Thu Feb 25 11:42:28 PST 2021


Our installer has some configuration bits that we want the user to fill out and verify but also allow them to skip if our validation fails for whatever reason.

To this end we have a checkbox that allows the user to skip verification (ex. SkipDomainVerification="1").  Then they click Next we'd like to give them a dialog (SpawnDialog) that warns about which features won't work until they fix those underlying configuration issues and give them the option to go back and try again or continue on to the next dialog.

Here's what I've got so far

The Next button:
<Dialog Id="DomainSettings" Title="[ProductName] [ProductVersion] Setup">
...
          <Control Id="Next" Type="PushButton" Text="Next" >
                    <Publish Event="SpawnDialog" Value="InvalidDomain">SkipDomainVerification="1"</Publish>
                    <Publish Event="NewDialog" Value="ConfigMgrSettings" Order="1">1</Publish>
          </Control>
...
</Dialog>

The InvalidDomain dialog (the text miiiight not be final yet):
<Dialog Id="InvalidDomain" Title="[ProductName] Setup" NoMinimize="yes">
        <Control Id="Return" Type="PushButton" Default="yes" Cancel="yes" Text="&Return">
            <Publish Event="EndDialog" Value="Return">1</Publish>
        </Control>
        <Control Id="Continue" Type="PushButton" Text="&Continue">
            <Publish Event="NewDialog" Value="ConfigMgrSettings"/>
        </Control>
        <Control Id="Text" Type="Text" TabSkip="no">
            <Text>
                Dude. Come on. Try. Harder.
            </Text>
        </Control>
</Dialog>

This 'sort' of works but not really.  If you click Next in the InvalidDomain dialog you go to the next page but it's doing so in the spawned window.  Which then breaks if you try and go backwards:
"Error 2856:  Creating a second copy of the dialog DomainSettings"

That all makes sense.  I'm spawning a new dialog and then trying to move forward without closing that new dialog. The original dialog is still there waiting like a poor lost soul.

My question: is there a way to accomplish this outside of a custom BA?  Maybe a way for InvalidDialog to return a value that triggers DomainSettings to go to the next dialog (ConfigMgrSettings)?

If not it wouldn't be the end of the world.  I'll just trigger the dialog when the user clicks the checkbox.

    Thanks all,
       Bryan



More information about the wix-users mailing list