Question USB HID Driver problem?

tim8w

Well-known member
Joined
Sep 8, 2020
Messages
129
Programming Experience
10+
I built a program in VS 2012 (Windows 10 64-bit machine) that detects and reads data from a USB RFID Badge scanner. It worked without installing any additional USB drivers other than what comes with Windows 10. The problem is that it only works on Windows 10 64-bit machines. If I compile and install it on Windows 7 32 or 64-bit machines, it looks like Windows 7 cannot find the correct USB driver to install. Is there some build settings or some other way to get it to work on Windows 7?
 
The driver needs to be there. Unless you are going to install that driver as part of your own application installation, you need to just rely on the user to install the appropriate driver separately.
 
Unclear how this is a C# question. Even is the program was written using VS2012, the program could have been written in F#, VB.NET, C++, or C++/CLI. C# doesn't have any device drivers. Device drivers are in the realm of the OS, not the programming language.
 
The driver needs to be there. Unless you are going to install that driver as part of your own application installation, you need to just rely on the user to install the appropriate driver separately.
For Windows 10,, I installed no drivers. It's just the standard Windows USB driver.
 
It maybe the standard Windows USB HID driver, but is the device PnP ID registered on Windows 7 to use the Windows USB HID driver? With a lot of hand waving, basically what happens with PnP is that when a device is plugged in, the device offers up a device ID. Windows then goes and looks through its set of drivers looking for a match. If an ID match isn't found, that means that as far as Windows is concerned it doesn't have a driver. A user can manually intervene and force Windows to use a particular existing driver for a device, but that is at the user's discretion.
 
It maybe the standard Windows USB HID driver, but is the device PnP ID registered on Windows 7 to use the Windows USB HID driver? With a lot of hand waving, basically what happens with PnP is that when a device is plugged in, the device offers up a device ID. Windows then goes and looks through its set of drivers looking for a match. If an ID match isn't found, that means that as far as Windows is concerned it doesn't have a driver. A user can manually intervene and force Windows to use a particular existing driver for a device, but that is at the user's discretion.
Sky,
Sorry for putting the question in the wrong section.

I am doing the installations, myself how do I select which driver to install. On my Win7 64-bit laptop, the OS does not go and look for the driver and does not add another USB Input Device in the Device Manager. On the Win7 32-bit PCs it did ask for a driver and no Microsoft Standard ones were located. What options do I have to get this to work on Windows 7?
 
In general, if you can get in touch with the manufacturer's tech support they can help you out. They may have a download page for their drivers if you are lucky. If you are unlucky and they only released their drivers on disk, you'll have to look around on eBay. You'll be mostly dead in the water if there is not a node added to Device Manager for you to be able to force a driver for the device to use, though.

You do know that Windows 7 is now just shy of 2 years past its end-of-life, right? (Jan 14, 2020)
 
In general, if you can get in touch with the manufacturer's tech support they can help you out. They may have a download page for their drivers if you are lucky. If you are unlucky and they only released their drivers on disk, you'll have to look around on eBay. You'll be mostly dead in the water if there is not a node added to Device Manager for you to be able to force a driver for the device to use, though.

You do know that Windows 7 is now just shy of 2 years past its end-of-life, right? (Jan 14, 2020)
Sky,
Unfortunately the Badge Scanner company doesn't have a driver. They didn't write one. Their sample only works with the default driver in Win10 64-bit as well. As for Win7, Win2K, Win98, DOS PCs still running in industry, unfortunately my company, at least, has way too many of them still in use due to legacy apps.

I guess it looks like my only option is for the company to add more Win10 PCs to run my program.
 
If you can find the hardware id for the device, you can then look at which .INF file in Windows 10 is used to map a driver for it. From there, you can start handcrafting an .INF file for Windows 7. Then you need to somehow get that .INF file installed on the Win7 machines so that when you plug in the device it will have a driver to map to.
 
If you can find the hardware id for the device, you can then look at which .INF file in Windows 10 is used to map a driver for it. From there, you can start handcrafting an .INF file for Windows 7. Then you need to somehow get that .INF file installed on the Win7 machines so that when you plug in the device it will have a driver to map to.
I know the VendorID and ProductID. I assume that the Hardware ID is different than those?
 
I think that the Hardware ID is generated from combining the vendor and product IDs, but it's been years ago for me when I last dealt with that. You'll need to read the Windows Device Driver Development Kit documentation.

See how far away we have strayed from C#? :)
 
I think that the Hardware ID is generated from combining the vendor and product IDs, but it's been years ago for me when I last dealt with that. You'll need to read the Windows Device Driver Development Kit documentation.

See how far away we have strayed from C#? :)
Thanks for the help.

Sorry, I already apologized for posting in the wrong section...
 
Back
Top Bottom