My problem is someone has left a disk in a cd rom drive
I would like to know if there is a way to gather the information in
the my computer
Most c: drives are name local disk but if there is a cd rom in the cd
rom drive the drive name will change to reflect this. I would like to
find be able to scan a computer and gather all the drives available on
that computer. We have no mapped drives so that won't be a problem

thanks,
Rogue

Re: cd rom name by Ayush

Ayush
Wed May 16 14:51:33 CDT 2007

[RogueIT]s message :
> My problem is someone has left a disk in a cd rom drive
> I would like to know if there is a way to gather the information in
> the my computer
> Most c: drives are name local disk but if there is a cd rom in the cd
> rom drive the drive name will change to reflect this. I would like to
> find be able to scan a computer and gather all the drives available on
> that computer. We have no mapped drives so that won't be a problem

> thanks,
> Rogue


Set wmi = GetObject("winmgmts:\\.\root\cimv2")
Set cddrives = wmi.ExecQuery("Select * from Win32_CDROMDrive Where MediaLoaded=True",,48)

For Each cddrive in cddrives
x="Caption: " & cddrive.Caption & vbCrLf
x=x & "Description: " & cddrive.Description & vbCrLf
x=x & "Drive: " & cddrive.Drive & vbCrLf
x=x & "FileSystemFlags: " & cddrive.FileSystemFlags & vbCrLf
x=x & "Manufacturer: " & cddrive.Manufacturer & vbCrLf
x=x & "MaxMediaSize: " & cddrive.MaxMediaSize & vbCrLf
x=x & "MediaType: " & cddrive.MediaType & vbCrLf
x=x & "Name: " & cddrive.Name & vbCrLf
x=x & "Size: " & cddrive.Size & vbCrLf
x=x & "Status: " & cddrive.Status & vbCrLf
x=x & "StatusInfo: " & cddrive.StatusInfo & vbCrLf
x=x & "VolumeName: " & cddrive.VolumeName
WScript.Echo x
Next

Good Luck, Ayush.
--
Script Center-Script Repository : http://snipurl.com/Script_Repository