Specialize DriverPacks
Wait for the next update to the OSD Module before trying this out as these functions have not been released yet
OSDCloud applies HP and Lenovo DriverPacks in the Specialize Phase of Windows Setup. The reason this is done is because HP and Lenovo Driver Packs are in 32-Bit EXE format, so they cannot be executed and expanded in WinPE x64. This page will detail how OSDCloud handles this
Save-MyDriverPack (WinPE)
When OSDCloud encounters an EXE Driver Pack (HP and Lenovo) a warning is displayed in WinPE that it is unable to be expanded. Deploy-OSDCloud.ps1
addresses this by executing the function Add-StagedDriverPack.specialize


Add-StagedDriverPack.specialize
This function will create an Unattend file in the following location
C:\Windows\Panther\Expand-StagedDriverPack.xml
The contents of the Unattend are to simply execute the function Expand-StagedDriverPack
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="specialize">
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Description>Expand-StagedDriverPack</Description>
<Path>Powershell -ExecutionPolicy Bypass -Command Expand-StagedDriverPack</Path>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
</unattend>
To ensure that this Unattend file is run, the following Registry entry is made in the Offline OS
PS C:\> (Get-ItemProperty -Path HKLM:\SYSTEM\Setup).UnattendFile
C:\Windows\Panther\Expand-StagedDriverPack.xml
Answer File Search Order
By doing this method, it ensures that if you have an Unattend.xml file placed in C:\Windows\Panther, it will not interfere with the Specialize pass, nor will an existing Unattend.xml file be overwritten. Additionally, the Registry method is the first Answer File that is processed if it exists

For more details about the Answer File settings, see the following link
Expand-StagedDriverPack
Once the Specialize phase has started, the Answer File will expand any DriverPacks and apply the drivers using pnpunattend.exe. A quick look at the code will do a better job of explaining how this needs to work

And here is a video of how the process looks
Next Steps
If you think this applies only to OSDCloud, you are missing the big picture. This process opens the way to replacing Out-of-box-Drivers in MDT with DriverPacks. More details on this to come shortly
Last updated
Was this helpful?