自动化服务器问题-2 [英] Automation server problem - 2

查看:95
本文介绍了自动化服务器问题-2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我之前的问题的扩展 [ ^ ].

我现在编写了一个非常简单的基于对话框的MFC应用程序,并启用了自动化功能.除了显示对话框外,它什么也不做.它被称为"test_server",它是使用Visual Studio 2008生成的,除了默认设置外,完全没有其他设置,而正是New Project向导生成的.我还为此编写了一个标准的部署项目,该项目将应用程序放入程序文件",并将其快捷方式放入开始"菜单.

我写了一个非常简单的VBS脚本:

This is an extension of my previous question[^].

I have now written a very simple dialog-based MFC app with automation enabled. It doesn''t do anything at all except display the dialog. It''s called "test_server", and was produced using Visual Studio 2008 with absolutely nothing but default settings, just what the New Project wizard produces. I also wrote a standard deployment project for this which just puts the app into Program Files and a shortcut to it onto the Start menu.

I wrote a very simple VBS script:

Set test=Wscript.CreateObject("test_server.Application")
MsgBox "Click to exit test_server",,"Exit"



全新安装后,脚本可以在XP中很好地启动应用程序(只要我首先以独立模式运行该应用程序以注册它,这是可以接受的),但是在Vista中失败.

我收到错误消息为80020009的消息找不到自动化类...".

我非常确定这一定是一个众所周知的问题,但是到目前为止,我一直避开Vista,因此对我来说是新的.任何帮助解决极大的赞赏. (显然,这只是一个测试存根,用于涉及两个更大的MFC程序的问题,这些程序在XP中可以正常交互,但在Vista中会失败.)
谢谢,

Bill Heitler



The script launches the app fine in XP after a clean install (so long as I run the app in stand-alone mode first to register it, which is acceptable), but fails in Vista.

I get the message "Could not locate automation class ..." with the error number 80020009.

I''m quite sure that this must be a well-known issue, but I''ve steered clear of Vista up to now, and so it''s new to me. Any help in solving greatly appreciated. (Obviously, this is just a test stub for a problem involving two much larger MFC programs that interact OK in XP but fail in Vista).

thanks,

Bill Heitler

推荐答案

我的赌注是关于海拔问题.您尝试过以管理员身份运行您的资料吗?
请注意,您的开发环境正在XP中自动在注册表中注册您的应用程序,但是在Vista上,为了使HKLM混乱,您需要提升的特权.
My bets are on elevation issue. Have your tried running your stuff as administrator?
Note that your development environment is registering your application in the registry automatically in XP, but on Vista, in order to mess around with HKLM, you require elevated privileges.


这篇关于自动化服务器问题-2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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