ActiveX component can't create object

前端 未结 12 1298
傲寒
傲寒 2020-12-01 01:42

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

ActiveX Component can\'t create object

m

12条回答
  •  悲&欢浪女
    2020-12-01 01:54

    It really looks as though the object you are referencing is not registered on the system. I know you said it's installed, but that doesn't necessarily mean it's 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. Then I would look at registry key above 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 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 a .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.

提交回复
热议问题