Monday, December 17, 2007

How detect your CD-ROM drive letter

How detect your CD-ROM drive letter

S T E P - 1

- We need to use the FileSystemObject object to get the information:

<%

Dim fSys, oDrive

Set fSys = CreateObject("Scripting.FileSystemObject")

%>

S T E P - 2

-In the FileSystemObject, we can find a Drives properties. This properties can return all drive information:

<%

Set oDrive = fSys.Drives

For Each Item in oDrive

If Item.DriveType = 4 Then

Response.write("Your CD-ROM drive is " & Item.DriveLetter)

End If

Next

%>


No comments: