【发布时间】:2013-11-04 18:09:19
【问题描述】:
我正在尝试使用 WiX 安装程序在 COM 上注册一个库,但它似乎忽略了我。
到目前为止我尝试过的是:
使用heat.exe获取所有对应.dll的信息。
创建了一个片段,其中包含我从 heat.exe 收集的所有信息。 我将所有收集到的信息复制到一个组件中,以使事情变得更容易。
我使用
ComponentRef调用组件,该ComponentRef指向包含要注册的dll 相关信息的组件。我使用自定义操作将其注册到 COM:
<CustomAction Id="RegisterComLibrary" Directory="ComPublishDllFolder" ExeCommand="regsvr32.exe /s [ComPublishDllFolder]MyLibrary.dll />
-
在
InstallExecuteSequence中插入CustomAction:<InstallExecuteSequence> <Custom Action="RegisterComLibrary" After="InstallFinalize">NOT Installed</Custom> </InstallExecuteSequence>
但是,当我尝试使用 oleview 在 COM 中查找 .dll 或尝试在 Visual Studio 中使用它时,我看不到它。
我做错了什么?
注意:我在尝试手动注册时收到以下消息:
The module "MyComObject.dll" was loaded but the call to DllRegisterServer failed.
Ensure that "MyComObject.dll" is a valid DLL or OCX and try again.
【问题讨论】:
-
热量产生了什么?另外,调用
regsvr32不是Windows Installer 的方式——它旨在通过Registry 表管理注册表项。
标签: wix libraries wix3.5 wix3.6