#INCLUDE "windows.inc"
#INCLUDE "scrrun.inc"
DIM fso AS IFileSystem
DIM pDrives AS IDriveCollection
DIM nDrives AS LONG
' Create an instance of the FileSystemObject
fso = NEWCOM "Scripting.FileSystemObject"
' Get a reference to the IDrives collection
pDrives = fso.GetDrives
' Get the number of drives
nDrives = pDrives.Count