how to register DLL's properly in wix 3.9 [duplicate]

余生颓废 提交于 2019-12-06 16:19:48

Simply put, any form of self registration (COM being one of them) is an antipattern. There are various reasons a few of which are:

1) They add fragility to the install

2) They can halt a silent install when they fail.

3) They don't log any information on why they failed.

4) They are out of process; the installer isn't aware of them (no repair)

5) They break the transactional nature of Windows Installer (no rollback)

6) They slow the install down

7) They hide implementation details and can't be observed or transformed

I'd go so far to say this isn't a matter of opinion but rather a matter of best practice facts. But I suppose at the end of the day best practices are just opinions also. Still, I've authored thousands of installers over the last 20 years and I can say without a doubt that self registration should be skipped whenever possible. Instead use Heat to "harvest" the COM meta data and author it into your wxs code so MSI can handle this natively for you. There are other tricks that can be employed if Heat is unable to get all the details.

Finally, don't use COM whenever possible. For example you could consider using a RegFree COM manifest instead to simulate the registration of the component.

See: Do not use the SelfReg and TypeLib tables.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!