Glenn Patton

Glenn Patton

  • NA
  • 308
  • 82.8k

Checking for a USB to Com port driver using C#

Jun 27 2012 10:48 AM
Hi All,
I am writing an application to interface with a device using a USB port, I need to check to see if the driver that allows USB to Com port access is installed and give a message if it is not (or run the installer) I have written a simple test app to show all drivers 

   private void button1_Click(object sender, EventArgs e)
        {

          //  MessageBox.Show("hello!");

            ServiceController[] scDevices = ServiceController.GetDevices();

            MessageBox.Show("Device driver services on the local computer");

            foreach (ServiceController scTemp in scDevices)
            {
                rtbDrivers.Text += ("\n" + scTemp.ServiceType+","+scTemp.ServiceName+","+ scTemp.DisplayName);
            }
        }
     
the   entery in the rtbDrivers that seems most likely is  KernelDriver,Serial,Serial port driver  
Is this a standard catch all driver.
Glenn 


Answers (2)