[wix-users] Cancel Dialog and return nothing

Stephen Griffiths stephengriffiths2709 at outlook.com
Fri Jul 6 03:11:33 PDT 2018


I am currently building a custom wizard and one of the steps is to select a user specific directory to install the application into.
After selecting a new folder and clicking the Back button everything works as expected and the selected folder in the install location picker dialog is transferred back to the calling dialog box. However, I have also added a cancel button but whatever I try I cannot seem to get the original value of the install location to be transferred back to the calling dialog.

I have searched on the web for this but there aren’t many returns and what there are do not refer to the problem that I am having. This would lead me to believe that I am missing the bleeding obvious!

My dialog is shown below. Can anyone point out to me where I am wrong!

Many thanks for any help

Steve

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

                <Fragment>

    <Property Id="ORIGINALINSTALLFOLDER" Value="INSTALLFOLDER" Secure="yes"/>

                  <UI>
                    <Dialog Id="InstallationLocationPickerDialog"
                            Width="400"
                            Height="250"
                            Title="Choose Installation Location"
                            NoMinimize="no">

                      <Control Id="InstallLocationText"
                               Type="Text"
                               Text="{\Tahoma_Regular}Please enter the installation location."
                               Height="15"
                               Width="300"
                               X="25"
                               Y="25">
                      </Control>

                      <Control Id="MyInstallLocation"
                               Type="PathEdit"
                               Property="INSTALLFOLDER"
                               Height="20"
                               Width="300"
                               X="25"
                               Y="40"/>

                      <Control Id="MyDirectoryList"
                               Type="DirectoryList"
                               Property="INSTALLFOLDER"
                               Height="100"
                               Width="300"
                               X="25"
                               Y="60"/>

                      <Control Id="DirectoryUpButtony"
                               Type="PushButton"
                               Width="30"
                               Height="20"
                               Text="UpIcon"
                               X="330"
                               Y="60">
                        <Publish Event="DirectoryListUp"
                                 Value="0"></Publish>
                      </Control>

                      <Control Id="NewDirectoryButton"
                               Type="PushButton"
                               Width="25"
                               Height="20"
                               Text="New"
                               X="330"
                               Y="90">
                        <Publish Event="DirectoryListNew"
                                 Value="0"></Publish>
                      </Control>

                      <Control Id="Back"
                               Type="PushButton"
                               X="180"
                               Y="180"
                               Width="60"
                               Height="17"
                               Text="Back">
                        <Publish Event="EndDialog"
                                 Value="Return"></Publish>
                      </Control>

                      <Control Id="Cancel"
                               Type="PushButton"
                               Property="ORIGINALINSTALLFOLDER"
                               X="250"
                               Y="180"
                               Width="60"
                               Height="17"
                               Text="Cancel"
                               Cancel="yes">
                        <Publish Event="EndDialog"
                                 Value="Return"></Publish>
                      </Control>

                    </Dialog>
                  </UI>

  </Fragment>

</Wix>

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10



More information about the wix-users mailing list