Added comment for .NET updates and added condition in CaptureFFU.ps1 to fix naming for LTSC 2019

This commit is contained in:
Zehadi Alam
2025-05-18 22:06:40 -04:00
parent 2659336ee9
commit b530ac5a5c
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -4731,6 +4731,8 @@ try {
if ($WindowsRelease -in 2016, 2019, 2021 -and $WindowsSKU -like "*LTSC") { if ($WindowsRelease -in 2016, 2019, 2021 -and $WindowsSKU -like "*LTSC") {
$Name = "Cumulative update for .net framework windows 10 $WindowsVersion $WindowsArch" $Name = "Cumulative update for .net framework windows 10 $WindowsVersion $WindowsArch"
$NETPath = Join-Path -Path $KBPath -ChildPath "NET" $NETPath = Join-Path -Path $KBPath -ChildPath "NET"
# These LTSC editions include multiple .NET updates, so a separate directory is created and specified to allow DISM
# to install them all, instead of specifying each .NET update individually.
if (-not (Test-Path -Path $NETPath)) { if (-not (Test-Path -Path $NETPath)) {
WriteLog "Creating $NETPath" WriteLog "Creating $NETPath"
New-Item -Path $NETPath -ItemType Directory -Force | Out-Null New-Item -Path $NETPath -ItemType Directory -Force | Out-Null
@@ -12,10 +12,10 @@ reg load "HKLM\FFU" $Software
$SKU = Get-ItemPropertyValue -Path 'HKLM:\FFU\Microsoft\Windows NT\CurrentVersion\' -Name 'EditionID' $SKU = Get-ItemPropertyValue -Path 'HKLM:\FFU\Microsoft\Windows NT\CurrentVersion\' -Name 'EditionID'
[int]$CurrentBuild = Get-ItemPropertyValue -Path 'HKLM:\FFU\Microsoft\Windows NT\CurrentVersion\' -Name 'CurrentBuild' [int]$CurrentBuild = Get-ItemPropertyValue -Path 'HKLM:\FFU\Microsoft\Windows NT\CurrentVersion\' -Name 'CurrentBuild'
if ($CurrentBuild -notin 14393, 17763) { $InstallationType = Get-ItemPropertyValue -Path 'HKLM:\FFU\Microsoft\Windows NT\CurrentVersion\' -Name 'InstallationType'
if ($CurrentBuild -notin 14393, 17763 -and $InstallationType -ne "Server") {
$WindowsVersion = Get-ItemPropertyValue -Path 'HKLM:\FFU\Microsoft\Windows NT\CurrentVersion\' -Name 'DisplayVersion' $WindowsVersion = Get-ItemPropertyValue -Path 'HKLM:\FFU\Microsoft\Windows NT\CurrentVersion\' -Name 'DisplayVersion'
} }
$InstallationType = Get-ItemPropertyValue -Path 'HKLM:\FFU\Microsoft\Windows NT\CurrentVersion\' -Name 'InstallationType'
$BuildDate = Get-Date -uformat %b%Y $BuildDate = Get-Date -uformat %b%Y
$SKU = switch ($SKU) { $SKU = switch ($SKU) {