wix可以添加卸载对话框吗?

发布于 2024-08-15 20:43:02 字数 226 浏览 2 评论 0原文

我想添加自定义对话框来卸载我的应用程序。 我也尝试过以下操作:

<InstallUISequence>
   <Show Dialog="RemoveDlg" OnExit="success">REMOVE="ALL"</Show>
</InstallUISequence>

在wix中是否可能?谁能帮我解决这个问题吗?

I want to add customized dialog box for uninstallation of my application.
I have also tried the following:

<InstallUISequence>
   <Show Dialog="RemoveDlg" OnExit="success">REMOVE="ALL"</Show>
</InstallUISequence>

Is it possible or not in wix? Can anyone help me out with this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

千秋岁 2024-08-22 20:43:02

虽然您当然可以创作特定于产品删除的对话框,但从“添加或删除程序”(现在的“程序和功能”)中的删除按钮启动的卸载是在没有 UI 序列的情况下运行的,因此不会显示这些对话框。一种常见的替代方法是设置 ARPNOREMOVE 属性,然后要求最终用户单击“修改”而不是“删除”。修改按钮会启动维护,这会显示您的 UI。

While you can certainly author dialogs that are specific to product removal, uninstallations started from the remove button in Add or Remove Programs (now Programs and Features) are run without the UI sequence, and thus will not show these dialogs. One common alternative is to set the ARPNOREMOVE property which then requires the end user to click Modify instead of Remove. The modify button starts maintenance, which does show your UI.

随遇而安 2024-08-22 20:43:02

除非 %appdata%\product\ 中的数据可能会导致重新安装应用程序出现问题,否则我建议在卸载时将其保留在原处。您在此文件夹中安装的任何内容都被视为用户数据,默认情况下不应自动删除 - 通常也不作为一个选项。许多公司对用户配置文件文件夹应用自定义权限。在那里搞乱可能会导致你的 MSI 严重卡顿 - 特别是在终端服务器上,通过触发自我修复(这在 TS 上通常是不允许的)。

请记住,安装、卸载和修补使用相同的安装顺序。如果您使用基本上卸载并重新安装产品的主要升级补丁,您最终可能会删除用户数据并在每次安装时重新安装。如果这是可以接受的,则您处理的数据不是用户数据,因此位于磁盘上的错误位置。

如果您在卸载结束时通过检查退出代码的自定义操作运行删除操作,则可能会触发卸载回滚,从而导致产品重新安装并且无法卸载!很少见,但它确实发生了。如果自定义操作在 InstallFinalize 之后运行,因此在 MSI 安装顺序之外,您的安装程序可能会返回卸载错误代码,并使您的产品损坏、卸载不完整或部分未注册。

简而言之,我不会乱搞这个。如果你有坚持的客户,如果我能帮忙的话,我不会打扰对话。我将添加一个 PUBLIC 属性来控制是否在 InstallFinalize 之前立即运行自定义操作。刷新所有错误返回代码并将信息写入 MSI 日志。然后,用户可以通过在命令行上指定属性或在属性表中对其进行硬编码来卸载用户数据。

如果您必须有一个 GUI,您可以使用相同的属性从自定义对话框中进行设置,以控制是否完成删除。请记住小心调节对话框的显示。 IE 在修补操作期间不会显示它。

Unless the data in %appdata%\product\ can cause problems for a re-installation of the application I would recommend leaving it in place on uninstall. Whatever you install in this folder is considered user data, and should not be automatically removed by default - and often not as an option either. Many companies apply custom permissioning on the userprofile folders. Messing around in there could cause your MSI to hickup seriously - particularly on terminal servers by triggering self-repair (which is generally not allowed on TS).

Keep in mind that the same installation sequence is used for install, uninstall and patching. If you use major upgrade patches that essentially uninstall and reinstall the product you could end up deleting the user data and reinstalling it for every installation. If this is acceptable, the data you deal with is not user data, and is hence located in the wrong place on disk.

If you run a delete operation towards the end of the uninstall via a custom action that checks exit code, you could trigger rollback of the uninstall, essentially causing the product to be reinstalled and be impossible to uninstall! Rare, but it happens. If the custom action is run after InstallFinalize and hence outside the MSI install sequence your setup could return an uninstall error code and leave your product broken and the uninstall incomplete or your product partially unregistered.

In short I wouldn't mess around with this. If you have insistent customers I wouldn't mess with a dialog if I could help it. I would add a PUBLIC property to control whether a custom action is run immediately prior to InstallFinalize. Flush any error return codes and write information into the MSI log instead. Then users could uninstall user data by specifying the property on the command line or hard code it in the Property table.

If you have to have a GUI you can use the same property to set from a custom dialog to control whether deletion is done or not. Remember to condition the display of the dialog with care. I.E don't show it during patching operations.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文