All pastes #92844 Raw Edit

sub

public text v1 · immutable
#92844 ·published 2006-07-19 23:44 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