Technical Document #117

Technical Document #117        [Product Version: 6.x–7.x]
Distributing your WinDriver-based driver to a target Windows PC — versions 6.x–7.x

This document outlines the basic steps for installing a driver developed with version 6.x–7.x of WinDriver on a target Windows 95 / 98 / NT / 2000 / XP / Server 2003 PC. Detailed driver distribution instructions can be found in the WinDriver User's Manual for your WinDriver version.

The Windows driver distribution steps for version 8.1.x and above of WinDriver are outlined in Technical Document #132.

The Windows driver distribution steps for version 8.0.x of WinDriver are outlined in Technical Document #130.



Documentation Notes:

  • The windrvr6.sys/vxd and windrvr6.inf files, mentioned in this document, can be found under the WinDriver\redist directory on the development PC. wdreg.exe / wdreg_gui.exe / wdreg16.exe can be found under the WinDriver\util directory (the source code is found under the WinDriver\samples\wdreg directory, beginning with v6.0.1 of WinDriver).

  • The wdreg.exe and wdreg_gui.exe utilities provide the same functionality. The difference is in the way the installation messages are displayed — graphical message boxes (wdreg_gui.exe) or console messages (wdreg.exe). You can therefore replace any reference to wdreg.exe in the following instructions with wdreg_gui.exe.
    When installing windrvr6.sys on Windows 98/Me, you should use the wdreg16.exe utility.



Installation Notes:

  • You must have administrative privileges in order to install drivers on Windows.

  • When distributing your driver, take care not to overwrite a newer version of windrvr6/vxd with an older version of this driver.

  • When upgrading the driver from a previous version of WinDriver, which also uses the windrvr6.sys/vxd driver module (v6.0.0 and above):
    • If you have also created a Kernel PlugIn driver (e.g., old_kp.sys/vxd), remove this driver before proceeding with the installation:

      To remove old_kp.sys, run:
      \> wdreg -name OLD_KP uninstall

      To remove old_kp.vxd, add the -vxd flag:
      \> wdreg -vxd -name OLD_KP uninstall

    • For a reboot-free installation of the new driver, verify that there are no open handles to the windrvr6.sys/vxd service. This includes verifying that there are no open applications that use this service and that there are no connected Plug-and-Play (PCI/USB) devices that are registered to work with it via an INF file (on Windows 98/Me/2000/XP/Server 2003). Otherwise, the installation might instruct the user to either uninstall all devices currently registered to work with WinDriver and Retry, or Cancel and reboot the PC in order to successfully complete the installation of the new driver.

  • On Windows 2000 it is recommended that you remove any INF file(s) previously installed for your Plug-and-Play device (PCI/USB), such as files created with an earlier version of WinDriver, from the %windir%\inf directory. This will ensure that Windows will not automatically detect and install an old INF file for your device.
    You can search the INF directory for the device's vendor ID and device/product ID to locate the file(s) associated with the device.
    For more information regarding the Windows 2000 INF selection algorithm, refer to Technical Document #49.

  • Version 5.2.2- and v6.0+ drivers: In version 6.0.0 we have modified and improved the WinDriver installation mechanism. Among other things, we have changed the name of the WinDriver driver module from windrvr to windrvr6. This enables drivers developed with an older version of WinDriver to co-exist peacefully on the same PC with drivers developed with version 6.0.0+. As a result, users can install a driver developed with version 6.0.0+ of WinDriver on any PC, without worrying about affecting another WinDriver-based driver, developed with an earlier version of WinDriver (5.2.2 or below), which might be installed on the same machine.

    To upgrade a driver developed with version 5.2.2 or earlier of WinDriver, to version 6.0.0 and above, refer to Technical Document #116. To upgrade from version 6.0.x to version 6.2.x, refer to Technical Document #84.


  • VxD drivers: VxD drivers — windrvr6.vxd and Kernel PlugIn VxD drivers — are no longer supported beginning with v6.2.x of WinDriver.



Installation Steps:

NOTE: Before proceeding to perform the installation, make sure you read the Installation Notes above.


Installing a SYS Driver on Windows 98/Me/2000/XP/Server 2003:

NOTE: For Windows 98/Me, replace the references to wdreg.exe below with wdreg16.exe.

  1. Copy windrvr6.inf to the same directory.

  2. Use the utility wdreg.exe to install WinDriver's kernel module on the target computer:
    \> wdreg -inf <path to windrvr6.inf> install

    [NOTE: For versions earlier than 6.2.0, you must indicate the full path to the INF file when using the wdreg utility.]

    TIP: If you copy wdreg.exe to the same directory as windrvr6.sys and windrvr6.inf, you can simply run the following command from your installation directory in order to install the driver:
    install_dir:] wdreg -inf windrvr6.inf install


  3. If you have created a Kernel PlugIn driver (e.g., my_kp.sys/vxd), copy this driver to Windows drivers directory — %windir%\system32\drivers for SYS drivers, or %windir%\system\VMM32 for VxD drivers — and install it using the wdreg.exe utility:

    To install my_kp.sys, run:
    \> wdreg -name MY_KP install

    To install my_kp.vxd, add the -vxd flag:
    \> wdreg -vxd -name MY_KP install

    NOTE: The driver name is indicated without the *.sys/.vxd extension.


  4. On Windows 98/Me, reboot the PC to complete the driver installation.

  5. For Plug-and-Play devices (PCI/USB): install the device INF file, which registers your device to work with the windrvr6.sys service (normally this file is created using WinDriver's DriverWizard utility).

    On Windows 2000/XP/Server 2003, you can use the wdreg.exe utility with the install command to automatically install the INF file:
    \> wdreg -inf <path to device.inf> install

    [NOTE: For versions earlier than 6.2.0, you must indicate the full path to the INF file when using the wdreg utility.]

    On Windows 98/Me, install the device INF file manually, using Windows' Update Driver wizard (from the Device Manager) or New Hardware Wizard, as explained in the instructions that will be displayed when generating the file with DriverWizard, and in the WinDriver User's Manual for the relevant WinDriver version. Alternatively, copy the INF file to Windows' INF directory
    (%windir%\inf) and reboot to let Windows locate and install the file.


  6. If your project uses wd_utils.dll, copy this DLL to the
    %windir%\system32 directory on the target.

  7. Copy your driver application/DLL to the target and run it!



Installing a SYS Driver on Windows NT 4.0:
  1. Copy windrvr6.sys to the Windows drivers directory on the target PC — %windir%\system32\drivers.

  2. Use the utility wdreg.exe to install WinDriver's kernel module on the target computer:
    \> wdreg install

  3. If you have created a Kernel PlugIn driver (e.g., my_kp.sys), copy this driver to Windows drivers directory — %windir%\system32\drivers — and install it using the wdreg.exe utility (you must have administrative privileges to perform the installation):
    \> wdreg -name MY_KP install

    NOTE: The driver name is indicated without the *.sys extension.


  4. If your project uses wd_utils.dll, copy this DLL to the
    %windir%\system32 directory on the target.

  5. Copy your driver application/DLL to the target and run it!



Installing a VxD Driver on Windows 95/98/Me:

NOTE: This section is relevant only for PCI/ISA VxD drivers, used until v6.2.x of WinDriver.

  1. Copy windrvr6.vxd to Windows' VxD drivers directory on the target PC — %windir%\system\VMM32.

  2. Use the utility wdreg.exe with the install command and the -vxd flag to install WinDriver's kernel module on the target computer:
    \> wdreg -vxd install

  3. If you have created a Kernel PlugIn driver (e.g., my_kp.vxd), copy this driver to Windows VxD drivers directory — %windir%\system\VMM32 — and install it using the wdreg.exe utility:
    \> wdreg -vxd -name MY_KP install

    NOTE: The driver name is indicated without the *.vxd extension.


  4. Reboot the PC to complete the driver installation.

  5. If your project uses wd_utils.dll, copy this DLL to the
    %windir%\system32 directory on the target.

  6. Copy your driver application/DLL to the target and run it!