DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Error in File name or class name not found during Automation operation: 'CreateObject'

Hello Team,

 

When I am trying to execute the below code i am getting the following error. Any help would be greatly appreciated.

 

Set oFSO = CreateObject("Scripting.FileSystemObject")
If Not oFSO.FolderExists(SavePath) Then
Set f = oFSO.CreateFolder(SavePath)
Else
End If

 

53 4/11/2014 12:27:22 PM Error:


Error in <NoName(4).VBS> (Line: 9, Column: 1):
File name or class name not found during Automation operation: 'CreateObject'

 

I have googled through the error and tried to re-register the scrrun.dll using regsvr32 eventhogh it is successfully registered, i am getting the following error. My PC is windows 7 32bit OS.

 

any help is greatly appreciated.

0 Kudos
Message 1 of 4
(7,605 Views)

 

The following script class will write a log file entry. See if it will run for you.

The script is using a class object that you might not have seen before. A little intro:  The top section is just for testing the class. Normally I just comment this out after the class is working well.  It should run right way. I would save the vbs file in the editor, That way when you are using autoactpath or currentscriptpath variables they will be able resolve the paths.

 

 

Paul

 

 

0 Kudos
Message 2 of 4
(7,599 Views)

Hello ,

 

It is the same error and the debug point is near set FSO

Set fso = CreateObject("Scripting.FileSystemObject")

 

Attached the screen shot.

 

Please help me resolve this issue.

Regards,

Raj

0 Kudos
Message 3 of 4
(7,581 Views)

This problem has been solved. As the scrrun.dll is corrupted though it is saying successfully registered with regsvr32. As this the scripting object from windows operation system provided default. Re- installing windows scripting runtime Provided from the Microsoft Visual studio 6.0 setup and re-registering the dlls solved this issue. Thanks.

0 Kudos
Message 4 of 4
(7,571 Views)