in reply to How to check to see if a CD drive is a writable on windows?
Try this. I don't have a writable CD on this system to check what the output would be, but it should be something like CD-R or CD-RW etc. for writable media.
>c:\windows\system32\wbem\wmic.exe cdrom get mediatype MediaType CD-ROM
You'll need to look at the options for how to get the information for multiple CD drives.
You can then chose to just extract the results from running the exe, or you could use the Win32::OLE to access WMI scripting interface, my $locator = Win32::OLE->new ('WbemScripting.SWbemLocator');.
See Win32::Process::Info for some example code for doing the latter.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to check to see if a CD drive is a writable on windows?
by swampyankee (Parson) on Oct 04, 2005 at 02:06 UTC |