Add a Universal Windows driver to your Factory OS image

You can add Universal Windows drivers to your image by defining a Driver Feature Manifest file, and then adding the Driver feature manifest into your OEMInput.xml. The WSK comes with a set of tools to ease the initial creation and subsequent modification of this file.

Note

For faster driver testing, you can add a driver directly to a test image.

Prerequisites

Prepare your files

  1. Gather all your driver files, including the .inf, all system files and services for all architectures that your driver supports (x64, x86, and arm) on your local PC.

  2. Save the drivers to your workspace. We recommend using the DCHUDrivers location in your workspace, for example: C:\Workspace\DCHUDrivers\. It's OK to use subfolders, these scripts can find your drivers there.

Add drivers to the DriverFM included in your workspace

Your workspace includes an empty Driver FM that's already included in your OEMInput.xml file. To add drivers to an image, use the scripts in the WSK to add drivers to the Driver FM. If don't want to use this FM and want to learn how to create a new Driver FM and include it in an OEMInput.xml file, see Create a new Driver FM.

Add drivers to your workspace's Driver FM:

  1. Start the Windows System Kit Build Environment as an administrator (example, from the mounted WSK ISO, right-click E:\SetImagGenEnv.cmd and click Run as administrator.)

  2. From the Windows System Kit build environment, navigate to your workspace folder:

    cd c:\Workspace
    
  3. Set your workspace root variable to point to Update the WSKWorkspaceRoot environment variable to point to your workspace.

    C:\Workspace\SetWSKWorkspaceRoot.cmd
    
  4. Add the drivers in your workspace to to the included Driver FM: Use the scripts in the WSK to update your Driver FM so it includes the drivers in your workspace.

    Run the UpdateWSKDriversFM script to add all of the drivers from your workspace DCHU folder (%WSKWorkspaceRoot%\DHCUDrivers) to the OEMDriversFM.xml. All drivers listed in this FM will be included in your image.

    UpdateWSKDriversFM
    

    If you don't specify any options, the script will update the %WSKWorkspaceRoot%\FMFiles\OEMDriversFM.xml file to include all the drivers in the workspace's DCHUDrivers folder. For script options, see UpdateWSKDriversFM Syntax below.

    By default, the drivers are included in all image designs, but you can add feature identifiers if you're creating multiple image designs using a centralized set of collateral.

    When you add, remove, or update your drivers, re-run UpdateWSKDriversFM to add changes into your feature manifest.

Create a new Driver FM

You can use the scripts in the Windows System Kit to create a new Driver FM:

From the Windows System Kit environment:

  1. Place the drivers you want to include in a folder.

  2. Run the CreateWSKDriversFM script to include all of the drivers in your driver folder. Specify the name of the new DriverFM, and your driver folder:

    CreateWSKDriversFM -fmfile %WSKWorkspaceRoot%\FMFiles\NewOEMDriversFM.xml -InfFolder C:\NewDrivers
    

    For script options, see CreateWSKDriversFM Syntax below.

    This script creates a new feature manifest file, for example, %WSKWorkspaceRoot%\FMFiles\NewOEMDriversFM.xml that contains the location of each of the drivers.

    By default, the drivers are included in all image designs, but you can add feature identifiers and choose the drivers to include in an image if you're creating multiple image designs using a centralized set of collateral.

  3. Add the new Driver FM to your OEMInput.xml file by adding it as an <AdditionalFM>:

    <AdditionalFM>%WSKWorkspaceRoot%\FMFiles\NewOEMDriversFM.xml</AdditionalFM>
    
  4. If you add, remove, or update your drivers, run UpdateWSKDriversFM to add the drivers into your feature manifest.

    UpdateWSKDriversFM -fmfile %WSKWorkspaceRoot%\FMFiles\NewOEMDriversFM.xml -InfFolder C:\NewDrivers
    

Driver FM scripts syntax

CreateWSKDriversFM Syntax

CreateWSKDriversFM {-FMFile: [path]} {-InfFolder [Path]}
Parameter Description
-FMFile [Path] Path to the FM file you wish to create. By default, creates or replaces %WSKWorkspaceRoot%\FMFiles\OEMDriversFM.xml.
-InfFolder [Path] Path to the folder you wish to search for drivers in. By default, searches %WSKWorkspaceRoot%\DCHUDrivers.

UpdateWSKDriversFM Syntax

UpdateWSKDriversFM {-FMFile: [path]} {-InfFolder [Path]}
Parameter Description
-FMFile [Path] Path to the FM file you wish to update. By default, creates or replaces %WSKWorkspaceRoot%\FMFiles\OEMDriversFM.xml.
-InfFolder [Path] Path to the folder you wish to search for drivers in. By default, searches %WSKWorkspaceRoot%\DCHUDrivers.