Computer Hope

Software => Computer software => Topic started by: Dusty on October 29, 2010, 07:27:23 PM

Title: Fsutil
Post by: Dusty on October 29, 2010, 07:27:23 PM
Is there a downloadable version of Fsutil which reports a DVD-RW as such rather than as a CD-ROM which mine does?
Title: Re: Fsutil
Post by: Broni on October 29, 2010, 09:57:27 PM
What do you mean by "downloadable version"?
fsutil is included in Windows.
Title: Re: Fsutil
Post by: Dusty on October 30, 2010, 02:36:01 AM
Thanks Broni.  I'm using XP Pro and the command fsutil fsinfo drivetype returns the dvd-rw as a CD-ROM.  I wondered if there is a newer downloadable version which will return the dvd-rw as a DVD-RW instead of a CD-ROM.
Title: Re: Fsutil
Post by: Salmon Trout on October 30, 2010, 05:02:28 AM
Thanks Broni.  I'm using XP Pro and the command fsutil fsinfo drivetype returns the dvd-rw as a CD-ROM.  I wondered if there is a newer downloadable version which will return the dvd-rw as a DVD-RW instead of a CD-ROM.

I believe not. In XP and Windows 7 fsutil reports my DVD-RW as a "CD-ROM". I imagine it just tests for and reports the lowest common denominator of all optical drives. In both OSs in My Computer, Windows Explorer reports "DVD-RW drive".



Title: Re: Fsutil
Post by: Broni on October 30, 2010, 09:21:58 AM
Same here on Vista.
Title: Re: Fsutil
Post by: BC_Programmer on October 30, 2010, 09:30:20 AM
fsutil fsinfo drivetype most likely uses the GetDriveType (http://msdn.microsoft.com/en-us/library/aa364939%28VS.85%29.aspx) API function. This means that all Optical drives will be reported as "CD-ROM", since there is no enumeration for any other type of optical drive.
Title: Re: Fsutil
Post by: Dusty on October 30, 2010, 04:11:27 PM
As I suspected, thanks guys.

Title: Re: Fsutil
Post by: Salmon Trout on October 30, 2010, 05:20:10 PM
WMI...

Code: [Select]
trComputer = "."
Set objWMIService = GetObject( _
    "winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery( _
    "Select * from Win32_CDROMDrive")
For Each objItem in colItems
    Wscript.Echo "Device ID: " & objItem.DeviceID
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "Name: " & objItem.Name
Next

Code: [Select]
C:\Test\>cscript //nologo drivetype.vbs
Device ID: IDE\CDROMOPTIARC_DVD_RW_AD-5240S_________________1.03____\5&422CD0B&0&1.0.0
Description: CD-ROM Drive
Name: Optiarc DVD RW AD-5240S ATA Device

Title: Re: Fsutil
Post by: Salmon Trout on October 31, 2010, 04:07:07 AM
Code: [Select]
strComputer = "."
Set objWMIService = GetObject( _
    "winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery( _
    "Select * from Win32_CDROMDrive")
For Each objItem in colItems
    Wscript.Echo "Media Type " & objItem.MediaType
Next

Code: [Select]
S:\Test\>cscript //nologo CDROM-MediaType.vbs
Media Type DVD Writer

Returns this when tray is empty and with CD-R, CD-RW, DVD+R, DVD+RW media in tray.