主题:vbscript运行时错误,activeX不能创建文件系统对象
Dim fso, d, s
Function ShowFreeSpace(drvPath)
Set fso = CreateObject("Scripting.FileSystemObject")
Set d = fso.GetDrive(fso.GetDriveName(drvPath))
s = "Drive " & UCase(drvPath) & " - "
s = s & d.VolumeName & "<BR>"
s = s & "Free Space: " & FormatNumber(d.FreeSpace/1024, 0)
s = s & " Kbytes"
ShowFreeSpace = s
End Function
MsgBox ShowFreeSpace("c:")
MsgBox ShowFreeSpace("d:")
MsgBox ShowFreeSpace("e:")
MsgBox ShowFreeSpace("f:")
Set fso=Nothing
Set d=Nothing
MsgBox "查寻完毕"
此脚本产生运行时错误,activeX不能创建文件系统对象..请高手解疑..
Function ShowFreeSpace(drvPath)
Set fso = CreateObject("Scripting.FileSystemObject")
Set d = fso.GetDrive(fso.GetDriveName(drvPath))
s = "Drive " & UCase(drvPath) & " - "
s = s & d.VolumeName & "<BR>"
s = s & "Free Space: " & FormatNumber(d.FreeSpace/1024, 0)
s = s & " Kbytes"
ShowFreeSpace = s
End Function
MsgBox ShowFreeSpace("c:")
MsgBox ShowFreeSpace("d:")
MsgBox ShowFreeSpace("e:")
MsgBox ShowFreeSpace("f:")
Set fso=Nothing
Set d=Nothing
MsgBox "查寻完毕"
此脚本产生运行时错误,activeX不能创建文件系统对象..请高手解疑..