WiX CustomAction 第三方库依赖项

发布于 2024-09-15 08:52:57 字数 202 浏览 2 评论 0原文

我实现了在卸载或重新安装产品时需要运行的自定义操作 DLL。自定义操作 DLL (C++) 引用第三方库,该库是也需要注册的 COM 对象。

我有两个问题: 1. 如何将第三方库包含到安装包中?我希望该文件对用户不可见。 2. 当自定义操作 DLL 在卸载过程中运行时,如何确保第 3 方库仍然存在? CustomAction 在“InstallFinalize”之前运行。

I implemented Custom Action DLL that needs to run when the product is being unistalled or reinstalled. Custom Action DLL (C++) references third party library which is a COM object that needs to be also registered.

I have 2 questions:
1. How do I include third party library into installer package? I'd prefer if the file were not visible to the user.
2. How do I make sure that 3rd party library is still around when Custom Action DLL runs during unistall? CustomAction is run before 'InstallFinalize'.

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

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

发布评论

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

评论(1

别挽留 2024-09-22 08:52:57

您不应该安装第 3 方控件,除非控件提供商有 Redist 协议表明允许这样做。如果安装控件除了将文件放置在您自己的应用程序安装位置(例如需要注册表项)之外还需要其他任何操作,那么您确实需要从控件提供程序获取 MSM。

之后,您必须安排自定义操作在安装时的 WriteRegistryValues 之后和卸载时的 RemoveRegistryValues 之前运行。您最终得到的解决方案可能非常脆弱,因此请小心并祝您好运(您将来可能会尝试从产品中删除该要求)。

You should not be installing 3rd party controls unless the control provider has a redist agreement saying it is allowed. If installing the control requires anything beyond placing the file in your own application install location (such as requiring registry keys) then you really need to get an MSM from the control provider.

After that, you would have to schedule your custom action to run after WriteRegistryValues on install and before RemoveRegistryValues on uninstall. The solution you get end up iwth is likely to be pretty fragile so be careful and good luck (and you might try to remove the requirement from the product in the future).

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