mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Ensure capture media exists for app installation
Forces the creation of capture media if app installation is enabled and the capture ISO does not already exist. This change prevents a failure later in the build process by ensuring the necessary media is available.
This commit is contained in:
@@ -3771,6 +3771,20 @@ if ($CopyUnattend) {
|
|||||||
WriteLog 'Unattend validation complete'
|
WriteLog 'Unattend validation complete'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# If InstallApps is true, we need capture media.
|
||||||
|
if ($InstallApps) {
|
||||||
|
if (-not $CreateCaptureMedia) {
|
||||||
|
if (-not (Test-Path -Path $CaptureISO)) {
|
||||||
|
WriteLog "InstallApps is true, but CreateCaptureMedia is false and the capture ISO does not exist at $CaptureISO."
|
||||||
|
WriteLog "Forcing CreateCaptureMedia to true to build the required capture media."
|
||||||
|
$CreateCaptureMedia = $true
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
WriteLog "InstallApps is true. Using existing capture media found at $CaptureISO."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#Override $InstallApps value if using ESD to build FFU. This is due to a strange issue where building the FFU
|
#Override $InstallApps value if using ESD to build FFU. This is due to a strange issue where building the FFU
|
||||||
#from vhdx doesn't work (you get an older style OOBE screen and get stuck in an OOBE reboot loop when hitting next).
|
#from vhdx doesn't work (you get an older style OOBE screen and get stuck in an OOBE reboot loop when hitting next).
|
||||||
#This behavior doesn't happen with WIM files.
|
#This behavior doesn't happen with WIM files.
|
||||||
|
|||||||
Reference in New Issue
Block a user