# First Boot

During First Boot (Specialize Phase), any EXE based DriverPacks in C:\Drivers will be expanded.  Once expanded, they will be applied using the following PowerShell commands

```powershell
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths" -Name 1 -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1" -Name Path -Value $DestinationPath -Force
pnpunattend.exe AuditSystem /L
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1" -Recurse -Force
```

You can identify this phase by the "Getting ready"&#x20;

<figure><img src="https://344220114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVSV22dcsjKDdOxDA6n%2Fuploads%2FQyMviM9BDm4R3lY0L1U5%2Fimage.png?alt=media&#x26;token=11003f69-00df-4c3e-ace4-15c7fdc47699" alt=""><figcaption></figcaption></figure>

## Dell Systems

Dell uses CAB files or EXE files that can be expanded in WinPE, so there is no activity in First Boot other than a long delay.  You can review the logs in C:\Windows\debug

```powershell
Start-Process -FilePath $ExpandFile -ArgumentList "/s /e=`"$DestinationPath`"" -Wait

Write-Verbose -Verbose "$((Get-Date).ToString('yyyy-MM-dd-HHmmss')) Applying DriverPack with PNPUNATTEND"
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths" -Name 1 -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1" -Name Path -Value $DestinationPath -Force
pnpunattend.exe AuditSystem /L
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1" -Recurse -Force
```

## HP Devices

HP DriverPacks are silent, so there is no progress displayed during this phase other than a long delay.  You can review the logs in C:\Windows\debug

```powershell
Start-Process -FilePath $ExpandFile -ArgumentList "/s /e /f `"$DestinationPath`"" -Wait

Write-Verbose -Verbose "$((Get-Date).ToString('yyyy-MM-dd-HHmmss')) Applying DriverPack with PNPUNATTEND"
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths" -Name 1 -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1" -Name Path -Value $DestinationPath -Force
pnpunattend.exe AuditSystem /L
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1" -Recurse -Force
```

<figure><img src="https://344220114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVSV22dcsjKDdOxDA6n%2Fuploads%2FOfJCz7kyNdW1L1wYGiFG%2Fimage.png?alt=media&#x26;token=7b4be6b2-7de0-4d78-9be9-79d23c9c471e" alt=""><figcaption></figcaption></figure>

<figure><img src="https://344220114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVSV22dcsjKDdOxDA6n%2Fuploads%2FgqXItiq5y4MC2iO8FiDn%2Fimage.png?alt=media&#x26;token=2249409a-f2b5-4b5f-b35c-6d2f36ec12d4" alt=""><figcaption></figcaption></figure>

## Lenovo Devices

Lenovo devices will display a progress when the DriverPacks is expanded

```powershell
Start-Process -FilePath $ExpandFile -ArgumentList "/SILENT /SUPPRESSMSGBOXES" -Wait

Write-Verbose -Verbose "$((Get-Date).ToString('yyyy-MM-dd-HHmmss')) Applying DriverPack with PNPUNATTEND"
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths" -Name 1 -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1" -Name Path -Value $DestinationPath -Force
pnpunattend.exe AuditSystem /L
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1" -Recurse -Force
```

<figure><img src="https://344220114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVSV22dcsjKDdOxDA6n%2Fuploads%2FRB7P2EC59088ZKzqQDbH%2Fimage.png?alt=media&#x26;token=bf4eb583-66d5-4701-a194-6d9b270f7322" alt=""><figcaption></figcaption></figure>

<figure><img src="https://344220114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVSV22dcsjKDdOxDA6n%2Fuploads%2FrJZkvUNPkOYJPnTtgVCY%2Fimage.png?alt=media&#x26;token=f9e4a613-2c6e-4d3c-a3ec-d71eed8f48b8" alt=""><figcaption></figcaption></figure>

## Microsoft Surface Devices

Microsoft uses MSI DriverPacks which expanded silently, so there is no activity in First Boot other than a long delay.  You can review the logs in C:\Windows\debug&#x20;

```powershell
$DateStamp = Get-Date -Format yyyyMMddTHHmmss
$logFile = '{0}-{1}.log' -f $ExpandFile,$DateStamp
$MSIArguments = @(
	"/i"
	('"{0}"' -f $ExpandFile)
	"/qb"
	"/norestart"
	"/L*v"
	$logFile
)
Start-Process "msiexec.exe" -ArgumentList $MSIArguments -Wait -NoNewWindow
```
