Export (0) Print
Expand All

Deploying a Driver to a Test Computer

Taking advantage of the Visual Studio development environment, the WDK provides a test feature that enables you to build, deploy, and debug a driver on a test computer. To successfully deploy a driver to a test system using the WDK, you must first set up and configure a test computer. You can set up and configure multiple computers if you want to test your driver under different testing scenarios.

Setting up the test computer

Note  If you run into difficulties setting up the test computer, see Troubleshooting Configuration of Driver Deployment, Testing and Debugging.

Setting deployment properties for your driver solution

From the property pages for your driver package, you have additional control over how you want your driver deployed for testing. You can choose to deploy the driver automatically whenever you build the driver solution in each configuration.

  1. Open the property pages for your driver package. Right-click the driver package project in Solution Explorer and select Properties.
  2. In the property pages for the driver package, click Configuration Properties, click Driver Install, and then click Deployment.
  3. Select the Enable deployment option. When this option is selected, you must select a test computer that you have configured, or select the name of a computer that you want to configure for testing. See Configuring a Computer for Driver Deployment, Testing, and Debugging.

    When you enable deployment for your driver package project, the driver is automatically deployed to the test computer you have selected when you build your solution. You can use the Deployment property page to configure options for driver installation and deployment. See Deployment Properties for Driver Package Projects.

  4. When you enable deployment on a test computer, you can also automatically enable and configure Driver Verifier, KMDF Verifier, or UMDF Verifier on the test computer to enhance the effectiveness of testing. To set these options for the driver package project, click Configuration Properties, click Driver Install, and then click the following property pages.

Building a driver and deploying the driver to test computer

  1. Before you deploy your driver, make sure that you can build your driver solution. A driver solution must include the driver and driver package so that the driver can be installed on the test computer. For more information, see Creating a Driver Package and Building a Driver.
  2. Before you deploy the driver to the test computer, you also need to sign the driver package. See Signing a Driver During Development and Testing.
  3. Select the test computer that you have configured.
  4. To deploy the driver, click Build Solution or Deploy Solution from the Build menu, or press F5 to build, deploy, and start debugging.

When you deploy a driver, the driver files are copied to the %Systemdrive%\drivertest\drivers folder on the test computer. If something goes wrong during deployment, you can check to see if the files are copied to the test computer. Verify that the .inf, .cat, test cert, and .sys files, and any other necessary files, are present %systemdrive%\drivertest\drivers folder.

Troubleshooting driver deployment

Here are some tips for troubleshooting driver deployment to a test computer when you use Visual Studio and the WDK.

Can't find the deployment properties for the driver project

The deployment properties are only available if you have a driver package. If your driver solution does not have a driver package project, you need to add one. The driver package contains components, such as the INF file that are needed for installation. For more information, see Driver Packages and Creating a Driver Package.

Afer you have added the driver package, you can right-click the driver package project in Solution Explorer and select Properties. In the property pages for the driver package, click Configuration Properties, click Driver Install, and then click Deployment.

Problems selecting, configuring or locating the target computer

For instruction on how to set up the target computer, using Windows Driver Kit (WDK) 8.1 and Windows Driver Kit (WDK) 8, see Configuring a Computer for Driver Deployment, Testing, and Debugging. If you have problems with provisioning the target computer, see Troubleshooting Configuration of Driver Deployment, Testing and Debugging.

If the target computer is running an N or KN version of Windows, you must install the Media Feature Pack for N and KN versions of Windows. See Preparing a Computer for Provisioning (WDK 8.1) for more information.

Problems installing the driver on 64-bit version of Windows

Starting with Windows Vista, all 64-bit versions of Windows require driver code to have a digital signature for the driver to load. See Signing a Driver and Signing a Driver During Development and Testing.

Problems installing the driver (general)

The WDK can deploy and install a driver package on a test computer, but only if the driver has all the necessary components for installation, such as an INF file. See Driver Packages more information. Make sure you can install the driver outside of Visual Studio and the WDK. For example, use the Device Console utility, Devcon to test whether you can install the driver. Make sure the device (if you have one) is connected to the target computer. For more information, see Device and Driver Installation and Creating a Driver Package.

Related topics

Configuring a Computer for Driver Deployment, Testing, and Debugging
Troubleshooting Configuration of Driver Deployment, Testing and Debugging
Signing a Driver During Development and Testing
Deployment Properties for Driver Projects
Driver Verifier Properties for Driver Projects
KMDF Verifier Properties for Driver Package Projects
UMDF Verifier Properties for Driver Package Projects
How to create a custom driver installation script
Inf2Cat Properties for Driver Package Projects

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft