views:

3210

answers:

5

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 find figure out what is going on?

I have now tried to register the dll using "regsvr32.exe /i bob.dll" as suggested.

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 32 bit XP.

A: 

A quickie... Are you sure you have the correct progid?

Chris Farmer
+3  A: 

The app is trying to create a COM Object and even if that COM DLL exists, it may depend on another DLL which isn't installed. You can use DependencyWalker to find out if this is the case.

MrTelly
A: 

It really looks as though the object your referencing is not registered on the system. I know you said it's installed, but that doesn't necessarily mean its registered. To confirm this search for the progID that you used in your registry. Example for this code: set objFSO = CreateObject("Scripting.FileSystemObject") I would search for "Scripting.FileSystemObject" in the registry. I then look at registry key above itfor the found value for "InProcServer32" value. This will give you the path to the ActiveX file that it was registered from. For "Scripting.FileSystemObject" the file is "c:\windows\system32\scrrun.dll") If you can't find that your progID in the registry, then it's not registered on your system which is your problem. If it's not registered you need to find out what file registers it, which is usually an .ocx or an .dll in the same folder path of your third party app, and then register these file(s). Here is the command to register a file: regsvr32 /i "c:\windows\system32\scrrun.dll"

Even if you find the progID value in the registry and it references a file that is present on your system, you may still want to try re-registering the file. I have found that sometimes the registration got broken somehow somewhere and it was easier to re-register the files then it was to fix the issue.

mrTomahawk
+4  A: 

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.

Thanks for all your help.

GordyII
Thank you for this one!
Jeroen Landheer
Nice save! I was banging my head on this one for the last 20 minutes. I'm somewhat frustrated by the lack of helpful error messages from the 32 bit interpreter.
Eric
A: 

I know this is an old question and already has an answer marked as correct but that didn't help me.

For any poor souls coming this way in future, check your browser settings-

For me, using IE, the fix was to go into Tools/Internet Options, Security tab, for the relevant zone, "custom level" and check the ActiveX settings. Setting "Initialize and script ActiveX controls not marked as safe for scripting" to "Enable" fixed this problem for me

DannykPowell

related questions