mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Forces capture media creation when installing apps
Removes the check for a pre-existing capture ISO when applications are being installed. This change simplifies the logic by unconditionally creating the capture media if `InstallApps` is enabled. This ensures the media is always correctly configured for capturing the virtual machine to an FFU.
This commit is contained in:
@@ -3781,14 +3781,8 @@ if ($CopyUnattend) {
|
||||
# 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."
|
||||
}
|
||||
WriteLog "InstallApps is true, but CreateCaptureMedia is false. Forcing to true to allow for VM capture to FFU."
|
||||
$CreateCaptureMedia = $true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user