使用 WiX 注册 COM 服务器 [英] Registering a COM server with WiX

查看:22
本文介绍了使用 WiX 注册 COM 服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试确定使用 WiX 注册 COM 服务器以创建 Windows 安装程序包的最佳案例解决方案,但我正在苦苦挣扎.

I have been trying to determine a best case solution for registering a COM server using WiX to create a Windows Installer package and am struggling.

在这篇文章中 部署工程存档:HOWTO:将 Regsvr32.exe 与 WIX 一起使用,有一个公开的请求,要求设置警察"通过 exe 自定义操作来打击使用 regsvr32.我知道使用 regsvr32 因为它注册到系统而不是用户的弊端,但我还记得 OleSelfRegister 可能有来自微软支持公告的问题(对不起,可以'找不到链接)-我相信他们建议使用 regsvr32.

In this post Deployment Engineering Archive: HOWTO: Use Regsvr32.exe with WIX, there is an open request for the "Setup police" to crack down on using regsvr32 through an exe custom action. I know the evils of using regsvr32 as it registers to the system rather than the user, but I also recall that OleSelfRegister can have issues from a microsoft support bulletin (sorry, can't find the link) - and I believe they recommended using regsvr32.

有什么建议吗?

推荐答案

阅读不要使用 SelfReg 和 TypeLib 表"在:

Read "Do not use the SelfReg and TypeLib tables" at:

https://msdn.microsoft.com/en-us/library/bb204770#no_selfreg

对于 WiX,请查看架构参考中的 Component 元素:

For WiX, take a look at the Component element in the schema reference at:

http://wixtoolset.org/documentation/manual/v3/xsd/wix/component.html

注意某些子元素,例如 AppIdClassProgIdRegistry 等.正确的技术是使用 COM 提取 来反映注册信息并将其以声明方式发送到您的安装程序中,以便 MSI 可以为您处理它,而不会超出某些代码的进程(例如 DllRegisterServer()) 可能会失败,并且也无法让 MSI 从维修和广告的角度深入了解组件的足迹.

Take notice of certain child elements such as AppId, Class, ProgId, Registry and so on. The proper technique is to use COM extraction to reflect the registration information and emit it declaratively into your installer so MSI can take care of it for you without going out of process to some code (like DllRegisterServer()) that could fail and also not provides MSI insight into the footprint of the component from a repair and advertisement perspective.

这篇关于使用 WiX 注册 COM 服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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