Chapter 12  Driver Installation – Advanced Issues

12.1  Windows INF Files

Device information (INF) files are text files that provide information used by the Plug-and-Play mechanism on Windows 7 / Vista / Server 2008 / Server 2003 / XP / 2000 / Me / 98 to install software that supports a given hardware device. INF files are required for hardware that identifies itself, such as USB and PCI. An INF file includes all necessary information about a device and the files to be installed. When hardware manufacturers introduce new products, they must create INF files to explicitly define the resources and files required for each class of device.

In some cases, the INF file for your specific device is supplied by the operating system. In other cases, you will need to create an INF file for your device. WinDriver's DriverWizard can generate a specific INF file for your device. The INF file is used to notify the operating system that WinDriver now handles the selected device.

For USB devices, you will not be able to access the device with WinDriver (either from the DriverWizard or from the code) without first registering the device to work with windrvr6.sys. This is done by installing an INF file for the device. The DriverWizard will offer to automatically generate the INF file for your device.

You can use the DriverWizard to generate the INF file on the development machine–as explained in 5.2 of the manual–and then install the INF file on any machine to which you distribute the driver, as explained in the following sections.

12.1.1  Why Should I Create an INF File?

  • To bind the WinDriver kernel module to a specific USB device.
  • To override the existing driver (if any).
  • To enable WinDriver applications and the DriverWizard to access a USB device.

12.1.2  How Do I Install an INF File When No Driver Exists?

[Note]
You must have administrative privileges in order to install an INF file.

You can use the wdreg utility with the install command to automatically install the INF file:
wdreg -inf <path to the INF file> install
(for more information, refer to 10.2.2 of the manual).

On the development PC, you can have the INF file automatically installed when selecting to generate the INF file with the DriverWizard, by checking the Automatically Install the INF file option in the DriverWizard's INF generation window (see section 5.2).

It is also possible to install the INF file manually, using either of the following methods:

  • Windows Found New Hardware Wizard : This wizard is activated when the device is plugged in or, if the device was already connected, when scanning for hardware changes from the Device Manager.
  • Windows Add/Remove Hardware Wizard : Right-click the mouse on My Computer, select Properties , choose the Hardware tab and click on Hardware Wizard... .
  • Windows Upgrade Device Driver Wizard : Locate the device in the Device Manager devices list and select the Update Driver... option from the right-click mouse menu or from the Device Manager's Action menu.

In all the manual installation methods above you will need to point Windows to the location of the relevant INF file during the installation.
We recommend using the wdreg utility to install the INF file automatically, instead of installing it manually.

12.1.3  How Do I Replace an Existing Driver Using the INF File?

[Note]
You must have administrative privileges in order to replace a driver.
  1. On Windows 2000, if you wish to upgrade the driver for USB devices that have been registered to work with earlier versions of WinDriver, we recommend that you first delete from the Windows INF directory (\windir\inf) any previous INF files for the device, to prevent Windows from installing an old INF file in place of the new file that you created. Look for files containing your device's vendor and device IDs and delete them.
  2. Install your INF file:

    You can use the wdreg utility with the install command to automatically install the INF file:
    wdreg -inf <path to INF file> install
    (for more information, refer to 10.2.2 of the manual).

    On the development PC, you can have the INF file automatically installed when selecting to generate the INF file with the DriverWizard, by checking the Automatically Install the INF file option in the DriverWizard's INF generation window (see section 5.2).

    It is also possible to install the INF file manually, using either of the following methods:

    • Windows Found New Hardware Wizard : This wizard is activated when the device is plugged in or, if the device was already connected, when scanning for hardware changes from the Device Manager.
    • Windows Add/Remove Hardware Wizard : Right-click on My Computer , select Properties, choose the Hardware tab and click on Hardware Wizard... .
    • Windows Upgrade Device Driver Wizard : Locate the device in the Device Manager devices list and select the Update Driver... option from the right-click mouse menu or from the Device Manager's Action menu.

    In the manual installation methods above you will need to point Windows to the location of the relevant INF file during the installation. If the installation wizard offers to install an INF file other than the one you have generated, select Install one of the other drivers and choose your specific INF file from the list.

    We recommend using the wdreg utility to install the INF file automatically, instead of installing it manually.