![]() | |
|
Distributing the driver you created is a multi-step process. First, create a distribution package that includes all the files required for the installation of the driver on the target computer. Second, install the driver on the target machine. This involves installing windrvr6.sys and windrvr6.inf,and installing the specific INF file for your device .
Finally, you need to install and execute the hardware control application that you developed with WinDriver. These steps can be performed using wdreg utility.
Your distribution package should include the following files:
![]() | |
| Driver installation on Windows requires administrator privileges. |
Follow the instructions below in the order specified to properly install your driver on the target computer:
Copy windrvr6.sys, windrvr6.inf and wd1011.cat to the same directory.
![]() | |
wd1011.cat contains the
driver's Authenticode digital signature. To maintain the signature's
validity this file must be found in the same installation directory
as the windrvr6.inf file. If you
select to distribute the catalog and INF files in different
directories, or make any changes to these files or to any other files
referred to by the catalog file (such as
windrvr6.sys), you will need to do
either of the following:
For more information regarding driver digital signing and certification and the signing of your WinDriver-based driver, refer to section 12.3 of the manual. |
Use the utility wdreg to install
WinDriver's kernel module on the target computer:
wdreg -inf <path to windrvr6.inf> install
For example, if windrvr6.inf and
windrvr6.sys are in the
d:\MyDevice directory on the target computer,
the command should be:
wdreg -inf d:\MyDevice\windrvr6.inf install
You can find the executable of wdreg in the WinDriver package under the WinDriver\util directory. For a general description of this utility and its usage, please refer to Chapter 10.
![]() | |
|
![]() | |
| When distributing your driver, take care not to overwrite a newer version of windrvr6.sys with an older version of the file in Windows drivers directory (%windir%\system32\drivers). You should configure your installation program (if you are using one) or your INF file so that the installer automatically compares the time stamp on these two files and does not overwrite a newer version with an older one. |
Install the INF file for your device (registering your Plug-and-Play device with windrvr6.sys):
Run the utility wdreg with the
install command to automatically install the INF file and
update Windows Device Manager:
wdreg -inf <path to your INF file> install
You can also use the wdreg utility's
preinstall command to pre-install an INF file for a device
that is not currently connected to the PC:
wdreg -inf <path to your INF file> preinstall
![]() | |
| On Windows 2000, if another INF file was previously installed for the device, which registered the device to work with the Plug-and-Play driver used in earlier versions of WinDriver remove any INF file(s) for the device from the %windir%\ inf directory before installing the new INF file that you created. This will prevent Windows from automatically detecting and installing an obsolete file. 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. |
Install wdapi1011.dll:
If your hardware control application/DLL uses
wdapi1011.dll (as is the case for
the sample and generated DriverWizard WinDriver projects), copy this DLL to
the target's %windir%\ system32 directory.
If you are distributing a 32-bit application/DLL to a target 64-bit
platform [A.2], rename
wdapi1011_32.dll in your
distribution package to
wdapi1011.dll, and copy the renamed
file to the target's %windir%\ sysWOW64 directory.
![]() | |
| If you attempt to write a 32-bit installation program that installs a 64-bit program, and therefore copies the 64-bit wdapi1011.dll DLL to the %windir%\ system32 directory, you may find that the file is actually copied to the 32-bit %windir%\sysWOW64 directory. The reason for this is that Windows x64 platforms translate references to 64-bit directories from 32-bit commands into references to 32-bit directories. You can avoid the problem by using 64-bit commands to perform the necessary installation steps from your 32-bit installation program. The system64.exe program, provided in the WinDriver\redist directory of the Windows x64 WinDriver distributions, enables you to do this. |