title: How to add a drive letter to a Combo Box based on a Device ID string of SCSI
body: <p>Based on my query <a href="https://stackoverflow.com/questions/28718074/how-to-find-the-true-cd-rom-drive-letter-when-a-virtual-drive-is-also-installed?noredirect=1#comment45723281_28718074">How to find the true CD-Rom drive letter when a virtual drive is also installed?</a></p>
  
  <p>And the suggestion I got from here <a href="https://stackoverflow.com/questions/8525636/how-to-identify-if-a-drive-is-virtual-or-physical">How to identify if a drive is virtual or physical</a></p>
  
  <p>I'd like to just fill a Combo Box of virtual drive letters when the DeviceID string contains SCSI, I've tested both my virtual drives and they do have SCSI listed against them.</p>
  
  <p>The first 4 characters in the answer from the example in the suggested link</p>
  
  <pre><code>string driveLetter = "G";
          ManagementObjectSearcher diskQuery = new ManagementObjectSearcher(String.Format("SELECT * FROM Win32_CDROMDrive WHERE Drive='{0}:'", driveLetter));
          ManagementObject diskResult = diskQuery.Get().OfType&lt;ManagementObject&gt;().SingleOrDefault();
          string deviceID = null;
          if (diskResult != null)
              deviceID = (string)diskResult["DeviceID"];
          MessageBox.Show(deviceID);
  </code></pre>
  
  <p>Show SCSI, so I thought I could do something like this </p>
  
  <pre><code>ManagementObjectSearcher diskQuery = new ManagementObjectSearcher(String.Format("select * from Win32_CDROMDrive Where DeviceID Like '%SCSI%'"));
          ManagementObject diskResult = diskQuery.Get().OfType&lt;ManagementObject&gt;().SingleOrDefault();
          string deviceID = null;
          if (diskResult != null)
              deviceID = (string)diskResult["DeviceID"];
          MessageBox.Show(deviceID);  
  </code></pre>
  
  <p>However it doesn't work, I just get an Invalid Operation Exception.</p>
  
  <p>What I'm trying to do is this</p>
  
  <pre><code>ComboBox cbVirtual = new ComboBox();
      var vdrives = DriveInfo.GetDrives();
      foreach (var drive in vdrives)
          if (drive.DriveType == DriveType.CDRom)
          {
              If the deviceID string contains SCSI
              {
                  Fill the Combo box with the drive letter/s
              }
          }
  </code></pre>
  
  <p>Appreciate some help - cheers.</p>