All pastes #92961 Raw Edit

Miscellany

public text v1 · immutable
#92961 ·published 2006-07-20 02:06 UTC
rendered paste body
Pointer = "F:\"
Wscript.Echo CheckReady

Function CheckReady()
On Error Resume Next
Set fso = CreateObject("Scripting.FileSystemObject")
Set dr = fso.GetDrive(Pointer)
If fso.DriveExists(pointer) Then
If dr.isReady then
cr = "Drive is Ready." // i want to run a batch file here
Else
cr = "Drive is not Ready."
End If
Else
cr = "Drive " & Pointer & " is not mapped"
End If
CheckReady = cr
End Function