From ee1a57254fb0e246e01259b6c18d9e1de9c7cb39 Mon Sep 17 00:00:00 2001 From: WitherOrNot Date: Wed, 11 Nov 2026 04:23:16 -0500 Subject: [PATCH] Fix 4-6y ESU detection --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 12 +++++----- .../Activators/TSforge_Activation.cmd | 22 +++++++++++++++++-- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 068e16e..12fac3d 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -5097,8 +5097,6 @@ goto :ts_off ) echo "%allapps%" | findstr /i "14240489-7c2d-42ee-a167-4913ca4672da b705d67e-527a-4f11-b904-7be441066a22 0b533b5e-08b6-44f9-b885-c2de291ba456 4cd0ab30-73a4-4dde-972c-512f05be31df 22badfe6-7d55-4485-874b-7ec317442134" %nul1% && ( -call :dk_color %Red% "Checking Activated Licenses [Found Year 4-6 License]" -call :dk_color %Blue% "ESU licenses for years 4-6 prevent Windows update detection. MAS will automatically remove these licenses." set esuexistbutnosup= set esuexistsup= set esubadactids=1 @@ -11349,11 +11347,15 @@ if (-not $env:resetstuff) { if ($licenseStatus -eq 1) { $detected = $true - $pkeyId = [LibTSforge.SPP.SLApi]::GetInstalledPkeyID($eyactid) - [LibTSforge.SPP.SLApi]::UninstallProductKey($pkeyId) - Write-Host "Removed license for [$prodName]." -ForegroundColor White -BackgroundColor Darkgray + break } } + + if ($detected) { + Write-Host "Checking Activated Licenses [Found Year 4-6 License]" -ForegroundColor White -BackgroundColor Red + Write-Host "ESU licenses for years 4-6 prevent Windows update detection. MAS will automatically remove these licenses." -ForegroundColor White -BackgroundColor Blue + Write-Host "" + } } foreach ($tsactid in $tsactids) { diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 02b640a..0e0bfc1 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -1188,8 +1188,6 @@ goto :ts_off ) echo "%allapps%" | findstr /i "14240489-7c2d-42ee-a167-4913ca4672da b705d67e-527a-4f11-b904-7be441066a22 0b533b5e-08b6-44f9-b885-c2de291ba456 4cd0ab30-73a4-4dde-972c-512f05be31df 22badfe6-7d55-4485-874b-7ec317442134" %nul1% && ( -call :dk_color %Red% "Checking Activated Licenses [Found Year 4-6 License]" -call :dk_color %Blue% "ESU licenses for years 4-6 prevent Windows update detection. MAS will automatically remove these licenses." set esuexistbutnosup= set esuexistsup= set esubadactids=1 @@ -8923,6 +8921,26 @@ if (-not $env:resetstuff) { ) $detected = $false + foreach ($eyactid in $badesuactids) { + $licenseStatus = Get-WmiInfo -tsactid $eyactid -property "LicenseStatus" + $prodName = Get-WmiInfo -tsactid $eyactid -property "Name" + if ($prodName) { + $nameParts = $prodName -split ',', 2 + $prodName = if ($nameParts.Count -gt 1) { ($nameParts[1].Trim() -split '[ ,]')[0] } else { $null } + } + + if ($licenseStatus -eq 1) { + $detected = $true + break + } + } + + if ($detected) { + Write-Host "Checking Activated Licenses [Found Year 4-6 License]" -ForegroundColor White -BackgroundColor Red + Write-Host "ESU licenses for years 4-6 prevent Windows update detection. MAS will automatically remove these licenses." -ForegroundColor White -BackgroundColor Blue + Write-Host "" + } + foreach ($eyactid in $badesuactids) { $licenseStatus = Get-WmiInfo -tsactid $eyactid -property "LicenseStatus" $prodName = Get-WmiInfo -tsactid $eyactid -property "Name"