[wix-users] WIX Major Upgrade happens instantly and only 'flashes' the default ProgressDlg dialog

Michael McDonald arbitmcdonald at gmail.com
Sat Oct 26 03:35:28 PDT 2019


I have created a custom dialog that should only be shown during a major
upgrade. It should take the place of the default WelcomeDlg dialog and the
Next button should go straight to the VerifyReadyDLg dialog.

Everything works well for the Install and Maintenance, but the Major
Upgrade kicks off immediately without showing any dialogs (only the
progress dialog), and then closes immediately without any
confirmation/success dialog.

Here is the current behaviour:

*Install (works perfectly)*

 1. WelcomeDlg (default)
 2. ApiKeyDlg (custom)
 3. VerifyReadyDlg (default)

Maintenance (works perfectly)

 1. MaintenanceWelcomeDlg (default)
 2. MaintenanceTypeDlg(defaukt)
 3. VerifyReadyDlg (default)

Major Upgrade (broken)

 1. ProgressDlg (default) only. Literally, as soon as you run the MSI file
it completes the upgrade (successfully) but the user isn't shown any
dialogs they can interactive with. The ProgressDlg flashes up and then
vanishes!

The expected behaviour of a Major Upgrade is:

 1. UpdateWelcomeDlg (custom)
 2. VerifyReadyDlg (default) followed by the common EndDialog.

Why is the Major Upgrade Welcome dialog not being shown, and why is the
EndDialog not being shown either? How can I stop major Updates from
auto-running?



<!-- truth table for installer varables (install vs uninstall vs repair vs
upgrade) https://stackoverflow.com/a/17608049/1721136 -->
<SetProperty Id="_INSTALL"   After="FindRelatedProducts"
Value="1"><![CDATA[Installed="" AND
PREVIOUSVERSIONSINSTALLED=""]]></SetProperty>
<SetProperty Id="_UNINSTALL" After="FindRelatedProducts"
Value="1"><![CDATA[PREVIOUSVERSIONSINSTALLED="" AND
REMOVE="ALL"]]></SetProperty>
<SetProperty Id="_CHANGE"    After="FindRelatedProducts"
Value="1"><![CDATA[Installed<>"" AND REINSTALL="" AND
PREVIOUSVERSIONSINSTALLED<>"" AND REMOVE=""]]></SetProperty>
<SetProperty Id="_REPAIR"    After="FindRelatedProducts"
Value="1"><![CDATA[REINSTALL<>""]]></SetProperty>
<SetProperty Id="_UPGRADE"   After="FindRelatedProducts"
Value="1"><![CDATA[PREVIOUSVERSIONSINSTALLED<>""]]></SetProperty>


<UI>
    <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
    <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
    <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes"
/>

    <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />

    <DialogRef Id="DiskCostDlg" />
    <DialogRef Id="LicenseAgreementDlg" />
    <DialogRef Id="VerifyReadyDlg" />
    <DialogRef Id="ErrorDlg" />
    <DialogRef Id="FatalError" />
    <DialogRef Id="FilesInUse" />
    <DialogRef Id="MsiRMFilesInUse" />
    <DialogRef Id="PrepareDlg" />
    <DialogRef Id="ProgressDlg" />
    <DialogRef Id="ResumeDlg" />
    <DialogRef Id="UserExit" />

    <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog"
Value="Return" Order="999">1</Publish>

    <Publish Dialog="UpdateWelcomeDlg" Control="Next" Event="NewDialog"
Value="VerifyReadyDlg">Installed OR PREVFOUND OR
WIX_UPGRADE_DETECTED</Publish>

    <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog"
Value="LicenseAgreementDlg">NOT Installed OR NOT PREVFOUND OR NOT
WIX_UPGRADE_DETECTED</Publish>

    <Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog"
Value="WelcomeDlg">1</Publish>
    <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog"
Value="ApiKeyDlg">LicenseAccepted = "1"</Publish>

    <Publish Dialog="ApiKeyDlg" Control="Back" Event="NewDialog"
Value="LicenseAgreementDlg">1</Publish>
    <Publish Dialog="ApiKeyDlg" Control="Next" Event="NewDialog"
Value="VerifyReadyDlg"></Publish>

    <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog"
Value="ApiKeyDlg" Order="1">NOT Installed</Publish>
    <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog"
Value="MaintenanceTypeDlg" Order="2">Installed AND NOT PATCH</Publish>
    <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog"
Value="UpdateWelcomeDlg" Order="3">Installed OR PREVFOUND OR
WIX_UPGRADE_DETECTED</Publish>


    <Publish Dialog="MaintenanceWelcomeDlg" Control="Next"
Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>

    <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton"
Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
    <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton"
Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
    <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog"
Value="MaintenanceWelcomeDlg">1</Publish>


    <Dialog Id="ApiKeyDlg" Width="370" Height="270" Title="[ProductName]
Setup">

        <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370"
Height="44" TabSkip="no" Text="!(loc.ProgressDlgBannerBitmap)" />
        <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56"
Height="17" Default="yes" Text="!(loc.WixUINext)" />
        <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56"
Height="17" Text="!(loc.WixUIBack)" />
        <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56"
Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
            <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
        </Control>

        <Control Id="Description" Type="Text" X="25" Y="23" Width="280"
Height="15" Transparent="yes" NoPrefix="yes" Text="Only the Organisation ID
is required unless you're using a web proxy" />
        <Control Id="Title" Type="Text" X="15" Y="6" Width="200"
Height="15" Transparent="yes" NoPrefix="yes" Text="Agent configuration" />

        <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370"
Height="0" />
        <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370"
Height="0" />

        <Control Id="ApiKeyLabel" Type="Text" X="20" Y="55" Width="290"
Height="10" NoPrefix="yes" Text="Organisation ID (required):" />
        <Control Id="ApiKey" Type="Edit" X="20" Y="70" Width="300"
Height="18" Property="UI_ORGANISATION" Indirect="yes" />

        <Control Id="ProxyAddressLabel" Type="Text" X="20" Y="95"
Width="290" Height="10" NoPrefix="yes" Text="Proxy server address
(optional):" />
        <Control Id="Proxy" Type="Edit" X="20" Y="110" Width="300"
Height="18" Property="UI_PROXYADDRESS" Indirect="yes" />

        <Control Id="ProxyUsernameLabel" Type="Text" X="20" Y="130"
Width="290" Height="10" NoPrefix="yes" Text="Proxy username (leave blank
for default):" />
        <Control Id="ProxyUsername" Type="Edit" X="20" Y="145" Width="300"
Height="18" Property="UI_PROXYUSERNAME" Indirect="yes" />

        <Control Id="ProxyPasswordLabel" Type="Text" X="20" Y="165"
Width="290" Height="10" NoPrefix="yes" Text="Proxy password (leave blank
for default):" />
        <Control Id="ProxyPassword" Type="Edit" Password="yes" X="20"
Y="180" Width="300" Height="18" Property="UI_PROXYPASSWORD" Indirect="yes"
/>

        <Control Id="ScoutCheckbox" Type="CheckBox" X="20" Y="205"
Width="300" Height="17" Property='UI_SCOUTSHORTCUT' CheckBoxValue='1'>
            <Text>Create a Start Menu shortcut for 'Scout (optional)</Text>
        </Control>
    </Dialog>

    <Dialog Id="UpdateWelcomeDlg" Width="370" Height="270"
Title="[ProductName] Update">
        <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56"
Height="17" Default="yes" Text="!(loc.WixUINext)" >
            <Publish Property="WixUI_InstallMode" Value="Update">Installed
AND PATCH</Publish>
        </Control>
        <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56"
Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
            <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
        </Control>
        <Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370"
Height="234" TabSkip="no" Text="!(loc.UpdateWelcomeDlgBitmap)" />
        <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56"
Height="17" Disabled="yes" Text="!(loc.WixUIBack)" />
        <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370"
Height="0" />
        <Control Id="Description" Type="Text" X="135" Y="80" Width="220"
Height="60" Transparent="yes" NoPrefix="yes"
Text="!(loc.UpdateWelcomeDlgDescription)" />
        <Control Id="Title" Type="Text" X="135" Y="20" Width="220"
Height="60" Transparent="yes" NoPrefix="yes"
Text="!(loc.UpdateWelcomeDlgTitle)" />
    </Dialog>

    <InstallUISequence>
        <Show Dialog="WelcomeDlg" Before="ProgressDlg" Overridable="no">NOT
Installed AND NOT PREVFOUND AND NOT WIX_UPGRADE_DETECTED</Show>
        <Show Dialog="UpdateWelcomeDlg" Before="ProgressDlg"
Overridable="no">(Installed OR PREVFOUND OR WIX_UPGRADE_DETECTED) AND
(_UPGRADE AND NOT _UNINSTALL)</Show>
    </InstallUISequence>

    <UIRef Id="WixUI_Common" />
</UI>


My 'hunch':

I believe the issue may be with the conditions here, but if I change them
the Install/Maintenance workflows are broken. I have tried some 10+
variations without success:


    <InstallUISequence>
        <Show Dialog="WelcomeDlg" Before="ProgressDlg" Overridable="no">NOT
Installed AND NOT PREVFOUND AND NOT WIX_UPGRADE_DETECTED</Show>
        <Show Dialog="UpdateWelcomeDlg" Before="ProgressDlg"
Overridable="no">(Installed OR PREVFOUND OR WIX_UPGRADE_DETECTED) AND
(_UPGRADE AND NOT _UNINSTALL)</Show>
    </InstallUISequence>


More information about the wix-users mailing list