G
Guest
When I run the script below I get a "Disk not ready"
What am I doing wrong?
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set colDrives = objFSO.Drives
For Each objDrive in colDrives
Wscript.Echo "Total size: " & objDrive.TotalSize
Next
C:\>cscript hd.vbs
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
C:\hd.vbs(6, 2) Microsoft VBScript runtime error: Disk not ready
What am I doing wrong?
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set colDrives = objFSO.Drives
For Each objDrive in colDrives
Wscript.Echo "Total size: " & objDrive.TotalSize
Next
C:\>cscript hd.vbs
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
C:\hd.vbs(6, 2) Microsoft VBScript runtime error: Disk not ready