Error: ActiveX component cannot create Scripting.FileSystemObject

I have a simple vbs file on my c: drive with the following contents:

Set objShell = CreateObject("Scripting.FileSystemObject") 

When I try to start it, I get an error message

c: \ fso.vbs (1, 1) Microsoft VBScript Runtime Error: ActiveX component cannot create object: 'Scripting.FileSystemObject'

I tried to log in as admin and execute wscript -regserver , but did not help.

Can anybody help me?

+6
vbscript activex filesystemobject
source share
3 answers

Assuming you are logged in as an administrator, look in the Scripting.FileSystemObject registry under HKCR in the registry.

If you cannot find this PROGID, you are missing the necessary files or the component is disabled (not registered).

Scripting.FileSystemObject is implemented in scrrun.dll.

+11
source share

If re-registering scrrun.dll does not fix it, you may need to re-register many other dependencies. The easiest way to do this is MS Fixit 50123: http://go.microsoft.com/?linkid=9666880 Run this, then try calling FSO again. This is the only thing that worked for me on several client computers that had different fake AV programs and register cleaners.

0
source share

In my case, the ProgId attribute for the COM component class was mistakenly written: [ProgId("XXX")]

0
source share

All Articles