Search code examples
dllvbscriptactivexwindows-server-2008dllregistration

ActiveX component can't create object


I have just installed a third party app on my Windows Server 2008 server and I get the

ActiveX Component can't create object

message when I try to access using a CreateObject in VBScript.

It is definitely installed and exists under "Programs and Features". Does anyone have a list of things that I can check to figure out what is going on?

I have now tried to register the DLL using regsvr32.exe /i bob.dll as suggested but I get this error:

The Module "Bob.dll" was loaded but the entry-point DllRegisterServer was not found.

Make sure that "Bob.dll" is valid DLL or OCX file and then try again.

I should note that this is a 32-bit application on a 64-bit machine at this point. It also works fine on my machine which is Windows XP 32-bit.


Solution

  • It turns out to get this application working under VBScript, I had to do two things.

    1. Run RegAsm.exe to register the DLLs.
    2. Run the C:\Windows\SysWOW64\cscript.exe to run my VBScript.

    If these don't work, check out the other answer here about enabling 32-bit applications in IIS.