WIX 3:对 Visual Basic 6 COM Dll 使用 HEAT

发布于 2024-08-04 02:11:09 字数 2413 浏览 2 评论 0原文

我正在使用 WIX 3。我已经使用 heat 为 VB6 dll 创建了一个 wxs 文件。 msi创建没有任何错误,安装也成功。

一切似乎都很好,我可以从 VB 客户端成功调用该组件。

但是,如果我从 ASP 页调用该组件,则会得到 0x800401f3。

如果我使用自注册(regsvr32)而不是安装程序,则两者都可以正常工作。

我做了一个注册表差异来找出自注册(regsvr32)和安装程序之间的区别,我看到以下

  1. 内容 HKCR 中的所有条目都匹配 - 一切都很好,
  2. 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

  1. All entries in HKCR match - all well here
  2. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

樱花落人离去 2024-08-11 02:11:09

要让安装程序将条目放入 HKLM 下,安装必须标记为 perMachine,默认值似乎是 perUser,如下所示。

<Package InstallScope="perMachine" InstallerVersion="200" Languages="1033" Compressed="yes" SummaryCodepage="1252" />

完成此操作后,条目将进入 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.

<Package InstallScope="perMachine" InstallerVersion="200" Languages="1033" Compressed="yes" SummaryCodepage="1252" />

Once this is done, the entries come in HKCR and also HKLM.

I hope somebody finds this useful, took me a good 6 hours..

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文