Get CD/DVD Drive capabilities using WMI
Here I am presenting Article
on how to get CD drive capabilities like whether it is providing Writing / Reading etc
capabilities or not like you have seen the Nero Burning providing such information same from the WMI.
To get such information we need
to Query management classes through sql like query for getting such information.
To work with WMI in windows form
first of all we need to reference System.Management
Library so add reference to it by
Project Menu>>Add reference in visual Studio project.
now we need to know in which
class the CD Drive information is there so
information about CD Drive is provided by
Win32_CDROMDrive
Class of WMI so we need to query
that class to get desired information.
I have setup a GUI Interface like taken One List Box one combo box to Show Drive that user can select and one button like below

private void Form1_Load(object
sender, EventArgs e) { ManagementObjectSearcher mos = new ManagementObjectSearcher("SELECT * FROM Win32_CDROMDrive"); foreach (ManagementObject
mo in mos.Get()) { comboBox1.Items.Add(mo["Caption"].ToString()); } } private void btnGetCapability_Click(object
sender, EventArgs e) { ManagementObjectSearcher
mos; mos = new ManagementObjectSearcher("Select
* from Win32_CDROMDrive where Caption='" +
comboBox1.SelectedItem.ToString() + "'"); foreach (ManagementObject mo in
mos.Get()) {
string[] x = (string[])mo["CapabilityDescriptions"];
foreach(string
s in x)

Join the conversation! Your thoughts help the community grow.