FileSystemObject: works on some machines, others not 
Author Message
 FileSystemObject: works on some machines, others not

Hi there,

I have a little HTML page with a VBScript and try to find out, if the
FileSystem  Object is
working. On some machines, NT, 95, 98, ME the script is working fine, on
others, I get a message like

ActiveX component can not create an object: Scripting.FileSystemObject.

What am I doing wrong / how should I access the object?

Have a nice day
Bernd

<html>
<head>
<script language = vbscript>
Sub Btn_btn1_onclick()
 call testIt
End Sub

Sub testIt()
    Dim Temp

    Dim fso, d, s
    MsgBox "Hallo Welt " & VbCrLf & "Der erste Test! " & VbCrLf & "Jetzt
wird es gleich interessant!"

    drvPath = "c:\"
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set d = fso.GetDrive(fso.GetDriveName(drvPath))
    s = "Drive " & UCase(drvPath) & " - "
    s = s & d.VolumeName  & vbCrLf
    s = s & "Free Space: " & FormatNumber(d.FreeSpace/1024, 0)
    s = s & " Kbytes"
    MsgBox s

End Sub
</script>
<title> Test  </title>
</head>
<body>
<input type=button name = Btn_btn1 value="Dann versuchen wir es mal!">
</body>
</html>



Mon, 17 Nov 2003 23:49:53 GMT  
 FileSystemObject: works on some machines, others not
The machines will need Windows Scripting Host, which includes the
FileSystemObject.  They can get it at msdn.microsoft.com/scripting



Quote:
> Hi there,

> I have a little HTML page with a VBScript and try to find out, if the
> FileSystem  Object is
> working. On some machines, NT, 95, 98, ME the script is working fine, on
> others, I get a message like

> ActiveX component can not create an object: Scripting.FileSystemObject.

> What am I doing wrong / how should I access the object?

> Have a nice day
> Bernd

> <html>
> <head>
> <script language = vbscript>
> Sub Btn_btn1_onclick()
>  call testIt
> End Sub

> Sub testIt()
>     Dim Temp

>     Dim fso, d, s
>     MsgBox "Hallo Welt " & VbCrLf & "Der erste Test! " & VbCrLf & "Jetzt
> wird es gleich interessant!"

>     drvPath = "c:\"
>     Set fso = CreateObject("Scripting.FileSystemObject")
>     Set d = fso.GetDrive(fso.GetDriveName(drvPath))
>     s = "Drive " & UCase(drvPath) & " - "
>     s = s & d.VolumeName  & vbCrLf
>     s = s & "Free Space: " & FormatNumber(d.FreeSpace/1024, 0)
>     s = s & " Kbytes"
>     MsgBox s

> End Sub
> </script>
> <title> Test  </title>
> </head>
> <body>
> <input type=button name = Btn_btn1 value="Dann versuchen wir es mal!">
> </body>
> </html>



Tue, 18 Nov 2003 00:46:31 GMT  
 FileSystemObject: works on some machines, others not
That is not a good news - because some of the machines are so called
CampusMachines, which have a selected set of software - no other can be
added -

however I have an Idea: it should be possible to create a WORD object in an
HTML page with VBScript - I could open and save files on a client machine
then - or am I thinking in a wrong way?

Thanks
Bernd



Tue, 18 Nov 2003 02:19:08 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. FileSystemObject: works on some machines, others not

2. Procedure working on some machines and not others

3. DBGrid Delete Key function not working on some DBGrids while it works on others

4. Error 3071...Why on one machine and not on others

5. Excel file opened in IE3 - on one machine starts Excel, others does not

6. !!Works on Some, not on Others!!

7. Works on my PC, but not others????

8. Everything works in DEVELOPMENT PC and not others

9. Data Control Refresh works sometimes, others Not?!

10. Everything works in DEVELOPMENT PC and not others

11. SQL statement works sometimes but not others

12. FileExists of Scripting.FileSystemObject not working

 

 
Powered by phpBB® Forum Software