ActiveX component can't create object

前端 未结 12 1187
傲寒
傲寒 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.

    0 讨论(0)
  • 2020-12-01 01:57

    I know this is an old thread, but has anyone checked if their Antivirus is blocking Win32API and Scripting on their systems? I have CylanceProtect installed on my office system and i found the same issues occurring as listed by others. This can be confirmed if you check the Windows Logs in Event Viewer.

    0 讨论(0)
  • 2020-12-01 01:58

    Also when you register the component make sure you use the 32-bit version of regsvr32.exe. If you simply run regsvr32.exe in a elevated prompt, it will default take the standard 64-bit version (which oddly enough is located in C:\Windows\System32)

    The version I believe you need is located in C:\Windows\SysWow64\regsvr32.exe

    0 讨论(0)
  • 2020-12-01 01:58

    I've had the same issue in a VB6 program I'm writing, where a Form uses a ScriptControl object to run VBScripts selected by the User.

    It worked fine until the other day, when it suddenly started displaying 'Runtime error 429' when the VBScript attempted to create a Scripting.FileSystemObject.

    After going mad for an entire day, trying all the solutions proposed here, I began suspecting the problem was in my application.

    Fortunately, I had a backup version of that form: I compared their codes, and discovered that inadvertently I had set UseSafeSubset property of my ScriptControl object to True.

    It was the only difference in the form, and after restoring the backup copy it worked like a charm.

    Hope this can be useful to someone. Up with VB6! :-)

    Max - Italy

    0 讨论(0)
  • 2020-12-01 02:00

    It's also worth checking that you've got "Enable 32-bit Applications" set to True in the advanced settings of the DefaultAppPool within IIS.

    0 讨论(0)
  • 2020-12-01 02:02

    I also meet the same error in vbscript.

    Set objFSO = CreateObject("Scripting.FileSystemObject")
    

    Solution:
    Open command line, run :

    regsvr32 /i "c:\windows\system32\scrrun.dll"
    

    and it works

    0 讨论(0)
提交回复
热议问题