Problem: CreateObject ("scripting.FileSystemObject") under WSH 
Author Message
 Problem: CreateObject ("scripting.FileSystemObject") under WSH

I have a minimal vb script:

'---------------------------------------------------------------------------
-------------------
Dim fso
Dim  d
      set fso  = CreateObject("Scripting.FileSystemObject")

      for each d in fso.Drives
            wscript.echo d.DriveLetter
      next

     set fso = nothing
'---------------------------------------------------------------------------
-------------------

Running both under CSCRIPT and WSCRIPT the script executes properly, i.e.,
the drives' letters are echo'ed. But the script does not terminate
gracefully,
instead it crashed with  'Application Error' Dialog which says that 'memory
cannot be read'.

Minimizing the script to:
'---------------------------------------------------------------------------
-------------------
Dim fso
Dim  d

     set fso  = CreateObject("Scripting.FileSystemObject")
     set fso = nothing

'---------------------------------------------------------------------------
-------------------

does not help either.

WSH version is 5.0
VBScript version is latest from Microsoft Site. i.e., 3.1

Any clues?

TIA,
Yael.



Thu, 01 Feb 2001 03:00:00 GMT  
 Problem: CreateObject ("scripting.FileSystemObject") under WSH

Quote:
>WSH version is 5.0
>VBscript version is latest from Microsoft Site. i.e., 3.1

The WSH version has to be a version 1.0. (No other versions have been
released) Because of your statement I am assuming that perhaps you have
installed Version 5.0 of the scripting engines and then installed version
3.1 on top of it??. Try reinstalling Version 5.0 of the scripting engines.

 I had a similar problem and was forced to reinstall the vbscript runtimes.
After a period of time I had a reoccurrence of the problem where a reinstall
did not fix it. I wound up rebuilding the OS (Reinstalling) on my laptop. I
couldn't figure out what the problem was. After installing Visual Interdev
6.0 WSH 5.0 broke beyond repair.

If you are new to scripting you might want to take a look at my site. over
60 admin scripts, lots of downloads, reference material and technical
support via an online discussion forum. Check it out.
http://sams.prohosting.com/cwashington

Quote:

>I have a minimal vb script:

>'--------------------------------------------------------------------------
-
>-------------------
>Dim fso
>Dim  d
>      set fso  = CreateObject("Scripting.FileSystemObject")

>      for each d in fso.Drives
>            wscript.echo d.DriveLetter
>      next

>     set fso = nothing
>'--------------------------------------------------------------------------
-
>-------------------

>Running both under CSCRIPT and WSCRIPT the script executes properly, i.e.,
>the drives' letters are echo'ed. But the script does not terminate
>gracefully,
>instead it crashed with  'Application Error' Dialog which says that 'memory
>cannot be read'.

>Minimizing the script to:
>'--------------------------------------------------------------------------
-
>-------------------
>Dim fso
>Dim  d

>     set fso  = CreateObject("Scripting.FileSystemObject")
>     set fso = nothing

>'--------------------------------------------------------------------------
-
>-------------------

>does not help either.

>WSH version is 5.0
>VBscript version is latest from Microsoft Site. i.e., 3.1

>Any clues?

>TIA,
>Yael.



Thu, 01 Feb 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problem: CreateObject ("scripting.FileSystemObject") under WSH

2. Problem with CreateObject("Scripting.FileSystemObject")

3. Set filesys = CreateObject("Scripting.FileSystemObject")

4. CreateObject("Scripting.FileSystemObject") Error

5. ** ? concerning CreateObject("Scripting.FileSystemObject")

6. Set fs = CreateObject("Scripting.FileSystemObject")-error

7. CreateObject("Scripting.FileSystemObject") Error

8. ** ? concerning CreateObject("Scripting.FileSystemObject")

9. Set fso = Server.CreateObject("Scripting.FileSystemObject")

10. Trouble with CreateObject("Scripting.FileSystemObject")

11. Server.CreateObject("Scripting.FileSystemObject")

12. Set filesys = CreateObject("Scripting.FileSystemObject")

 

 
Powered by phpBB® Forum Software