Add Drivers to an Offline Image

3/21/2011

You can use Deployment Image Servicing and Management (DISM) to install one or more device drivers to an offline Windows Embedded Standard 7 image. This enables you to add boot-critical device drivers to Standard 7 before installation.

Boot-critical drivers are reflected on the system. Driver reflection is defined as how a driver is installed on a computer that might have a device for that driver. Typically, this involves copying the driver files to a destination location and creating the service.

To add drivers to an offline Windows Embedded Standard 7 image

  1. Locate the device driver .inf files that you want to install on your Standard 7 image.

  2. Use Image Configuration Editor to create an answer file that contains the paths of the device drivers that you intend to install.

  3. Expand the Foundation Core - Windows Embedded Edition package and select the PnpCustomizationsNonWinPE node in the answer file. In the Settings pane, right-click DriverPaths, and then select Insert New PathAndCredentials.

    A new PathAndCredentials list item appears.

  4. For each location that you intend to access, add a separate PathAndCredentials list item.

  5. For each PathAndCredentials list item, specify the path of the device driver and the credentials that are used to access the file if the file is using a network share.

    Note

    You can include multiple device driver paths by adding multiple PathAndCredentials list items. If you add multiple list items, you must increment the value of Key for each path. For example, you can add two separate driver paths where the value of Key for the first path equals 1 and the value of Key for the second path equals 2.

  6. Save the answer file and exit Image Configuration Editor. The answer file must resemble the following sample.

    <?xml version="1.0" ?>
    <unattend xmlns="urn:schemas-microsoft-com:asm.v3" xmlns:wcm="https://schemas.microsoft.com/WMIConfig/2002/State">
       <settings pass="offlineServicing">
          <component name="WinEmb-PnpCustomizationsNonWinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
             <DriverPaths>
                <PathAndCredentials wcm:keyValue="1">
                   <Path>\\networkshare\share\drivers</Path>
                   <Credentials>
                      <Domain>Fabrikam</Domain>
                      <Username>MyUserName</Username>
                      <Password>MyPassword</Password>
                   </Credentials>
                </PathAndCredentials>
             </DriverPaths>
          </component>
       </settings>
    </unattend>
    
  7. Mount the Standard 7 image onto which you want to install the drivers by using ImageX. For example,

    imagex /mountrw C:\MyDir_distribution\sources\install.wim 1 C:\wim_mount
    

    The first Standard 7 image in the Install.wim file is mounted to C:\Wim_mount. For more information, see ImageX Command-Line Options.

  8. Enable logging of specific device driver injection actions in a separate log file. Edit the following registry key on the computer on which you are running Package Manager:

    Path: HKLM\Software\Microsoft\Windows Embedded Standard 7\CurrentVersion\Device Installer
    Key: DebugPkgMgr
    Type: REG_DWORD
    Value: 0x01
    

    This creates a Drivers.log file during the driver package injection. This log file logs all actions of the driver injection process.

    Use DISM to apply the unattended installation answer file to the mounted Standard 7 image.

  9. Review the contents of the %WINDIR%\Inf\ directory in the mounted Standard 7 image to make sure that the .inf files were installed. Drivers added to the Standard 7 image are named oem*.inf. This is to guarantee unique naming for new drivers added to the computer. For example, the files MyDriver1.inf and MyDriver2.inf are renamed oem0.inf and oem1.inf.

  10. Unmount the .wim file and commit the changes. For example,

    imagex /unmount /commit C:\wim_mount
    

The image is ready to be deployed.

See Also

Tasks

Add a Third-Party Driver Using a Distribution Share