mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2025-11-09 11:43:28 +03:00
Fix KMS4k activation info on 26100.7019 and later
This commit is contained in:
@@ -1953,7 +1953,7 @@ if %_actman%==0 (if not defined showfix call :dk_color %Blue% "%_fixmsg%")
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
) else (
|
||||
if /i %tsmethod%==KMS4k if %winbuild% GEQ 26200 (
|
||||
if /i %tsmethod%==KMS4k if %winbuild% GEQ 26100 (
|
||||
echo:
|
||||
call :dk_color %Gray% "In Windows settings, you may see a renewal notification for activation that can be ignored."
|
||||
if /i %_actmethod%==Auto call :dk_color %Gray% "To avoid this notification, run the script with an internet connection to use the StaticCID method."
|
||||
@@ -8848,6 +8848,7 @@ namespace LibTSforge.PhysicalStore
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$binPath = "$env:_work\BIN\LibTSforge.dll"
|
||||
$psMajorVer = (Get-Host).Version.Major
|
||||
$build = [System.Environment]::OSVersion.Version.Build
|
||||
|
||||
if (Test-Path -LiteralPath $binPath) {
|
||||
Write-Host "LibTSforge.dll found in BIN folder. Loading the DLL..."
|
||||
@@ -8946,7 +8947,7 @@ if (-not $env:resetstuff) {
|
||||
}
|
||||
if ($env:tsmethod -eq "KMS4k") {
|
||||
$GracePeriodStatus = Get-WmiInfo -tsactid $tsactid -property "GracePeriodRemaining"
|
||||
if ($GracePeriodStatus -gt 259200) { $activated = 1 }
|
||||
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,6 +8962,9 @@ 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
|
||||
}
|
||||
}
|
||||
else {
|
||||
Write-Host "[$prodName] is permanently activated with $env:tsmethod." -ForegroundColor White -BackgroundColor DarkGreen
|
||||
|
||||
Reference in New Issue
Block a user