mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Added $CopyPEDrivers variable to handle copying PEDrivers to boot media
This commit is contained in:
@@ -212,6 +212,7 @@ param(
|
|||||||
return $true
|
return $true
|
||||||
})]
|
})]
|
||||||
[bool]$CopyDrivers,
|
[bool]$CopyDrivers,
|
||||||
|
[bool]$CopyPEDrivers,
|
||||||
[bool]$RemoveFFU,
|
[bool]$RemoveFFU,
|
||||||
[bool]$UpdateLatestCU,
|
[bool]$UpdateLatestCU,
|
||||||
[bool]$UpdateLatestNet,
|
[bool]$UpdateLatestNet,
|
||||||
@@ -221,7 +222,7 @@ param(
|
|||||||
[bool]$CopyPPKG,
|
[bool]$CopyPPKG,
|
||||||
[bool]$CopyUnattend,
|
[bool]$CopyUnattend,
|
||||||
[bool]$CopyAutopilot,
|
[bool]$CopyAutopilot,
|
||||||
[boop]$CompactOS = $true
|
[bool]$CompactOS = $true
|
||||||
)
|
)
|
||||||
$version = '2402.1'
|
$version = '2402.1'
|
||||||
|
|
||||||
@@ -1078,8 +1079,17 @@ function New-PEMedia {
|
|||||||
WriteLog "Copying $FFUDevelopmentPath\WinPEDeployFFUFiles\* to WinPE deploy media"
|
WriteLog "Copying $FFUDevelopmentPath\WinPEDeployFFUFiles\* to WinPE deploy media"
|
||||||
Copy-Item -Path "$FFUDevelopmentPath\WinPEDeployFFUFiles\*" -Destination "$WinPEFFUPath\mount" -Recurse -Force | Out-Null
|
Copy-Item -Path "$FFUDevelopmentPath\WinPEDeployFFUFiles\*" -Destination "$WinPEFFUPath\mount" -Recurse -Force | Out-Null
|
||||||
WriteLog 'Copy complete'
|
WriteLog 'Copy complete'
|
||||||
# If you need to add drivers (storage/keyboard most likely), remove the '#' from the below line and change the /Driver:Path to a folder of drivers
|
#If $CopyPEDrivers = $true, add drivers to WinPE media using dism
|
||||||
# & dism /image:$WinPEFFUPath\mount /Add-Driver /Driver:<Path to Drivers folder e.g c:\drivers> /Recurse
|
if ($CopyPEDrivers) {
|
||||||
|
WriteLog "Adding drivers to WinPE media"
|
||||||
|
try {
|
||||||
|
Add-WindowsDriver -Path "$WinPEFFUPath\Mount" -Driver "$FFUDevelopmentPath\PEDrivers" -Recurse -ErrorAction SilentlyContinue | Out-null
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
WriteLog 'Some drivers failed to be added to the FFU. This can be expected. Continuing.'
|
||||||
|
}
|
||||||
|
WriteLog "Adding drivers complete"
|
||||||
|
}
|
||||||
$WinPEISOName = 'WinPE_FFU_Deploy.iso'
|
$WinPEISOName = 'WinPE_FFU_Deploy.iso'
|
||||||
$Deploy = $false
|
$Deploy = $false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user