2
Reply

Checking for a USB to Com port driver using C#

Glenn Patton

Glenn Patton

Jun 27 2012 10:48 AM
2k
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)