Windows drivers can be implemented as either of the following types:
|Starting from version 6.21 of WinDriver, *.vxd drivers are no longer supported.|
The WinDriver Windows kernel module – windrvr6.sys – is a fully WDM driver, which can be installed using the wdreg utility, as explained in the following sections.
WinDriver provides a utility for dynamically loading and unloading your driver, which replaces the slower manual process using Windows' Device Manager (which can still be used for the device INF). This utility is provided in two forms: wdreg and wdreg_gui. Both versions can be found in the WinDriver\util directory, can be run from the command line, and provide the same functionality. The difference is that wdreg_gui displays installation messages graphically, while wdreg displays them in console mode.
This section describes the use of wdreg/ wdreg_gui on Windows operating systems.
This section explains how to use the wdreg utility to install the WDM windrvr6.sys driver on Windows, or to install INF files that register Plug-and-Play devices (such as PCI or PCMCIA) to work with this driver on Windows 7/Vista/Server 2008/Server 2003/XP/2000.
You can rename the windrvr6.sys kernel module and modify your device
INF file to register with your renamed driver, as explained in
This section is not relevant for Kernel PlugIn drivers, since
these are not WDM drivers and are not installed via an INF file. For an
explanation on how to use wdreg to install
Kernel PlugIn drivers on Windows 7 / Vista / Server 2008 / Server 2003 / XP /
2000, refer to
Usage: The wdreg utility can be used in two ways as demonstrated below:
wdreg -inf <filename> [-silent] [-log <logfile>]
[install | preinstall | uninstall | enable | disable]
wdreg -rescan <enumerator> [-silent] [-log <logfile>]
To successfully disable/uninstall your driver, make sure that
there are no open handles to the WinDriver service (windrvr6.sys or
your renamed driver (refer to |
This section explains how to use the wdreg utility to install non-WDM drivers, namely Kernel PlugIn drivers, on Windows 7/Vista/Server 2008/Server 2003/XP/2000.
wdreg [-file <filename>] [-name <drivername>] [-startup
[-log <logfile>] Action [Action ...]
|The default setting for the -startup option is automatic.|
-file – wdreg allows you
to install your driver in the registry under a different name than the
physical file name. This option sets the file name of the driver. You
must provide the driver's file name (without the *.sys
extension) as an argument.
wdreg looks for the driver in the Windows installation directory
(%windir%\system32\drivers). Therefore, you should verify that the driver file is located in the correct directory before attempting to install the driver.
wdreg -name <Your new driver name> -file <Your original
driver name> install
stopaction (if a version of the driver is currently loaded) or the wdreg
createaction (if no version of the driver is currently loaded), and then the wdreg
stopaction and then the wdreg
When using WinDriver, you develop a user-mode application that controls and
accesses your hardware by using the generic windrvr6.sys driver
(WinDriver's kernel module). Therefore, you might want to dynamically load and
unload the driver windrvr6.sys – which you can do using
In addition, in WDM-compatible operating systems, you also need to dynamically load INF files for your Plug-and-Play devices. wdreg enables you to do so automatically on Windows 7/Vista/Server 2008/Server 2003/XP/2000.
This section includes wdreg usage examples, which are based on the detailed description of wdreg contained in the previous section. Examples:
wdreg -inf <path to windrvr6.inf> install
To load an INF file named device.inf,
located in the c:\tmp directory:
wdreg -inf c:\tmp\device.inf install
You can replace the
install option in the example above with
preinstall to pre-install the device INF file for a device
that is not currently connected to the PC.
If the installation fails with an
To unload the driver/INF file, use the same commands, but simply replace
install in the examples above with
If you have used WinDriver to develop a Kernel PlugIn driver, you must
load your Kernel PlugIn after loading the WinDriver generic driver
When uninstalling your driver, you should unload your Kernel PlugIn driver before unloading windrvr6.sys.
|Kernel PlugIn drivers are dynamically loadable, and thus do not require a reboot in order to load.|
To load/unload your Kernel PlugIn driver (<Your driver name>.sys) use the wdreg command as described above for windrvr6, with the addition of the 'name' flag, after which you must add the name of your Kernel PlugIn driver.
|You should not add the *.sys extension to the driver name.|
wdreg -name KPDriver install
wdreg -name MPEG_Encoder -file MPEGENC install
wdreg -name KPDriver uninstall
wdreg -name MPEG_Encoder -file MPEGENC uninstall