Page 1 of 1
How to recognize CD|DVD|-Rewriters and Media inside ?
Posted: Wed Nov 15, 2006 3:41 pm
by harff182
moin, moin...
Is there any possibility to find out with PB, whether the optical drive is a CD|CD-Rewriter|DVD|DVD-Rewriter and what kind of medium (CD-R|CD-RW|DVD|DVD-RAM|DVD-+R|DVD+-RW) is inside ?
I'm primarily searching for a solution under WinXP, but it would be nice, if it works on older Windows, too
TIA....
scholly
Posted: Thu Nov 16, 2006 3:00 am
by Sparkie
This looks like it may be a step in the right direction...
http://msdn.microsoft.com/library/defau ... lmedia.asp
Here's some WMI info for you as well...
http://www.purebasic.fr/english/viewtop ... hlight=wmi
I haven't done anything with WMI, but if I get a chance this weekend I'll see what I can come up with... OR wait for a few minutes and netmaestro will most likely stop by with the complete code

Posted: Thu Nov 16, 2006 3:16 am
by netmaestro
Posted: Thu Nov 16, 2006 4:05 am
by Sparkie
Damn...and here I thought you'd get me off the hook and free up my weekend nettie'm.
Hey wait a minute....where's that srod been hiding lately. Ya, that's the ticket, get srod to do it

Posted: Thu Nov 16, 2006 12:37 pm
by srod
Sparkie wrote:Damn...and here I thought you'd get me off the hook and free up my weekend nettie'm.
Hey wait a minute....where's that srod been hiding lately. Ya, that's the ticket, get srod to do it

See netty's answer above!

Beside's I barely have time to post my mail these days!
No, this one's for the bat!
***Jeepers Sparkie, that does look complicated! It's all com stuff!
Posted: Sun Nov 19, 2006 3:13 pm
by harff182
moin, moin...
I've downloaded the SDK, installed the documentation and yes, quite interesting stuff
Well, I don't understand a lot of the code, but I found the DATA-lines to test with Win32_CDROMDrive and Win32_PhysicalMedia.
Unfortunately, only
Win32_CDROMDrive gives some results:
Code: Select all
Data.s "SELECT * FROM Win32_CDROMDrive","Size","ID","Description","Manufacturer","VolumeName","MediaType","Size"
while
Win32_PhysicalMedia, which could give me more interesting data, returns only empty values:(:
Code: Select all
Data.s "Select * FROM Win32_PhysicalMedia", "Name", "Caption", "Description","MediaType","Model"
I also did some tests with
Droopy's Lib 29/05/2006 Version 1.31.2 (PB4) BETA installed, which gave the same results:(:
Code: Select all
MessageRequester("WMI",WMI("SELECT * FROM Win32_PhysicalMedia,Caption ,Name,Description"))
MessageRequester("WMI",WMI("SELECT * FROM Win32_CDROMDrive,ID,Description,Manufacturer,VolumeName,MediaType,Size"))
While I undwerstand, that some parts might not work on the W98-box, I have no idea, why
Win32_PhysicalMedia refuses to work here on XP-SP2.
Any help on the horizon ?
TIA....
scholly
Posted: Mon Nov 20, 2006 12:59 am
by Sparkie
I'm getting the same results as you harff182. I doubt that it's a PB issue, as I don't get any better results from a VBScript file when using Win32_PhysicalMedia

Posted: Mon Nov 20, 2006 11:50 pm
by harff182
Sparkie wrote:I'm getting the same results as you harff182. I doubt that it's a PB issue, as I don't get any better results from a VBScript file when using Win32_PhysicalMedia

So it's not me, being to dull to use it

Seems I have to stick with Win32_CDROMDrive until someone stumbles over this threat and shows us a solution to use _PhysicalMedia, as its MediaTypes are far superior to the ones of _CDROMDrive and _LogicalDisk.
Anyway, even _CDROMDrive helps me to make my Media-Database a little bit more userfriendly and I probably find other interesting stuff in the WMI-docs
Thanks for your help...
scholly
Posted: Tue Nov 21, 2006 3:53 pm
by GeoTrail
When I try this
Code: Select all
MessageRequester("WMI",WMI("SELECT * FROM Win32_PhysicalMedia,Caption,Description,InstallDate,Name,Status,CreationClassName,Manufacturer,Model,SKU,SerialNumber,Tag,Version,PartNumber"))
The only results I get is SerialNumber and TAG, the rest is blank.
Posted: Thu Dec 07, 2006 2:13 pm
by Derek
As a sideline, does anyone know how to get the Enhanced Disc Information off of a DVD.
E.g. put a recorded DVD in your drive and run nero, press ctrl+shift and click on 'I' and you get the enhanced disc info.
What I am interested in is the 'field id' figures because they change depending on disc manufacter, so you could read them in your program and unless the person copying your disc uses the same kind then you will know it is a copy.
I know it's only rudimentary but it is a start.