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);
}
}
Is this a standard catch all driver.
Glenn
Glenn PattonPosted Jun 27, 2012, 11:24 AM
VulpesPosted Jun 27, 2012, 11:19 AM
1. Run your code on a machine which doesn't have the USB to COM port driver installed.
2. Now install the driver on the machine and run your code again.
By comparing the two lists, you should be able to discover the correct name.