2
Answers

Checking for a USB to Com port driver using C#

Glenn Patton

Glenn Patton

12y
2k
1
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)