在卸载期间从C#自定义操作显示WiX对话框

use*_*668 0 c# windows-installer custom-action wix

我在从快捷方式运行的卸载序列中显示对话框时遇到问题,并使用基本UI添加/删除程序.它似乎正在跳过修改和安装期间显示的InstallUISequence:

<!--Displays uninstall options before uninstall progress dialog WixUI_InstallMode = "Remove"-->
<InstallUISequence>
    <Show Dialog="UninstallDialog" Before="ProgressDlg">WixUI_InstallMode = "Remove"</Show>
</InstallUISequence>
Run Code Online (Sandbox Code Playgroud)

但是,重要的是我在基本卸载序列期间运行此对话框也很重要.是否可以从InstallExecuteSequence的C#自定义操作运行中显示在WiX中定义的对话框?如果是这样,我该怎么做呢?有没有教程?我想要显示的对话框如下所示:

<!--Dialog used to obtain uninstall options from user-->
<Dialog Id="UninstallDialog" Width="120" Height="100" Title="Options">
    <Control Id="DelDatabaseCheckBox" Type="CheckBox"
             X="15" Y="10" Width="90" Height="17" Property="DELDATABASE"
             CheckBoxValue="1" Text="Delete Database"/>

    <Control Id="DelSettingsCheckBox" Type="CheckBox"
             X="15" Y="30" Width="90" Height="17" Property="DELSETTINGS"
             CheckBoxValue="1" Text="Delete Settings"/>

    <Control Id="DelErrorLogCheckBox" Type="CheckBox"
             X="15" Y="50" Width="90" Height="17" Property="DELERRORLOG"
             CheckBoxValue="1" Text="Delete Error Log"/>

    <Control Id="ConfirmUninstall" Type="PushButton" X="22" Y="75" Width="70" Height="17" Text="Ok">
        <Publish Event="EndDialog" Value="Return">1</Publish>
    </Control>
</Dialog>
Run Code Online (Sandbox Code Playgroud)

Chr*_*ter 5

你要做的是反模式.而是禁用"删除"按钮并强制用户完成"更改" 删除故事.您可以在那里显示本机MSI UI.