WIX 3:对 Visual Basic 6 COM Dll 使用 HEAT
我正在使用 WIX 3。我已经使用 heat 为 VB6 dll 创建了一个 wxs 文件。 msi创建没有任何错误,安装也成功。
一切似乎都很好,我可以从 VB 客户端成功调用该组件。
但是,如果我从 ASP 页调用该组件,则会得到 0x800401f3。
如果我使用自注册(regsvr32)而不是安装程序,则两者都可以正常工作。
我做了一个注册表差异来找出自注册(regsvr32)和安装程序之间的区别,我看到以下
- 内容 HKCR 中的所有条目都匹配 - 一切都很好,
- regsvr32 在 HKLM 中添加了条目,而安装程序不触及 HKLM
I我想知道这是否是问题所在,或者我完全走错了路。
MSDN (http://msdn.microsoft.com/en -us/library/ms694355(VS.85).aspx) 提到 HKLM 中需要注册表项,想知道我在这里缺少什么。
以下是 heat 创建的文件。
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<DirectoryRef Id="TARGETDIR">
<Directory Id="dirAD70B10292EAB7CAC7171859FBB23AA9" Name="vbdll" />
</DirectoryRef>
</Fragment>
<Fragment>
<DirectoryRef Id="dirAD70B10292EAB7CAC7171859FBB23AA9">
<Component Id="cmp9D818C62A6239E8B51E971A0048D0C05" Guid="PUT-GUID-HERE">
<File Id="filDD6F51EC5018EF4A9A312FFA6AC4257D" KeyPath="yes" Source="SourceDir\vbdll\act.dll">
<TypeLib Id="{80D8DA04-72C9-4D36-B269-57D989187ACF}" Description="act" HelpDirectory="dirAD70B10292EAB7CAC7171859FBB23AA9" Language="0" MajorVersion="1" MinorVersion="0">
<Class Id="{31BD65B6-9479-40EB-83C0-E717CD4793DD}" Context="InprocServer32" Description="act.def" ThreadingModel="apartment" Version="1.0" Programmable="yes">
<ProgId Id="act.def" Description="act.def" />
</Class>
<Interface Id="{C6D46026-CD7E-4AB0-B3B6-810FBF435BEF}" Name="def" ProxyStubClassId="{00020424-0000-0000-C000-000000000046}" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
</TypeLib>
</File>
<RegistryValue Root="HKCR" Key="CLSID\{31BD65B6-9479-40EB-83C0-E717CD4793DD}\Implemented Categories\{40FC6ED5-2438-11CF-A3DB-080036F12502}" Value="" Type="string" Action="write" />
</Component>
</DirectoryRef>
</Fragment>
</Wix>
更新:使用文件的“SelfReg”选项也可以使 ASP 客户端正常工作。我从其他帖子中读到这是不能使用的。有人能告诉我该怎么办吗?
I am using WIX 3. I have used heat to create a wxs file for a VB6 dll. The msi creates without any errors, and the installation is successful as well.
All seems to be fine, and I can invoke the component successfully from a VB client.
However, if I invoke the component from an ASP page, I get 0x800401f3.
If instead of the installer, I use self registration (regsvr32), both work fine.
I did a registry difference to figure out what was the difference between self registration (regsvr32) and the installer, and I see the following
- All entries in HKCR match - all well here
- regsvr32 adds entries in HKLM, while the installer does not touch HKLM
I am wondering if this is the issue, or am I completely on a wrong track.
MSDN (http://msdn.microsoft.com/en-us/library/ms694355(VS.85).aspx) mentions that registry entries are required in HKLM, wondering what am I missing here.
Following is the file created by heat.
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<DirectoryRef Id="TARGETDIR">
<Directory Id="dirAD70B10292EAB7CAC7171859FBB23AA9" Name="vbdll" />
</DirectoryRef>
</Fragment>
<Fragment>
<DirectoryRef Id="dirAD70B10292EAB7CAC7171859FBB23AA9">
<Component Id="cmp9D818C62A6239E8B51E971A0048D0C05" Guid="PUT-GUID-HERE">
<File Id="filDD6F51EC5018EF4A9A312FFA6AC4257D" KeyPath="yes" Source="SourceDir\vbdll\act.dll">
<TypeLib Id="{80D8DA04-72C9-4D36-B269-57D989187ACF}" Description="act" HelpDirectory="dirAD70B10292EAB7CAC7171859FBB23AA9" Language="0" MajorVersion="1" MinorVersion="0">
<Class Id="{31BD65B6-9479-40EB-83C0-E717CD4793DD}" Context="InprocServer32" Description="act.def" ThreadingModel="apartment" Version="1.0" Programmable="yes">
<ProgId Id="act.def" Description="act.def" />
</Class>
<Interface Id="{C6D46026-CD7E-4AB0-B3B6-810FBF435BEF}" Name="def" ProxyStubClassId="{00020424-0000-0000-C000-000000000046}" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
</TypeLib>
</File>
<RegistryValue Root="HKCR" Key="CLSID\{31BD65B6-9479-40EB-83C0-E717CD4793DD}\Implemented Categories\{40FC6ED5-2438-11CF-A3DB-080036F12502}" Value="" Type="string" Action="write" />
</Component>
</DirectoryRef>
</Fragment>
</Wix>
Update : Using the "SelfReg" option for the File makes the ASP client work as well. I read from other posts that this is not to be used. Can someone tell me what's to be done?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要让安装程序将条目放入 HKLM 下,安装必须标记为 perMachine,默认值似乎是 perUser,如下所示。
完成此操作后,条目将进入 HKCR 和 HKLM。
我希望有人觉得这很有用,我花了 6 个小时。
To get the installer to put entries under HKLM, the installation has to be marked as perMachine, the default seems to be perUser, as done below.
Once this is done, the entries come in HKCR and also HKLM.
I hope somebody finds this useful, took me a good 6 hours..