使用MSI在64位计算机上安装OCX文件 [英] Installing OCX files on a 64-bit machine with a MSI

查看:146
本文介绍了使用MSI在64位计算机上安装OCX文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很久以前,我创造了一个"套房"。 Windows在VB6中构建应用程序。 我最近被要求为这些程序创建一个MSI安装程序,我使用VS 2008进行了安装。 其中一些程序引用了第三方.OCX文件。 因此,我手动将这些添加到安装项目和"目标机器上的文件系统"中的包含文件中。部分,我指定了"系统文件夹"。

当我在非64位机器上测试安装时,一切顺利:OCX文件安装在C:\ Windows中\\ System32文件夹,它们在安装过程中已正确注册。 已安装的程序都正确显示。

然后我们尝试在64位计算机上安装它(Win 7)。 如果我将OCX文件保留在"系统文件夹"中,则它们被安装在64位系统文件夹中(类似于C:\ Windows \ system.Sowwow64(?)。 虽然在安装过程中没有错误,当我试图运行这些程序时,我得到的错误是那些文件没有正确注册。为了记录,这些OCX文件是 old - 所以他们属于在32位系统文件夹中。

接下来,我尝试通过在名为"System32Hardcode"的安装中创建自定义文件夹来"强制"我想要的文件,其中DefaultLocation属性已设置to"[WindowsFolder] \ System32"(注意System32周围没有括号)。当我在64位机器上运行此安装时,出现如下错误:

模块C:\ Windows \ System32 \ filename.OCX无法注册。  HRESULT -2147024700。 请联系您的支持人员。

由于这里没有正确注册,程序运行不正常。

如何处理? 我真的不在乎他们最终的文件夹,但我需要他们正确注册我的程序才能工作。 我搞砸了"自定义操作"和"自定义操作"。在安装项目中,但我无法弄清楚如何手动注册文件。

我非常感谢任何建议或意见。 谢谢!

A long time ago, I created a "suite" of windows forms apps in VB6.  I was recently asked to create a MSI installer for these program, which I did using VS 2008.  Some of these programs have references to third-party .OCX files.  Therefore, I manually added these to the included files in the setup project and in the "File System on Target Machine" section, I specified the "System Folder".

When I tested the installation on a non-64-bit machine, everything went well: the OCX files were installed in the C:\Windows\System32 folder and they were correctly registered during installation.  The installed programs all came up correctly.

Then we tried installing it on a 64-bit machine (Win 7).  If I left the OCX files in the "System Folder", they were installed in the 64-bit system folder (something like C:\Windows\Systemwow64 (?).  While there were no errors during the installation, when I tried to run the programs, I got errors about those files not being correctly registered.  For the record, these OCX files are old - so they belong in the 32-bit system folder.

Next, I tried to "force" the files where I wanted them by creating a custom folder in the installation called "System32Hardcode" where the DefaultLocation property was set to "[WindowsFolder]\System32" (note the lack of brackets around System32).  When I ran this install on the 64-bit machine, I got errors like this:

Module C:\Windows\System32\filename.OCX failed to register.  HRESULT -2147024700.  Contact your support personnel.

Since they didn't register correctly here, the programs did not run properly.

How can I handle this?  I really don't care what folder they end up in, but I need them to be correctly registered for my programs to work.  I messed around with "Custom Actions" in the install project, but I could not figure out how to manually register the files.

I would greatly appreciate any suggestions or comments.  Thank you!

推荐答案

该错误消息似乎比缺少注册更严重。它是"操作系统无法运行此应用程序。 "。  你有没有机会在这张照片中得到一些16位代码?
That error message seems more serious than just missing registration. It's "The operating system cannot run this application program. ".   Have you by any chance got some 16-bit code in this picture?


这篇关于使用MSI在64位计算机上安装OCX文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆