如何在没有注册ocx的情况下将具有ocx依赖性的实用程序部署到测试机器? [英] How do I deploy a utility with ocx dependency to a test machine without registering the ocx?

查看:215
本文介绍了如何在没有注册ocx的情况下将具有ocx依赖性的实用程序部署到测试机器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个测试工具,它取决于在我的开发机器上安装/注册的ocx文件。我们希望在测试机器上运行此工具,而不会对机器造成任何不必要的文件的污染。除了目标机器软件之外,不应该安装任何东西。在网络驱动器上或从复制到测试机器的独立目录中运行该工具将是理想的。但是,在测试机上注册ocx是不成问题的。将ocx文件放在与exe不相同的目录中。无论它仍然给我这个错误 - 由于应用程序配置不正确,应用程序无法启动,重新安装应用程序可能会解决问题。还有什么可以尝试的? FYI,我使用Visual Studio 2008。

I have a test utility that depends upon an ocx file that is installed/registered on my development machine. We'd like to run this tool on a test machine without polluting the machine with any unnecessary files. Nothing should be installed except the target machine software. Running the tool on a network drive or from a stand-alone directory copied to the test machine would be ideal. But, registering the ocx on the test machine is out of the question. Placing the ocx file in the same directory as the exe doesn't work. No matter what it still gives me this error--"The application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem." What else can I try? FYI, I'm using Visual Studio 2008.

推荐答案

如果我们在谈论Windows XP +,那么Microsoft有一个名为Reg - 自由COM。基本上,您为您的EXE创建一个调用到您的DLL / OCX的清单文件,并且具有进行COM呼叫所需的所有注册信息,而无需在HKCR中实际注册。

If we are talking about Windows XP+, then Microsoft has a capability called Reg-Free COM. Basically you create a manifest file for your EXE that calls into your DLL/OCX and it has all the registration information needed to make the COM call without actually registering it in HKCR.

http://msdn.microsoft.com/en-us/library/ms973913。 aspx

这篇关于如何在没有注册ocx的情况下将具有ocx依赖性的实用程序部署到测试机器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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