From 56c811ad89489447c136251d4a5c7434a94289a2 Mon Sep 17 00:00:00 2001 From: rbalsleyMSFT <53497092+rbalsleyMSFT@users.noreply.github.com> Date: Thu, 17 Jul 2025 12:22:04 -0700 Subject: [PATCH] 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. --- FFUDevelopment/BuildFFUVM.ps1 | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/FFUDevelopment/BuildFFUVM.ps1 b/FFUDevelopment/BuildFFUVM.ps1 index b4228ab..1676068 100644 --- a/FFUDevelopment/BuildFFUVM.ps1 +++ b/FFUDevelopment/BuildFFUVM.ps1 @@ -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 } }