MSI register dll - 自注册被认为是有害的 [英] MSI register dll - Self-Registration considered harmful

查看:41
本文介绍了MSI register dll - 自注册被认为是有害的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 .NET winform 应用程序,它需要在安装过程中注册本机 dll.我的问题是如何将 dll (regsvr32 ABC.dll) 注册为 MSI 安装过程的一部分?同样,如何在卸载过程中取消注册 dll?

I have a .NET winform application that requires to register a native dll during installation. My question is how can I register a dll (regsvr32 ABC.dll) as part of MSI installion process? Similary how can I un-register a dll as part of un-installation process?

推荐答案

vsdrfCOMSelfReg 不是最佳实践.请尝试使用 vsdrfCOM.这将从 DLL 中提取"(或尝试,vdproj 有时是 POS)COM 元数据并将其编写到正确的 COM 表中.这比希望在安装时对 DllRegisterServer 的进程外调用更好.

vsdrfCOMSelfReg is not a best practice. Try vsdrfCOM instead. This will "extract" ( or try, vdproj is a POS sometimes ) the COM metadata from the DLL and author it into the correct COM tables. This is better then hoping an out of process call to DllRegisterServer will work at install time.

现在 MSI 本身就知道您的 COM 资源,它会为您处理安装和卸载.

Now that MSI is natively aware of your COM resources, it will handle install and uninstall for you.

这篇关于MSI register dll - 自注册被认为是有害的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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