WiX 3.7:如何在卸载过程中添加或更新对话框? [英] WiX 3.7: How to add or update a dialog during uninstall?

查看:39
本文介绍了WiX 3.7:如何在卸载过程中添加或更新对话框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要添加一个对话框,该对话框将在确认(您确定要卸载此产品吗?")对话框后立即弹出,在完全卸载(不是主要升级)过程中.此对话框将提示用户回答问题,并根据响应设置一个属性,该属性将在 RemoveRegistryKey 元素的条件中使用(即,仅当用户选择删除注册表项的选项时,它才会删除注册表项).

I need to add a dialog box that would pop up during complete uninstall (not major upgrade) right after the confirmation ("Are you sure you want to uninstall this product?") dialog. This dialog would prompt the user to answer a question and based on the response, set up a property that would be used in the condition for the RemoveRegistryKey element (i.e. it will remove a registry key only if the user selects an option to delete the key).

我知道如何将对话框添加到安装序列中(我正在使用修改后的 WixUI_InstalLDir 序列,我在安装过程中向其中添加了一个我需要的自定义对话框),但是我找不到任何可以解释如何添加对话框的参考资料将自定义对话框添加到卸载序列.如果我能修改卸载确认对话框就更好了,这样用户就会看到一个对话框而不是两个.一个关键是能够设置一个可以在组件条件中使用的属性.

I have an idea how to add a dialog to the install sequence (I am using a modified WixUI_InstalLDir sequence to which I added a custom dialog I need during installation), but I can't find any references that would explain how to add a custom dialog to an uninstall sequence. It would be even better if I could modify the uninstall confirmation dialog, so the user would see one dialog instead of two. An the key thing would be to be able to set up a property that could be used in the component condition.

这可能吗?有没有如何做到这一点的例子?

Is this possible? Are there any examples how to do this?

推荐答案

这违反了 Microsoft 设计指南.添加/删除程序使用静默 UI 参数调用卸载,并且从不处理 UI 序列.

This is against Microsoft design guidelines. Add/Remove programs calls the uninstall with a silent UI argument and the UI sequence is never processed.

您可以在卸载期间创作 UI 的唯一地方是更改"或维护"UI 体验,他们选择修复 |改变 |删除和删除做你的用户界面.但是您必须锁定删除"按钮并强制它们通过此路径.还意识到他们可以从命令行调用 msiexec/x/qb.

The only place you can author UI during an uninstall is a "change" or "maintenance" UI experience where they select Repair | Change | Remove and on Remove do your UI. But you'd have to lock down the Remove buttom and force them through this path. Also realize they could call msiexec /x /qb from the command line.

最重要的是,Microsoft 做出此选择是为了让用户的卸载过程简单易行.至于删除注册表项,微软会说你应该在卸载时保留用户数据.

Bottom line is Microsoft made this choice to make the uninstall process simple and easy for the user. As for removing the registry key, Microsoft would say that you should leave user data on uninstall.

这篇关于WiX 3.7:如何在卸载过程中添加或更新对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆