类表生成InprocServer32值问题

发布于 2024-09-16 14:20:59 字数 690 浏览 6 评论 0原文

我正在安装一个包含一些 COM 服务器的 Active X 控件。我使用 InstallShield 的 COM Extract at Build 选项来生成注册表信息。这会导致注册表和类表中出现大量条目。 (提取的信息与使用 Wix 几乎相同)。

看来我的 COM 服务器已正确安装,除了 InprocServer32 键中名为“InprocServer32”的附加值,如下所示:

HKCR\CLSID\{MY-COM-GUID}\InprocServer32
    (Default) = C:\Path-to-my\file.ocx
    InprocServer32 = 8tYCAGak)9S9&~swl.$?MyFeatureName>*&N$B'fk?As1x2J653?'

我唯一能从附加值中看出的是 MyFeatureName,它是 MSI 的内部名称包含 .ocx 文件的功能。该密钥未在注册表中列出,因此必须由类表生成。

我遇到的问题仅发生在 Windows Server 2008 中。尝试使用 COM 服务器的应用程序似乎无法从(默认)值找到 .ocx 文件的路径,而是找到 InprocServer32 值。这会导致应用程序启动 MSI,然后让 MSI 陷入无限循环。

我想知道这是否是 Windows Server 2008 中的一个已知问题,或者是否有办法阻止 msiexec 生成该额外值。

I'm installing an Active X control that contains some COM servers. I'm using InstallShield's COM Extract at Build option to generate the registry information. This results in a lot of entries in the Registry and Class tables. (The extracted information is pretty much the same using Wix).

It appears that my COM Sever is correctly being installed except for an additional value called "InprocServer32" in the InprocServer32 key that looks like this:

HKCR\CLSID\{MY-COM-GUID}\InprocServer32
    (Default) = C:\Path-to-my\file.ocx
    InprocServer32 = 8tYCAGak)9S9&~swl.$?MyFeatureName>*&N$B'fk?As1x2J653?'

The only think I can make out from the extra value is the MyFeatureName which is the internal name of the MSI feature that contains the .ocx file. The key is not listed in the Registry table so it must be generated by the Class table.

The problem I'm having only happens in Windows Server 2008. It seems that the app trying to use the COM server is failing to find the path to the .ocx file from the (Default) value and instead it is finding the InprocServer32 value. This results in the app launching the MSI and then having the MSI being stuck in what seems like an infinte loop.

I'm wondering if this is a known issue in Windows Server 2008 or whether there is a way to prevent that extra value from being generated by msiexec.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

甜味超标? 2024-09-23 14:20:59

我读过这篇文章,看看它是否可以帮助您达到您想要的目标:

RobMen 的建议:不要在 MSI 中公布 COM 信息

您可能希望在构建时关闭 InstallShield 的 COM 提取,而改为执行一次性 COM相关组件的摘录。然后您可以进入“组件高级”部分并手动操作注册表/com 表信息以使其成为您想要的方式。

如果您使用 WiX,另一个工作流程/技巧是使用 Heat 围绕 COM 服务器构建 MSI 或 MSM。然后使用InstallShield 在直接模式下编辑MSI/MSM,并使用注册表视图将注册表项/值导出到.REG 文件。然后将该 .REG 文件导入到实际安装项目中的组件中。

I'd read this article and see if it helps you get where you want to be:

RobMen's Recommendation: Do not advertise COM information in MSI

You might want to turn off InstallShield's COM Extract at Build and instead do a One-Time COM Extract on the component in question. Then you can go into the Component Advanced section and manually manipulate the registry / com table information to be how you want it to be.

If you use WiX at all, another workflow / trick is to use Heat to build an MSI or MSM around your COM server. Then use InstallShield to edit the MSI/MSM in direct mode and the Registry view to export the Registry Keys/Values to a .REG file. Then import that .REG file into your Component in your real install project.

梦在深巷 2024-09-23 14:20:59

我无法帮助你诊断发生了什么,我只是咕哝一下这一切意味着什么。这是针对DLL Hell的对策。它应该保护您的应用程序免受某种其他安装程序的影响,这些安装程序可能会覆盖您的 COM 服务器注册表项。特别是(默认)键,它提供了服务器 DLL 的位置。

根据伪造的 InprocServer32 值,应用程序可以自动检测默认密钥是否被覆盖,并自动再次启动 MSI 以修复损坏。这就是你所看到的情况。

我非常不喜欢这个功能,它只是一个问题,当它爆炸时就已经很难排除故障了。这是一个无用的功能,它假设其他安装程序不使用完全相同的对策。这在 10 年前是可行的。

不知道您会采取什么措施来解决这个特定的故障。其他的则只需将这个 cr*p 扔掉,让服务器自行进行 SelfReg 即可。至少当不起作用时你会有一些东西可以使用。

I can't help you diagnose what's going on, I'll just mumble a bit about what this all means. This is a counter-measure against DLL Hell. It is supposed to protect your application against some kind of other install program that could overwrite your COM server registry keys. Specifically the (Default) key which gives the location to your server DLL.

From the fake InprocServer32 value, the app can auto-detect that the Default key was overwritten and automatically launch MSI again to repair the damage. Which is what you see happening.

I thoroughly dislike the feature, it is just one more fail point in something that is already hard to troubleshoot when it blows up. And it is a useless feature, it assumes that the other installer doesn't use the exact same counter-measure. Which would have worked 10 years ago.

No idea what you'd do to troubleshoot this particular failure. Other then just punt this cr*p and let the servers just SelfReg themselves. At least you'll have something to work with when that doesn't work.

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