Technical Document #114

Technical Document #114        [Product Version: 5.1.X]
KernelDriver USB for Windows NT 4.0 (version 5.1.x) — Distributing Your Driver

In order to distribute your KernelDriver based driver to a target Windows machine (which does not have the KernelDriver software installed), when using version 5.1.x of KernelDriver (which supports the USB bus on Windows NT 4.0), follow the instructions below:

  • Copy windrvr.sys, wdusbd.sys and your own SYS/VxD kernel driver — my_kd.sys/vxd — to the target computer's drivers directory — WINNT\system32\drivers.
    When copying the files, take care not to overwrite a newer version of the file with an older one.

    windrvr.sys is found under the KernelDriver\redist\register directory on the development machine (registered driver). wdusbd.sys is found under the KernelDriver\redist directory.

  • Copy wdreg.exe from the KernelDriver\util directory on the development machine to the target machine.

  • Uninstall the existing driver for the device (if such a driver exists).
    If the existing driver was developed with WinDriver/KernelDriver:
    1. If the driver was developed with KernelDriver or using WinDriver's Kernel PlugIn feature (described in the WinDriver User's Manual), first stop and delete the kernel driver service using wdreg.exe:
          wdreg.exe -name <driver name> remove

    2. Remove the current windrvr.sys and wdusbd.sys services using wdreg.exe:
          wdreg.exe -name wdusbd remove
          wdreg.exe remove

  • Install windrvr.sys using wdreg.exe by running
        wdreg.exe install

  • Install wdusbd.sys using wdreg.exe by running
        wdreg.exe -name wdusbd install

  • Install your own kernel driver — my_kd.sys — using wdreg.exe:
        wdreg.exe -name <my_kd> install

    1. Specify the driver name without the *.sys extension.
    2. You must first install windrvr.sys and wdusbd.sys before attempting to install your own kernel driver.
  • Copy your user mode executable/DLL file (if you have created one) to the directory of you choice on the target machine and run it.