-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: ChiefCoder
Message 3 in Discussion

If using WMI , you can retrieve the same information by using the following code.    
Set colDisks = GetObject("Winmgmts:").ExecQuery("Select * from Win32_LogicalDisk")
For Each objDisk in colDisks
 
    Select Case objDisk.DriveType
        Case 1
            Wscript.Echo "No root directory. Drive type could not be " _
                & "determined."
        Case 2
            Wscript.Echo "DeviceID= "&  objDisk.DeviceID & "  DriveType = Removable 
drive" 
        Case 3
            Wscript.Echo "DeviceID= "&  objDisk.DeviceID & "  DriveType = Local hard 
disk" 
        Case 4
            Wscript.Echo "DeviceID= "&  objDisk.DeviceID & "  DriveType = Network 
disk" 
        Case 5
            Wscript.Echo "DeviceID= "&  objDisk.DeviceID & "  DriveType = Compact 
disk" 
        Case 6
            Wscript.Echo "DeviceID= "&  objDisk.DeviceID & "  DriveType = RAM disk" 
        Case Else
            Wscript.Echo "Drive type could not be determined."
    End Select
Next
 it's worthwhile to notice that drive type is 5 in WMI, while it's 4 in 
FileSystemObject approach.   S.

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to