Jump to content

how to determine if machine has cdr ?


Recommended Posts

I have many different models of CPQ/HP laptops of which some have burners and some don't. I have an unattended XP install that also installs all required apps. Roxio comes with the newer laptops that have a CDR/DVD. I was wondering if there was a way to determine if a machine had a CDR/DVD type device so I could determine if the machine needed Roxio. I would just install Roxio on all laptops but only the ones with CDR are licensed for it.

Maybe a VBS using WMI or some commandline exe....

Thanks,

Mike Niccum :)

Link to comment
Share on other sites


I saw a post awhile back about determining Video card or some drivers or something. It might pertain to this, as XP will notice if it's a CDR/DVD drive (the different Icons) and it should save it somewhere. That would be my best guess.

I think GreenMachine posted a link to somewhere. I know a few others did too.

Link to comment
Share on other sites

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CD Burning

That should tell you something. Alternativly, CDRECORD (perhaps called CDR Tools now?) can be used. It involves a reasonable knowledge of command scripting.

Link to comment
Share on other sites

if you use WMI and enum all the CD drives, most burners have a CD-R/RW or something similar in the model string

basically look in device manager and open the dvd\CD-rom drives container. most burners will have some type of CDR text description.

or

look in HKLM\HARDWARE\DEVICEMAP\Scsi\Scsi Port 0\Scsi Bus 0\Target Id 0\Logical Unit Id 0

and look at the Identifier value

each of the 0's above will need to be changed to 1 alternately to walk the device connections

Link to comment
Share on other sites

  • 3 months later...

I wrote this script which works quite well to enumerate WMI class properties which when used with Win32_CDROMDrive I was able to determine if it was a burner.

strComputer = "."
strWMIClass = "Win32_CDROMDrive"

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from " & strWMIClass,,48)

For Each objInstance In colItems
  For Each objProperty In objInstance.Properties_
     If IsArray(objProperty) Then
        For iCount = 0 To UBound(objProperty)
           MsgBox objProperty.Name & vbTab & objProperty.Value(iCount)
        Next
     ElseIf IsNull(objProperty) Then
        MsgBox objProperty.Name
     Else
        MsgBox objProperty.Name & vbTab & objProperty.Value
     End If
  Next
Next

'http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/wmi_classes.asp

Thanks for all the recommendations :thumbup ,

Mike N

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...