开发者

Registering COM Objects in Windows 7 (64 bit)

开发者 https://www.devze.com 2023-02-05 07:20 出处:网络
I seem to be running into a problem when I run a VBScript when it creates a COM object, but only on Windows 7.

I seem to be running into a problem when I run a VBScript when it creates a COM object, but only on Windows 7.

When you run the VBA Script you get:

Script: C:\Program Files\...
Line: 2
Char: 1
Error: ActiveX Component can't create object: 'my object'
Code: 800A01AD
Source: Microsoft VBScript r开发者_开发问答untime error

I have used the command prompt (Admin) to register the dll with regsvr32, but when that runs I get another error:

The module "my dll" was loaded but the entry-point DLLRegisterServer was not found.
Make sure that "my dll" is a valid DLL or OCX file and then try again

I am currently running Windows 7 64 Bit. The script runs on Windows XP computers, but I do not know about Windows Vista computers (there are none to test on). I used OLE-COM Object Viewer to see if it was registered, but the file wasn't shown.

Is this a problem with Windows 7, or 64 bit machines, or a combination of both.


try registering your component with %windir%\syswow64\regsvr32 and running your vbs file with %windir%\syswow64\cscript.exe

your COM component is probably 32bit, so you need to use the 32bit tools on 64bit windows to get it to work.

thanks, mark

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号