Add a Driver Online in Audit Mode
Updated: October 20, 2013
Applies To: Windows 8, Windows 8.1, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2
You can use an answer file to automate the installation of device drivers when the computer is booted in audit mode.
The auditSystem configuration pass processes unattended Setup settings while Windows® is running in system context, before a user logs on to the computer in audit mode. The auditSystem configuration pass runs only if the computer is booted in audit mode. To add device drivers during the auditSystem configuration pass, add the Microsoft-Windows-PnpCustomizationsNonWinPE component to your answer file in the auditSystem configuration pass, and specify the path for each device driver. After you run Setup, boot Windows in audit mode. You can run the Sysprep command with the /audit option to configure the computer to start in audit mode the next time that it boots. Or, in the answer file, you can configure the Microsoft-Windows-Deployment\Reseal\
Mode setting to audit. For more information, see Unattended Windows Setup Reference Guide.
Locate the .inf files that you want to install during audit mode for the device driver.
On your technician computer, open Windows System Image Manager (Windows SIM). Click Start, type Windows System Image Manager, and then select Windows System Image Manager.
Open your answer file and expand the Components node to display available settings.
Add the Microsoft-Windows-PnpCustomizationsNonWinPE component to your answer file in the auditSystem configuration pass.
Expand the Microsoft-Windows-PnpCustomizationsNonWinPE node in the answer file. Right-click DevicePaths, and then click Insert New PathAndCredentials.
A new PathAndCredentials list item appears.
For each location that you access, add a separate PathAndCredentials list item.
In the Microsoft-Windows-PnpCustomizationsNonWinPE component, specify the path of the device driver and the credentials that are used to access the file if the file is on 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
Keyfor each path. For example, if you add two separate driver paths, the first path uses the
Keyvalue of 1, and the second path uses the
Keyvalue of 2.
Save the answer file and close Windows SIM. The answer file must resemble this example:
<?xml version="1.0" encoding="utf-8" ?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="auditSystem"> <component name="Microsoft-Windows-PnpCustomizationsNonWinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <DriverPaths> <PathAndCredentials wcm:keyValue="1" wcm:action="add"> <Credentials> <Domain>Fabrikam</Domain> <Password>MyPassword</Password> <Username>MyUserName</Username> </Credentials> <Path>\\networkshare\share\drivers</Path> </PathAndCredentials> </DriverPaths> </component> </settings> </unattend>
Boot in Windows Preinstallation Environment (Windows PE), run Windows Setup, and specify the name of the answer file. For example:
Run the Sysprep command with the /audit option to configure the computer to start in audit mode the next time that it boots. For example:
Sysprep /audit /reboot
You can use the PNPUtil tool to add, remove, and enumerate drivers on a running operating system. For more information about how to use PNPUtil to add or remove Plug and Play drivers, see Install a Plug and Play Device.