For certain Universal Serial Bus (USB) devices, such as devices that are accessed by only a single application, you can install WinUSB (Winusb.sys) in the device's kernel-mode stack as the USB device's function driver instead of implementing a driver.
![](/uploads/1/2/7/1/127188523/858122659.jpg)
-->
This topic contains these sections:
Ensure the wireless device is powered on then connect it to a compatible computer using the supplied USB cable. The most recent software version becomes available on the SUA/SRA tool within a week of a new software update. During this time, the SUA/SRA is unavailable for usage. The software update process may take up to 30-90 minutes.
Automatic installation of WinUSB without an INF file
As an OEM or independent hardware vendor (IHV), you can build your device so that the Winusb.sys gets installed automatically on Windows 8 and later versions of the operating system. Such a device is called a WinUSB device and does not require you to write a custom INF file that references in-box Winusb.inf.
When you connect a WinUSB device, the system reads device information and loads Winusb.sys automatically.
For more information, see WinUSB Device.
Installing WinUSB by specifying the system-provided device class
When you connect your device, you might notice that Windows loads Winusb.sys automatically (if the IHV has defined the device as a WinUSB Device). Otherwise follow these instructions to load the driver:
- Plug in your device to the host system.
- Open Device Manager and locate the device.
- Right-click the device and select Update driver software... from the context menu.
- In the wizard, select Browse my computer for driver software.
- Select Let me pick from a list of device drivers on my computer.
- From the list of device classes, select Universal Serial Bus devices.
- The wizard displays WinUsb Device. Select it to load the driver.
If Universal Serial Bus devices does not appear in the list of device classes, then you need to install the driver by using a custom INF.The preceding procedure does not add a device interface GUID for an app (UWP app or Windows desktop app) to access the device. You must add the GUID manually by following this procedure.
-
Load the driver as described in the preceding procedure.
-
Generate a device interface GUID for your device, by using a tool such as guidgen.exe.
-
Find the registry key for the device under this key:HKEY_LOCAL_MACHINESYSTEMCurrentControlSetEnumUSB<VID_vvvv&PID_pppp>
-
Under the Device Parameters key, add a String registry entry named DeviceInterfaceGUID or a Multi-String entry named DeviceInterfaceGUIDs. Set the value to the GUID you generated in step 2.
-
Disconnect the device from the system and reconnect it to the same physical port.Note If you change the physical port then you must repeat steps 1 through 4.
Writing a custom INF for WinUSB installation
As part of the driver package, you provide an .inf file that installs Winusb.sys as the function driver for the USB device.
The following example .inf file shows WinUSB installation for most USB devices with some modifications, such as changing USB_Install in section names to an appropriate DDInstall value. You should also change the version, manufacturer, and model sections as necessary. For example, provide an appropriate manufacture's name, the name of your signed catalog file, the correct device class, and the vendor identifier (VID) and product identifier (PID) for the device.
Also notice that the setup class is set to 'USBDevice'. Vendors can use the 'USBDevice' setup class for devices that do not belong to another class and are not USB host controllers or hubs.
If you are installing WinUSB as the function driver for one of the functions in a USB composite device, you must provide the hardware ID that is associated with the function, in the INF. You can obtain the hardware ID for the function from the properties of the devnode in Device Manager. The hardware ID string format is 'USBVID_vvvv&PID_pppp'.
The following INF installs WinUSB as the OSR USB FX2 board's function driver on a x64-based system.
Starting in Windows 10, version 1709, the Windows Driver Kit provides InfVerif.exe that you can use to test a driver INF file to make sure there are no syntax issues and the INF file is universal. We recommened that you provide a universal INF. For more information, see Using a Universal INF File.
Only include a ClassInstall32 section in a device INF file to install a new custom device setup class. INF files for devices in an installed class, whether a system-supplied device setup class or a custom class, must not include a ClassInstall32 section.
Except for device-specific values and several issues that are noted in the following list, you can use these sections and directives to install WinUSB for any USB device. These list items describe the Includes and Directives in the preceding .inf file.
-
USB_Install: The Include and Needs directives in the USB_Install section are required for installing WinUSB. You should not modify these directives.
-
USB_Install.Services: The Include directive in the USB_Install.Services section includes the system-supplied .inf for WinUSB (WinUSB.inf). This .inf file is installed by the WinUSB co-installer if it isn't already on the target system. The Needs directive specifies the section within WinUSB.inf that contains information required to install Winusb.sys as the device's function driver. You should not modify these directives.Note Because Windows XP doesn't provide WinUSB.inf, the file must either be copied to Windows XP systems by the co-installer, or you should provide a separate decorated section for Windows XP.
-
USB_Install.HW: This section is the key in the .inf file. It specifies the device interface globally unique identifier (GUID) for your device. The AddReg directive sets the specified interface GUID in a standard registry value. When Winusb.sys is loaded as the device's function driver, it reads the registry value DeviceInterfaceGUIDs key and uses the specified GUID to represent the device interface. You should replace the GUID in this example with one that you create specifically for your device. If the protocols for the device change, create a new device interface GUID.Note User-mode software must call SetupDiGetClassDevs to enumerate the registered device interfaces that are associated with one of the device interface classes specified under the DeviceInterfaceGUIDs key. SetupDiGetClassDevs returns the device handle for the device that the user-mode software must then pass to the WinUsb_Initialize routine to obtain a WinUSB handle for the device interface. For more info about these routines, see How to Access a USB Device by Using WinUSB Functions.
The following INF installs WinUSB as the OSR USB FX2 board's function driver on a x64-based system. The example shows INF with WDF coinstallers.
-
USB_Install.CoInstallers: This section, which includes the referenced AddReg and CopyFiles sections, contains data and instructions to install the WinUSB and KMDF co-installers and associate them with the device. Most USB devices can use these sections and directives without modification.
-
The x86-based and x64-based versions of Windows have separate co-installers.Note Each co-installer has free and checked versions. Use the free version to install WinUSB on free builds of Windows, including all retail versions. Use the checked version (with the '_chk' suffix) to install WinUSB on checked builds of Windows.
Each time Winusb.sys loads, it registers a device interface that has the device interface classes that are specified in the registry under the DeviceInterfaceGUIDs key.
Note If you use the redistributable WinUSB package for Windows XP or Windows Server 2003, make sure that you don't uninstall WinUSB in your uninstall packages. Other USB devices might be using WinUSB, so its binaries must remain in the shared folder.
How to create a driver package that installs Winusb.sys
To use WinUSB as the device's function driver, you create a driver package. The driver package must contain these files:
- WinUSB co-installer (Winusbcoinstaller.dll)
- KMDF co-installer (WdfcoinstallerXXX.dll)
- An .inf file that installs Winusb.sys as the device's function driver. For more information, see Writing an .Inf File for WinUSB Installation.
- A signed catalog file for the package. This file is required to install WinUSB on x64 versions of Windows starting with Vista.
Note Make sure that the driver package contents meet these requirements:
- The KMDF and WinUSB co-installer files must be obtained from the same version of the Windows Driver Kit (WDK).
- The co-installer files must be obtained from the latest version of the WDK, so that the driver supports all the latest Windows releases.
- The contents of the driver package must be digitally signed with a Winqual release signature. For more info about how to create and test signed catalog files, see Kernel-Mode Code Signing Walkthrough on the Windows Dev Center - Hardware site.
-
Download the Windows Driver Kit (WDK) and install it.
-
Create a driver package folder on the machine that the USB device is connected to. For example, c:UsbDevice.
-
Copy the WinUSB co-installer (WinusbcoinstallerX.dll) from the WinDDKBuildNumberredistwinusb folder to the driver package folder.The WinUSB co-installer (Winusbcoinstaller.dll) installs WinUSB on the target system, if necessary. The WDK includes three versions of the co-installer depending on the system architecture: x86-based, x64-based, and Itanium-based systems. They are all named WinusbcoinstallerX.dll and are located in the appropriate subdirectory in the WinDDKBuildNumberredistwinusb folder.
-
Copy the KMDF co-installer (WdfcoinstallerXXX.dll) from the WinDDKBuildNumberredistwdf folder to the driver package folder.The KMDF co-installer (WdfcoinstallerXXX.dll) installs the correct version of KMDF on the target system, if necessary. The version of WinUSB co-installer must match the KMDF co-installer because KMDF-based client drivers, such as Winusb.sys, require the corresponding version of the KMDF framework to be installed properly on the system. For example, Winusbcoinstaller2.dll requires KMDF version 1.9, which is installed by Wdfcoinstaller01009.dll. The x86 and x64 versions of WdfcoinstallerXXX.dll are included with the WDK under the WinDDKBuildNumberredistwdf folder. The following table shows the WinUSB co-installer and the associated KMDF co-installer to use on the target system.Use this table to determine the WinUSB co-installer and the associated KMDF co-installer.
WinUSB co-installer KMDF library version KMDF co-installer Winusbcoinstaller.dll Requires KMDF version 1.5 or later Wdfcoinstaller01005.dllWdfcoinstaller01007.dllWdfcoinstaller01009.dllWinusbcoinstaller2.dll Requires KMDF version 1.9 or later Wdfcoinstaller01009.dll Winusbcoinstaller2.dll Requires KMDF version 1.11 or later WdfCoInstaller01011.dll -
Write an .inf file that installs Winusb.sys as the function driver for the USB device.
-
Create a signed catalog file for the package. This file is required to install WinUSB on x64 versions of Windows.
-
Attach the USB device to your computer.
-
Open Device Manager to install the driver. Follow the instructions on the Update Driver Software wizard and choose manual installation. You will need to provide the location of the driver package folder to complete the installation.
Related topics
WinUSB Architecture and Modules
Choosing a driver model for developing a USB client driver
How to Access a USB Device by Using WinUSB Functions
WinUSB Power Management
WinUSB Functions for Pipe Policy Modification
WinUSB Functions
WinUSB
Choosing a driver model for developing a USB client driver
How to Access a USB Device by Using WinUSB Functions
WinUSB Power Management
WinUSB Functions for Pipe Policy Modification
WinUSB Functions
WinUSB
How a driver is saved and packaged determines how it is installed. Below is information about each of the methods developers use to distribute their drivers, as well as how to install them in Microsoft Windows. Additionally, there are some general insights to help prevent frustrations during the process.
Drivers from a CD or DVD
Almost all computer and hardware manufacturers include a group of drivers for different hardware devices and often for each of the supported versions of Windows. For example, the driver CD you receive with your printer likely contains the drivers for many different printers and may not have the printer you purchased. When installing the drivers, make sure you are installing the drivers for your printer and not another printer model. Also, make sure you are installing it for the version of Windows you are running on your computer.
Below is an example of how a file structure may look on your disc.
For example, if you had a PrinterA200 and were using Windows XP, you would find your drivers in the PrinterA200WinXP folder. Once the location of the drivers is found, you must determine how the drivers are packaged. If the folder contains executable files or a setup file, you can install the driver using an executable. If the directory contains .inf files, you can install the driver using an inf or use the 'have disk' option during the install.
Tip
If you have a CD with drivers, but the computer has no functioning disc drive, you can also download the drivers. Or, if you have access to another computer, you can copy the drivers from the CD to a USB flash drive.
Installing drivers from USB drive or floppy
After the drivers are copied to a USB flash drive, floppy or another drive, they can also be installed from that drive. Once the drive is connected to the computer, open Windows Explorer and then the drive letter for the computer drive. For example, if you have a USB drive that is assigned the E: drive when connected, you would open the E: drive.
Once the drivers are found on the drive, you must determine how the drivers are packaged. If the directory contains executable files or a setup file, you can install the driver using an executable. If the directory contains .inf files, you can install the driver using an inf or use the 'have disk' option during the install. If the drivers are compressed into a .zip file, you need to uncompress the file.
Downloading drivers
Tip
If you have not yet downloaded the drivers, you can find drivers for your computer through the computer or device manufacturer. For links to the websites of prominent computer hardware manufacturers, see our hardware drivers index.
Tip
If you are downloading drivers to install on another device, you can copy or extract the the files to a USB flash drive and connect it to the other computer.
After the drivers have been downloaded, you must determine how the drivers are packaged. If the directory contains executable files or a setup file, you can install the driver using an executable. If the directory contains .inf files, you can install the driver using an inf or use the 'have disk' option during the install. If the drivers are compressed into a .zip file, you need to uncompress the file.
Tip
When extracting the drivers, make sure to remember where you place the folder containing the drivers since you need to point to this folder as part of the driver installation process. We recommend extracting the driver files to a folder on the Windows desktop, as it is an easy place to remember and locate, and it can be easily removed after driver installation is complete.
Executable
Many computer and hardware manufacturers today are pre-packaging their drivers into executable files or have the drivers installed through the setup file. Double-clicking the executable or setup file should install the drivers to the computer for you.
Note
The executable may be packaged in a compressed file, which means before looking for the setup file, you need to uncompress the downloaded file. If after uncompressing the file, it still does not contain an executable file, setup file, or does not install your hardware device, continue with the below recommendations.
Finally, if you are successful with installing your drivers and the computer asks to reboot the computer, make sure to reboot the computer after the driver is installed.
Using the 'have disk' option
A computer or hardware manufacturer may place the drivers on a CD, diskette, or folder on the hard drive for Windows to find and use during its hardware detection. Below are steps on how to install drivers for a new device and upgrade a device's driver for this setup.
![Custom usb driver wizard.exe download Custom usb driver wizard.exe download](/uploads/1/2/7/1/127188523/908878984.jpg)
Installing a new device
- Open Windows Device Manager.
- In the Device Manager, make sure the device you are attempting to install is not already listed from past install attempts. If the device is found, highlight and remove it from Device Manager to prevent any conflicts during the install.
- Once Device Manager looks okay, reboot the computer.
- As the computer is rebooting, an Install new hardware wizard should appear if Windows detects the new hardware. Using this wizard, you should be able to point Windows to the folder containing your drivers located on the CD, diskette, USB flash drive, or the folder containing the files you downloaded.
If Windows does not detect any new hardware, open the Control Panel and double-click the Add hardware icon to run the hardware detection wizard. During the steps, you have the option to install custom Windows drivers from a location on disk. Choose to load drivers, then select the folder containing the drivers for your device.
Note
The 'Add hardware' icon is only available in Windows XP and prior versions of Windows.
Once drivers have been installed, reboot the computer.
Upgrading drivers for a pre-existing device
- Open Windows Device Manager.
- In the Device Manager, locate the device you want to update.
- Right-click the device and click Properties.
- In the Properties window, click the Driver tab.
- Click the Update Driver button.
- In the Hardware Update Wizard, point Windows to the location of the updated driver files on your hard drive.
Once drivers have been installed, reboot the computer.
Install through the .inf file
Finally, if the above recommendations do not work, the installation instructions for drivers and hardware devices are always contained in an .inf file that is located in the driver files.
Locate the .inf file for your version of Windows. Right-click that file and choose the option for install.
Note
Make sure you are installing the correct .inf file and not an .inf file for another device or for a different version of Windows.
Once you have right-clicked and installed the driver, reboot the computer.
One of the above three recommendations should have installed or updated the drivers successfully onto the computer. If you are still having difficulties getting the device to install, it is possible you are not encountering a hardware issue and not an issue with the drivers. Refer to the troubleshooting steps for your hardware device for additional help and information.
Additional information
- See the driver definition for further information and related links.
![](/uploads/1/2/7/1/127188523/858122659.jpg)