Я создал собственный диалог, который должен отображаться только во время серьезного обновления. Он должен занять место диалогового окна WelcomeDlg по умолчанию, а кнопка «Далее» должна перейти прямо в диалог VerifyReadyDLg.
Все хорошо работает для установки и обслуживания, но Major Upgrade запускается сразу, без отображения каких-либо диалогов (только диалог прогресса), а затем сразу же закрывается без какого-либо диалога подтверждения / успеха.
Как только вы запускаете файл MSI, он завершает обновление (успешно), но пользователю не показываются никакие диалоговые окна, с которыми он может взаимодействовать. ProgressDlg вспыхивает, а затем исчезает!
Почему не отображается диалоговое окно приветствия при главном обновлении и почему не отображается EndDialog? Как я могу остановить основные обновления от автоматического запуска?
<!-- 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>
Моя «догадка»
Я полагаю, что проблема может быть связана с условиями здесь, но если я изменю их, рабочие процессы установки / обслуживания будут нарушены. Я попробовал более 10 вариантов без успеха:
<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>