From 6abc6f9d1a960f290fb0b14a042f8bddbccf2f07 Mon Sep 17 00:00:00 2001 From: rbalsleyMSFT <53497092+rbalsleyMSFT@users.noreply.github.com> Date: Mon, 2 Dec 2024 18:34:58 -0800 Subject: [PATCH] Fixed an error with removing the office variable when capturing the FFU --- FFUDevelopment/WinPECaptureFFUFiles/CaptureFFU.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/FFUDevelopment/WinPECaptureFFUFiles/CaptureFFU.ps1 b/FFUDevelopment/WinPECaptureFFUFiles/CaptureFFU.ps1 index 986a417..b51ba5a 100644 --- a/FFUDevelopment/WinPECaptureFFUFiles/CaptureFFU.ps1 +++ b/FFUDevelopment/WinPECaptureFFUFiles/CaptureFFU.ps1 @@ -88,11 +88,13 @@ if ($CustomFFUNameTemplate) { #Unload Registry Set-Location X:\ Remove-Variable SKU +Remove-Variable CurrentBuild if ($CurrentBuild -notin 14393, 17763) { Remove-Variable WindowsVersion } -Remove-Variable CurrentBuild -Remove-Variable Office +if($Office) { + Remove-Variable Office +} reg unload "HKLM\FFU" #This prevents Critical Process Died errors you can have during deployment of the FFU - may not happen during capture from WinPE, but adding here to be consistent with VHDX capture Write-Host "Sleeping for 60 seconds to allow registry to unload prior to capture"