Add Drivers to an Offline Image (Standard 7 SP1)
7/8/2014
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
Locate the device driver .inf files that you want to install on your Standard 7 image.
Use Image Configuration Editor to create an answer file that contains the paths of the device drivers that you intend to install.
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.
For each location that you intend to access, add a separate PathAndCredentials list item.
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.
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>
At a command prompt, type the following to use ImageX to mount the Standard 7 image onto which you want to install the drivers, replacing <wim_file> with the full path of your wim file, <image_number> with the volume of your image in the wim file, and <image_mount_path> with the file path to mount the image to:
imagex /mountrw <wim_file> <image_number> <image_mount_path>
For more information, see ImageX Command-Line Options.
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.
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.
At a command prompt, type the following to use ImageX to unmount the .wim file and commit the changes, replacing <image_mount_path> with the file path your image is mounted to:
imagex /unmount /commit <image_mount_path>
The image is ready to be deployed.
See Also
Tasks
Add a Third-Party Driver Using a Distribution Share
Other Resources
ImageX Technical Reference
Image Configuration Editor Technical Reference