3

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 runtime 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.

1
  • 1
    Try the 32-bit versions of regsvr32.exe and cscript.exe in c:\windows\syswow64. Jan 17, 2011 at 18:35

1 Answer 1

3

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

1
  • 2
    REGSVR32.EXE actually spots the bit-ness of the DLL and registers it correctly. You're correct about needing to run the correct CSCRIPT.EXE, though. Jan 17, 2011 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.