Boot USB, pick the disk, walk away. Drivers install during setup. One command after logon for HP apps and software.
- Windows 11 ISO — https://www.microsoft.com/en-us/software-download/windows11 (Download Windows 11 Disk Image (ISO) near the bottom)
- Rufus — https://rufus.ie
- HP driver pack
sp168962.exe— https://ftp.hp.com/pub/caps-softpaq/cmit/HP_Driverpack_Matrix_x64.html (840 G11 row, Win11 pack) autounattend.xml— built with https://schneegans.de/windows/unattend-generator/
Extract on any Windows PC:
sp168962.exe /s /eLands in C:\SWSETUP\sp168962\ZBEB_G11_MWSNB\W11_25H2\ — six folders: Audio, Chipset, Graphics, HSAs, Network, Other.
Optional prune. The pack covers six models; this drops ~2 GB of drivers for hardware the 840 G11 doesn't have, plus HP telemetry that installs itself via INF:
$root = 'C:\SWSETUP\sp168962\ZBEB_G11_MWSNB\W11_25H2'
$remove = @(
'Graphics\Nvidia' # ZBook only
'Other\Fibocom' # WWAN modem
'Other\Wacom Technology' # x360 digitizer
'Other\HP\P018HB-B2G' # TouchpointAnalytics
'Other\HP\P018MC-B2T' # HP OneAgent
'Other\HP\P014X5-B2M' # HP Services Scan
'HSAs\NVIDIA_Video_Driver_and_Control_Panel_(P015T8-B2U)'
)
foreach ($item in $remove) {
$path = Join-Path $root $item
if (Test-Path -LiteralPath $path) {
& attrib.exe -R -H -S "$path\*.*" /S /D 2>$null | Out-Null
& cmd.exe /c rd /s /q "$path" 2>$null
Write-Host "Removed $item" -ForegroundColor Green
}
}
attrib+rdbecause HP marks files read-only andRemove-Item -Recurse -Forcechokes on it in PS 5.1. Run elevated.
Do not remove Other\HP\P014UW-B2W — that's HpqKbFiltr.sys, the driver behind the Fn keys.
Burn the ISO with Rufus — GPT / UEFI / NTFS, label WIN11_INSTALL. Decline the Windows User Experience dialog; Rufus injects its own answer file and overrides yours.
After Rufus finishes, the USB holds only the ISO contents: boot, efi, sources, support. You add three things.
$WinPEDriver$ is not part of the ISO or the driver pack — you create it. The name is what Windows Setup looks for. Use single quotes in PowerShell or the $ is read as a variable:
New-Item -Path 'E:\$WinPEDriver$' -ItemType DirectoryCopy the contents of W11_25H2 into it — the six folders, not the W11_25H2 folder itself:
Copy-Item -Path 'C:\SWSETUP\sp168962\ZBEB_G11_MWSNB\W11_25H2\*' `
-Destination 'E:\$WinPEDriver$\' -RecurseThen drop autounattend.xml and workstation.ps1 at the USB root.
Final layout:
WIN11_INSTALL (root)
├── boot\ efi\ sources\ support\ <- from Rufus, leave alone
├── autounattend.xml
├── workstation.ps1
└── $WinPEDriver$\
├── Audio\ Chipset\ Graphics\
├── HSAs\ Network\ Other\
Verify before booting:
Get-ChildItem E:\ | Select-Object Name
(Get-ChildItem 'E:\$WinPEDriver$' -Recurse -File).CountRoot must list $WinPEDriver$ spelled exactly — if it shows WinPEDriver or blank, the $ was interpreted; delete and redo it in Explorer. File count is 1,744 pruned, 2,520 unpruned.
Windows Setup scans $WinPEDriver$ during the PE stage and installs INFs that match by hardware ID. Irrelevant drivers never bind. No script, no pnputil.
autounattend.xml handles accounts, locale, debloat and autologon. Disk selection stays interactive, so nothing can wipe the wrong drive.
One command, elevated PowerShell:
& 'E:\workstation.ps1'Runs HP's InstallAllApps.cmd (hotkeys, vendor control panels) then the winget list. Finds the HSA installer recursively from its own location, so only that first drive letter matters. Reboot when done.
Get-PnpDevice -PresentOnly | Where-Object { $_.Problem -ne 0 }
Select-String C:\Windows\Panther\setupact.log -Pattern 'unattend','\$WinPEDriver\$','PnPIBS'
winget --infoFirst returns nothing. Second proves the answer file was selected and the driver folder was found.
- Set the real SSID and passphrase in the generator's Wi-Fi section. A placeholder means no network, which means winget installs nothing.
- HSA log lands at
<script drive>:\ProgramData\HP\logs\UWP\_InstallAllApps.log. autounattend.xmlholds the account password in plaintext. Keep the USB private.- No BIOS or firmware updates in the pack. Run HP Image Assistant occasionally for those.
- To stop Windows Update replacing HP's validated drivers, add a
.regas a System script in the generator:HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate→ExcludeWUDriversInQualityUpdate=1