关于这个的更新。我发现第一个问题是我的 InstallUISequence 表,我必须这样做,
<InstallUISequence>
<Custom Action="CreateConnectionStrings" After="ExecuteAction">NOT Installed</Custom>
<Show Dialog="CustomInstall" After="WelcomeEulaDlg" >NOT Installed</Show>
<Show Dialog="StartupMenu" After="CustomInstall" >NOT Installed and CUSTOMINSTALL = 1</Show>
<Show Dialog="iCalibraDatabaseSelection" After="StartupMenu">NOT Installed and CUSTOMINSTALL = 1</Show>
<Show Dialog="GlobalStoreDatabaseSelection" After="iCalibraDatabaseSelection">NOT Installed and CUSTOMINSTALL = 1</Show>
</InstallUISequence>
请注意,在 StartupMenu、iCalibraDatabaseSelection 和 GlobalStoreDatabaseSelection 对话框中,我添加了新条件 CUSTOMINSTALL = 1。
当我选择“默认安装”选项时,这解决了我的问题。这会跳到安装过程。
我现在遇到的问题是当我选择“自定义安装”选项时。我浏览了上述每个对话框,GlobalStoreDatabaseSelection 对话框应该是最后一个对话框。在那个对话框中,我有这个,
<Control Id="Install" Type="PushButton" X="236" Y="243" Width="56" Height="17" Disabled="no" Text="Install" >
<Publish Event="EndDialog" Value="Return"></Publish>
</Control>
但这不会使安装程序进行实际安装。它跳回到 StartupMenu 对话框。
所以我猜 Event="EndDialog" Value="Return" 实际上做了什么?它会跳到哪里?