簡體   English   中英

在卸載過程中通過C#自定義操作顯示WiX對話框

[英]Showing WiX dialog from a C# custom action during uninstall

在從快捷方式運行並使用基本UI添加/刪除程序的卸載序列中,我無法顯示對話框。 似乎正在跳過修改和安裝過程中顯示的InstallUISequence:

<!--Displays uninstall options before uninstall progress dialog WixUI_InstallMode = "Remove"-->
<InstallUISequence>
    <Show Dialog="UninstallDialog" Before="ProgressDlg">WixUI_InstallMode = "Remove"</Show>
</InstallUISequence>

但是,同樣重要的是,我也要在基本卸載順序中運行此對話框。 是否可以顯示通過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>

您正在嘗試做的是反模式。 而是禁用“刪除”按鈕並強制用戶進行“更改” |“更改”。 刪除故事。 您可以在那里顯示本地MSI UI。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM