mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Merge branch '2405.1' into feature-reduce-ffu-size
This commit is contained in:
@@ -2265,10 +2265,13 @@ try {
|
||||
if ($UpdateLatestCU -or $UpdateLatestNet) {
|
||||
try {
|
||||
WriteLog "Adding KBs to $WindowsPartition"
|
||||
Add-WindowsPackage -Path $WindowsPartition -PackagePath $KBPath | Out-Null
|
||||
Add-WindowsPackage -Path $WindowsPartition -PackagePath $KBPath -PreventPending | Out-Null
|
||||
WriteLog "KBs added to $WindowsPartition"
|
||||
WriteLog "Removing $KBPath"
|
||||
Remove-Item -Path $KBPath -Recurse -Force | Out-Null
|
||||
WriteLog "Clean Up the WinSxS Folder"
|
||||
Dism /Image:$WindowsPartition /Cleanup-Image /StartComponentCleanup /ResetBase | Out-Null
|
||||
WriteLog "Clean Up the WinSxS Folder completed"
|
||||
}
|
||||
catch {
|
||||
Write-Host "Adding KB to VHDX failed with error $_"
|
||||
@@ -2524,4 +2527,4 @@ If ($CleanupAppsISO) {
|
||||
#Clean up dirty.txt file
|
||||
Remove-Item -Path .\dirty.txt -Force | out-null
|
||||
Write-Host "Script complete"
|
||||
WriteLog "Script complete"
|
||||
WriteLog "Script complete"
|
||||
|
||||
Reference in New Issue
Block a user