I have a setup that requires 2 different file locations -one for the program one for distributed data.
I also allow the user NOT to copy the data. If they uncheck the "copy the data" feature, Ihide the second file location dialog.
Going forward through the install this works fine.
but if the user gets to the last dialog Ready To Install and clicks back, when they get to the data location dialog, the wizard ends and the install begins.

Here is the code I put in the wizard loop-
! Wizard dialog definition(s)
Define Wizard Dialog "#1" (Welcome)
Define Wizard Dialog "#2" (Password)
Define Wizard Dialog "LA" (License Agreement)
Define Wizard Dialog "UI" (User Info)
Define Wizard Dialog "CI" (Custom Install)
Define Wizard Dialog "SIF" (Select Install Folder) (%_SB_INSTALLDIR%)
Define Wizard Dialog "SDF" (Select Install Folder) (%CS_DATADEST%) -- Get the data location
Define Wizard Dialog "RTI" (Ready to Install)

! The Wizard Loop displays the dialog screens that the user sees in the installation
! Hide the license dialog until we have the proper text!
Show Wizard Dialog "#2"
Set Variable %CS_DATADEST% to ""
Loop Wizard (Abort Dialog Active)
If Feature "CopyData" selected Then
Show Wizard Dialog "SDF"
If %_SB_DIALOGNEXTID% Equals "$SDF$" Then
Set Variable %CS_DATADEST% to "%_SB_INSTALLDIR%"
Set Variable %CS_DATADEST% to "\DATA" [Append Value]
Refresh Next Dialog
Set Variable %CS_DATADESTDESC% to "Data files destination| %CS_DATADEST%"
End
Else
Set Variable %CS_DATADESTDESC% to "Data Files will not be copied.|Please be sure to locate the data manually."
Hide Wizard Dialog "SDF"
End
End

! Display progress dialog
Display Setup Progress Dialog

Thanks,
chris