summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWindowsAddict2025-11-09 11:24:55 +0000
committerWindowsAddict2025-11-09 11:24:55 +0000
commit4bf82f576c143ed89151c03219b667d1e13e99b8 (patch)
tree6a5c83c9d7832ebc01a63ccefcde67a5f113ce39
parent1e444671be3b0a53681737b00b09c454894f6999 (diff)
downloadMicrosoft-Activation-Scripts-4bf82f576c143ed89151c03219b667d1e13e99b8.zip
Improve KMS4k activation info
-rw-r--r--MAS/All-In-One-Version-KL/MAS_AIO.cmd14
-rw-r--r--MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd14
2 files changed, 22 insertions, 6 deletions
diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd
index 6aaca53..ced64c8 100644
--- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd
+++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd
@@ -11374,7 +11374,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"
@@ -11388,9 +11393,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 {
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 {