Driver developers must understand installation from two different perspectives:
Test installation, which installs a driver on a test system.
Test installation must be done repeatedly throughout the development cycle so you can test and debug the driver.
Release installation, which installs a released version of a driver on a customer's system.
The procedures and tools for updating existing drivers are similar to those for installing a new driver. Unless otherwise specified, this chapter uses the term "installation" to refer to both test and release installation.
Driver installation must accomplish several key tasks:
Copying the driver binary to an appropriate place on the computer.
Registering the driver with Windows and specifying how the driver is to be loaded.
Adding information to the registry.
Copying or installing any related components, such as supporting DLLs or applications.
To accomplish these tasks, you must assemble the necessary files into a driver package and define exactly how each task must be performed.
Drivers can be installed in several different ways:
Let the PnP manager handle it. This is the primary way in which customers install drivers for new devices. They plug in the device, and the PnP manager guides them from there. Driver packages must be tested thoroughly to ensure that the PnP manager can install the package when a device is attached to a PC for the first time. However, this approach works only for new devices. Developers must create alternate approaches to update drivers for devices that have already been installed.
See "How to Install a Driver by Using the PnP Manager" later in this chapter.
Use an installation application. Driver Package Installer (DPInst) and Driver Install Frameworks for Applications (DIFxApp)-two customizable redistributable applications provided in the WDK-can be used for this purpose. You can also implement a custom installation application for drivers that require special procedures.
See "How to Install a Driver by Using DPInst or DIFxApp" and "How to Install a Driver by Using a Custom Installation Application" later in this chapter.
Use Windows Device Manager. This tool can be used to install or update drivers, but is typically used only by developers and advanced users.
See "How to Update a Driver by Using Device Manager" later in this chapter.
Use the DevCon tool from the WDK. This is a command-line tool that developers can use to manage drivers, including installations and updates. It is often used to install drivers on test computers.
See "How to Install or Update a Driver by Using DevCon" later in this chapter.
Tip The procedures for installing drivers are not specific to WDF and are not covered in detail in this book. See "Device Installation" in the WDK-online at http://go.microsoft.com/fwlink/?LinkId=79294.