如何让安装程序在 ARP 中隐藏“取消”按钮?

发布于 2024-09-19 12:47:35 字数 415 浏览 2 评论 0原文

当用户单击 ARP 中的“删除”时,我需要能够隐藏或禁用安装程序中的“取消”按钮。有什么办法可以做到这一点吗?如果有的话,怎么做? (将 /qb! 命令行选项添加到 UninstallString 注册表值中不起作用。我尝试过。请不要提供特定于 IDE 的答案,除非它们与 Wise Windows Installer 编辑器有关。)

编辑: Christopher Painter 的答案确实有效,但它并不是 100% 的解决方案。不幸的是,InstallFinalize 操作再次显示“取消”按钮,即使我在其之后再次调用自定义操作,该按钮仍然可见足够长的时间,以便用户能够单击它。 (我通过在自定义操作期间出现一个消息框来验证这一点,这样我就可以看到它何时被调用。)一旦我隐藏“取消”按钮,我希望(不,需要)它保持隐藏状态。时期。有什么办法可以实现这一目标吗?

I need to be able to hide or disable the Cancel button in my installer when the user clicks on Remove in the ARP. Is there any way to go about doing that, and if so, how? (Adding the /qb! command line option into the UninstallString registry value doesn't work. I tried. No IDE-specific answers, please, unless they pertain to Wise Windows Installer Editor.)

Edit: While Christopher Painter's answer does to the trick, it's not a 100% solution. Unfortunately, the InstallFinalize action shows the Cancel button again, and even when I put another call to my custom action right after it, the button is still visible for a long enough time for the user to be able to click it. (I verified this by having a message box come up during my custom action so I could see when it was being called.) Once I hide the Cancel button, I want--no, need--it to stay hidden. Period. Is there any way that I can achieve that?

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

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

发布评论

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

评论(1

征﹌骨岁月お 2024-09-26 12:47:35

当产品是 MSI 时,ARP 会忽略 UninstallString 注册表值。我相信您能够做到这一点的唯一方法是通过自定义操作。

顺便说一句,我想知道为什么你需要这样做。我猜你有一个不支持回滚的自定义操作?我宁愿解决这个问题并继续给予用户改变主意的能力。

在安装过程中隐藏取消按钮

您的安装可以隐藏和取消隐藏
取消按钮
通过发送安装
INSTALLMESSAGE_COMMONDATA 消息
使用 DLL 自定义操作或脚本。
有关详细信息,请参阅动态链接
库、脚本、自定义操作、
和向 Windows 发送消息
使用 MsiProcessMessage 的安装程序。

The UninstallString registry value is ignored by ARP when the Product is an MSI. I believe the only way you'll be able to do it is via a Custom Action.

As an aside, I'm wondering why you need to do this. I'm guessing you have a custom action that doesn't support rollback? I'd rather fix that problem and continue to give the user the ability to change their mind.

Hiding the Cancel Button During an Installation

Your installation can hide and unhide
the Cancel button during parts of an
installation by sending an
INSTALLMESSAGE_COMMONDATA message
using a DLL custom action or scripts.
For more information, see Dynamic-Link
Libraries, Scripts, Custom Actions,
and Sending Messages to Windows
Installer Using MsiProcessMessage.

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