Importing a block of drivers into an image takes quite a bit of time. This is not important before deployment, but during deployment it can add many minutes to the imaging process. During deployment you really want a process to inspect the target computer and obtain just the drivers required for it. For this we need specialist tools. Microsoft Deployment Toolkit (MDT) 2010 does this. It is interesting to see how it does it.
In Microsoft Deployment Toolkit (MDT) 2010, open the Deployment Workbench and import drivers into the Out-of-Box Drivers folder.
You can also filter the drivers into Selection Profiles
In the Task Sequence, select the Preinstall action Inject Drivers
When we study the Setup methods and the unattend.xml syntax, there is no such thing as "Preinstall", and no component to "inject" drivers, so what is going on?
Here is what happens when you use the MDT Preinstall task sequence to inject drivers:
- MDT uses its own tool PnpEnum.exe in the WinPE pass to:
- enumerate the hardware devices on the computer
- identify drivers for these devices in the Out-of-Box Drivers folder on the server
- copy them into a folder in the offline image, C:Drivers
- The folder C:Drivers is specified as the DriversPath In the PnPCustomizationWinPE component of the Offline Servicing Pass
- Deployment Image Servicing and Management (DISM) does its stuff to import the drivers
The DISM import process took 1 minute on a test VM, because only the required drivers were imported, not all the drivers in the Out-of-Box Drivers folder. Apart from that, the process is the same as the DISM process performed in Offline Servicing.
Here are the details of the process:
- The MDT scripted installation process running in WinPE executes the ZTIDrivers.wsf script
- ZTIDrivers runs PnpEnum.exe from the Deployment Share on the server. PnpEnum is an MDT tool that enumerates the hardware devices in the computer. The script pipes the output to a local file PnpEnum.xml.
- ZTIDrivers looks at the Selection Profile for this Task Sequence and finds the folders on the network with the drivers matching the profile.
- ZTIDrivers processes each hardware device in PnpEnum.xml and checks if there is a matching driver.
- If there is, the driver is copied to C:Drivers.
- The ZTIDrivers script ends.
- By default there is an offlineServicing pass, and if there are drivers in C:Drivers they will be imported.
So the trick that MDT has performed is to find only the required drivers, instead of a large block of drivers. The process of importing and selecting the drivers is exactly the same as if you had used Windows Deployment Services (WDS) with an unattend.xml file built with Windows System Image Manager (WSIM).