From 4bf82f576c143ed89151c03219b667d1e13e99b8 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 9 Nov 2025 16:54:55 +0530 Subject: Improve KMS4k activation info --- .../Activators/TSforge_Activation.cmd | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'MAS/Separate-Files-Version') diff --git a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd index 8e6d534..fc5f28d 100644 --- a/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd @@ -8947,7 +8947,12 @@ if (-not $env:resetstuff) { } if ($env:tsmethod -eq "KMS4k") { $GracePeriodStatus = Get-WmiInfo -tsactid $tsactid -property "GracePeriodRemaining" - if ((($build -ge 26100 -and $GracePeriodStatus -ge 259200) -or ($build -lt 26100 -and $GracePeriodStatus -gt 259200))) { $activated = 1 } + if ($GracePeriodStatus -eq 259200 -or ([datetime]::Now.AddMinutes($GracePeriodStatus)).Year -gt 2038) { + if ((($build -ge 26100 -and $GracePeriodStatus -ge 259200) -or + ($build -lt 26100 -and $GracePeriodStatus -gt 259200))) { + $activated = 1 + } + } } else { $licenseStatus = Get-WmiInfo -tsactid $tsactid -property "LicenseStatus" @@ -8961,9 +8966,12 @@ if (-not $env:resetstuff) { } else { if ($env:tsmethod -eq "KMS4k") { - Write-Host "[$prodName] is activated till $([DateTime]::Now.AddMinutes($GracePeriodStatus).ToString('yyyy-MM-dd HH:mm:ss')) with $env:tsmethod." -ForegroundColor White -BackgroundColor DarkGreen if ($build -ge 26100) { - Write-Host "From build 26100.7019, Windows shows 180-day max, but activation lasts over 4,000 years, so it always stays at 180." -ForegroundColor White -BackgroundColor Darkgray + Write-Host "[$prodName] is activated with KMS4k for over 4,000 years." -ForegroundColor White -BackgroundColor DarkGreen + Write-Host "From build 26100.7019, Windows will always display and stay at 180 days remaining if the actual period is longer." -ForegroundColor White -BackgroundColor Darkgray + } + else { + Write-Host "[$prodName] is activated till $([DateTime]::Now.AddMinutes($GracePeriodStatus).ToString('yyyy-MM-dd HH:mm:ss')) with $env:tsmethod." -ForegroundColor White -BackgroundColor DarkGreen } } else { -- cgit v1.2.3