Set oFSO=CreateObject("Scripting.FileSystemObject")
Set colDrives=oFSO.Drives
For Each oDrive in oDrivesCol
MsgBox "Driver letter "& oDrive.DriveLetter
Next
执行的话会报For Each oDrive in oDrivesCol这一行出错,不是个对象集合
但是我看参考资料上就是这样写的。我在VBS脚本编辑器里输这段代码oDrive.DriveLetter这里怎么都点不出来,不知道为什么,如果要让上面这段代码运行起来要怎么改,有人知道么,谢谢
Set oFSO=CreateObject("Scripting.FileSystemObject")
Set colDrives=oFSO.Drives
For Each oDrive in oDrivesCol
MsgBox "Driver letter "& oDrive.DriveLetter
Next
执行的话 ...
楼上的“oDrivesCol”是什么呢,写错了吧,我想应该是For Each oDrive in colDrives