activex无法通过vbs创建对象,但可以通过经典asp创建对象 [英] activex can't create object by vbs but can by classic asp

查看:132
本文介绍了activex无法通过vbs创建对象,但可以通过经典asp创建对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows Server 2008 R2上,我安装了一个COM对象,可以从经典的ASP页面创建它。

On my Windows Server 2008 R2 I installed a COM object and can create it from a classic ASP page.

从vbscript文件中调用它时,我得到了无法创建消息。

When I call it from a vbscript file, I get the "can't create" message.

我尝试以管理员身份启动Powershell并使用它来运行脚本。没运气。

I have tried starting Powershell as administrator and using that to run the script. No luck.

我尝试让每个人用户完全控制COM DLL。没运气。

I have tried giving the "everyone" user full control over the COM DLL. No luck.

有什么想法吗?

推荐答案

对我而言,有意义的是,COM对象与类ASP的位数相同,而与脚本引擎的位数不同。我不知道,但是我想经典的ASP是32位的,而您的COM对象是32位的。

The only thing that makes sense to me is that the COM object is the same bit-ness as the class ASP and a different bit-ness than the script engine. I do not know, but I would guess that the classic ASP is 32-bit and your COM object is 32-bit.

要检查它是否为位(在32位和64位之间不匹配),请转到命令行并输入

To check if it is bit-ness (mismatch between 32 and 64 bit), go to the command line and type


cscript myscript.vbs

其中,myscript.vbs是vbscript文件的名称/路径。然后,在命令行中输入

where myscript.vbs is the name/path of your vbscript file. Then, from the command line, type


C:\Windows\SysWOW64\cscript myscript.vbs

cscript 的版本(或 wscript )从标准命令提示符运行的是64位。从 \Windows\SysWOW64 目录运行的是32位版本。

The version of cscript (or wscript) that runs from a standard command prompt is 64-bit. The one that runs from the \Windows\SysWOW64 directory is the 32-bit version.

您可以还要查看对象的注册。
您可以在 HKEY_CLASSES_ROOT 下的注册表中查看ProgID,然后找到 CLSID

You can also look at your object's registration. You can look at the ProgID in the registry under HKEY_CLASSES_ROOT and find the CLSID.

该对象的64位配置单元位于 HKEY_CLASSES_ROOT\CLSID\Your-prog-id

The 64-bit hive for the object will be under HKEY_CLASSES_ROOT\CLSID\Your-prog-id.

该对象的32位配置单元位于 HKEY_CLASSES_ROOT\Wow6432Node\CLSID\Your-prog-id

The 32-bit hive for the object will be under HKEY_CLASSES_ROOT\Wow6432Node\CLSID\Your-prog-id.

这篇关于activex无法通过vbs创建对象,但可以通过经典asp创建对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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