04-12-2014 06:54 AM
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.
04-12-2014 08:29 AM
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
04-14-2014 02:30 AM
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
04-14-2014 07:02 AM
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.