Compare commits

...

4 Commits

Author SHA1 Message Date
WindowsAddict bc781ad079 Remove KMS38 protection feature, it's not important. 2025-07-22 04:40:17 +05:30
WindowsAddict 43cceb366e Fix issues in checking expired Office products 2025-07-22 02:02:52 +05:30
WindowsAddict 39bcefa02b Improve error info 2025-07-22 00:55:14 +05:30
WindowsAddict 2b37400aa8 Detect unsupported languages for Office 2019 Perpetual VL update channel 2025-07-22 00:12:59 +05:30
8 changed files with 269 additions and 148 deletions

View File

@ -1768,14 +1768,16 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && (
set error=1
set showfix=1
call :dk_color2 %Red% "Checking Rearm " %Blue% "[System Restart Is Required]"
call :dk_color %Red% "Checking Rearm [System is ReArmed]"
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
)
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && (
set error=1
set showfix=1
call :dk_color2 %Red% "Checking ClipSVC " %Blue% "[System Restart Is Required]"
call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]"
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
)
@ -1817,9 +1819,9 @@ call :dk_color %Red% "Checking SkipRearm [Default 0 Value N
if %winbuild% GEQ 7600 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || (
call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found]"
call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]"
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers
call :dk_color2 %Blue% "Most likely caused by gaming spoofers. Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
set error=1
set showfix=1
)
@ -2762,8 +2764,15 @@ exit /b
:oh_expiredpreview
echo %_oIds% | find /i "Volume" %nul% || exit /b
for %%# in (%*) do (
if exist "!_oLPath!\ProPlus%%#PreviewVL_*.xrm-ms" if not exist "!_oLPath!\ProPlus%%#VL_*.xrm-ms" (
if %%#==2013 set _offver=
if %%#==2016 set _offver=
if %%#==2019 set _offver=2019
if %%#==2021 set _offver=2021
if %%#==2024 set _offver=2024
if exist "!_oLPath!\ProPlus!_offver!PreviewVL_*.xrm-ms" if not exist "!_oLPath!\ProPlus!_offver!VL_*.xrm-ms" (
set error=1
set showfix=1
call :dk_color %Red% "Checking Expired Preview Products [Office %%# Preview Found]"
@ -11697,9 +11706,6 @@ exit /b
:: To activate, run the script with "/KMS38" parameter or change 0 to 1 in below line
set _act=0
:: To remove KMS38 protection, run the script with /KMS38-RemoveProtection parameter or change 0 to 1 in below line
set _rem=0
:: To disable changing edition if current edition doesn't support KMS38 activation, change the value to 1 from 0 or run the script with "/KMS38-NoEditionChange" parameter
set _NoEditionChange=0
@ -11720,13 +11726,12 @@ if defined _args set _args=%_args:"=%
if defined _args (
for %%A in (%_args%) do (
if /i "%%A"=="/KMS38" set _act=1
if /i "%%A"=="/KMS38-RemoveProtection" set _rem=1
if /i "%%A"=="/KMS38-NoEditionChange" set _NoEditionChange=1
if /i "%%A"=="-el" set _elev=1
)
)
for %%A in (%_act% %_rem% %_NoEditionChange%) do (if "%%A"=="1" set _unattended=1)
for %%A in (%_act% %_NoEditionChange%) do (if "%%A"=="1" set _unattended=1)
::========================================================================================================================================
@ -11749,8 +11754,6 @@ goto dk_done
::========================================================================================================================================
if %_rem%==1 goto :k_uninstall
:k_menu
if %_unattended%==0 (
@ -11767,7 +11770,7 @@ echo:
echo [1] KMS38 Activation
echo ____________________________________________
echo:
echo [2] Remove KM38 Protection
echo [2] Remove KMS38 Activation
echo:
echo [0] %_exitmsg%
echo: ______________________________________________________
@ -12034,8 +12037,7 @@ echo:
%nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f
%nul% reg query "HKLM\%specific_kms%" && (
%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([scriptblock]::Create($f[1]))"
%nul% reg delete "HKLM\%specific_kms%" /f
call :dk_color %Blue% "Specific KMS registry is locked. %_fixmsg%"
)
set k_error=
@ -12201,18 +12203,6 @@ echo Removing the Added Specific KMS Host [Successful]
)
)
:: Protect KMS38 if opted by the user and conditions are correct
if defined _k38 (
%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([ScriptBlock]::Create($f[1])) -protect"
%nul% reg delete "HKLM\%specific_kms%" /f
%nul% reg query "HKLM\%specific_kms%" && (
echo Protect KMS38 From KMS [Successful] [Locked a Registry Key]
) || (
call :dk_color %Red% "Protect KMS38 From KMS [Failed to Lock a Registry Key]"
)
)
:: clipup.exe does not exist in server cor and acor editions by default, it was copied there with this script
if defined a_cor if exist "%_clipup%" del /f /q "%_clipup%" %nul%
@ -12242,57 +12232,30 @@ goto :dk_done
cls
if not defined terminal mode 99, 28
title Remove KMS38 Protection %masver%
title Remove KMS38 Activation %masver%
%nul% reg delete "HKLM\%specific_kms%" /f
%nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f
echo:
%nul% reg query "HKLM\%specific_kms%" && (
%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([scriptblock]::Create($f[1]))"
%nul% reg delete "HKLM\%specific_kms%" /f
call :dk_color %Red% "Failed to remove specific KMS Host."
call :dk_color %Blue% "%_fixmsg%"
) || (
echo Successfully removed specific KMS Host.
)
echo:
%nul% reg query "HKLM\%specific_kms%" && (
call :dk_color %Red% "Removing Specific KMS Host [Failed]"
) || (
echo Removing Specific KMS Host [Successful]
)
echo KMS38 activation doesn't modify any Windows components and doesn't install any new files.
echo:
call :dk_color %Gray% "If you want to reset the activation status,"
call :dk_color %Blue% "%_fixmsg%"
echo:
goto :dk_done
::========================================================================================================================================
:: This code runs to protect/undo below registry key for KMS38 protection
:: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f
:: KMS38 protection stops 180 days KMS Activation from replacing KMS38 activation
:regdel:
param (
[switch]$protect
)
$SID = New-Object System.Security.Principal.SecurityIdentifier('S-1-5-32-544')
$Admin = ($SID.Translate([System.Security.Principal.NTAccount])).Value
if($protect) {
$ruleArgs = @("$Admin", "Delete, SetValue", "ContainerInherit", "None", "Deny")
} else {
$ruleArgs = @("$Admin", "FullControl", "Allow")
}
$path = 'SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f'
$key = [Microsoft.Win32.RegistryKey]::OpenBaseKey('LocalMachine', 'Registry64').OpenSubKey($path, 'ReadWriteSubTree', 'ChangePermissions')
$acl = $key.GetAccessControl()
$rule = [System.Security.AccessControl.RegistryAccessRule]::new.Invoke($ruleArgs)
$acl.ResetAccessRule($rule)
$key.SetAccessControl($acl)
:regdel:
::========================================================================================================================================
:: Check KMS activation status
:k_actinfo
@ -16683,6 +16646,25 @@ echo:
call :dk_color %Blue% "Rebuilding SPP licensing tokens..."
echo:
echo Clearing KMS Cache...
echo:
call :_taskclear-cache
%nul% reg query "HKLM\%SPPk%\%_wApp%" && (
echo Removing KMS38 protection...
%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([scriptblock]::Create($f[1]))"
%nul% reg delete "HKLM\%SPPk%\%_wApp%" /f
%nul% reg query "HKLM\%SPPk%\%_wApp%" && (
call :dk_color %Red% "Failed to remove KMS38 protection."
) || (
echo Successfully removed KMS38 protection.
echo Successfully cleared KMS Cache.
)
) || (
echo Successfully cleared KMS Cache.
)
echo:
call :scandat check
if not defined token (
@ -17428,6 +17410,36 @@ $acl.SetAccessRule($rule)
$key.SetAccessControl($acl)
:regown:
::========================================================================================================================================
:: This code runs to undo below registry key KMS38 protection
:: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f
:: This option is not used in KMS38 anymore, it's here only to remove previous versions protection.
:regdel:
param (
[switch]$protect
)
$SID = New-Object System.Security.Principal.SecurityIdentifier('S-1-5-32-544')
$Admin = ($SID.Translate([System.Security.Principal.NTAccount])).Value
if($protect) {
$ruleArgs = @("$Admin", "Delete, SetValue", "ContainerInherit", "None", "Deny")
} else {
$ruleArgs = @("$Admin", "FullControl", "Allow")
}
$path = 'SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f'
$key = [Microsoft.Win32.RegistryKey]::OpenBaseKey('LocalMachine', 'Registry64').OpenSubKey($path, 'ReadWriteSubTree', 'ChangePermissions')
$acl = $key.GetAccessControl()
$rule = [System.Security.AccessControl.RegistryAccessRule]::new.Invoke($ruleArgs)
$acl.ResetAccessRule($rule)
$key.SetAccessControl($acl)
:regdel:
:+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
:change_winedition
@ -19136,6 +19148,17 @@ set buildchk=0
for /f "tokens=3 delims=." %%a in ("%build%") do set "buildchk=%%a"
call :oe_getlangs %_firstoId%
echo %targetchannel% | find /i "2019 VL" %nul% && (
for %%A in (en-gb es-mx fr-ca) do (
echo %_allLangs% | find /i "%%A" %nul% && (
%eline%
echo [%%A] language is not supported on the Office 2019 Perpetual VL update channel. Aborting...
goto :oe_goback
)
)
)
set "c2rcommand="%_c2rExe%" platform=%_oArch% culture=%_lang% productstoadd=%_firstoId%.16_%_allLangs% cdnbaseurl.16=http://officecdn.microsoft.com/pr/%targetFFN% baseurl.16=http://officecdn.microsoft.com/pr/%targetFFN% version.16=%build% mediatype.16=CDN sourcetype.16=CDN deliverymechanism=%targetFFN% %_firstoId%.excludedapps.16=%_firstoIdExcludelist% flt.useteamsaddon=disabled flt.usebingaddononinstall=disabled flt.usebingaddononupdate=disabled"
set "c2rclientupdate=!c2rcommand! scenario=CLIENTUPDATE"

View File

@ -1452,14 +1452,16 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && (
set error=1
set showfix=1
call :dk_color2 %Red% "Checking Rearm " %Blue% "[System Restart Is Required]"
call :dk_color %Red% "Checking Rearm [System is ReArmed]"
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
)
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && (
set error=1
set showfix=1
call :dk_color2 %Red% "Checking ClipSVC " %Blue% "[System Restart Is Required]"
call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]"
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
)
@ -1501,9 +1503,9 @@ call :dk_color %Red% "Checking SkipRearm [Default 0 Value N
if %winbuild% GEQ 7600 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || (
call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found]"
call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]"
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers
call :dk_color2 %Blue% "Most likely caused by gaming spoofers. Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
set error=1
set showfix=1
)

View File

@ -15,9 +15,6 @@
:: To activate, run the script with "/KMS38" parameter or change 0 to 1 in below line
set _act=0
:: To remove KMS38 protection, run the script with /KMS38-RemoveProtection parameter or change 0 to 1 in below line
set _rem=0
:: To disable changing edition if current edition doesn't support KMS38 activation, change the value to 1 from 0 or run the script with "/KMS38-NoEditionChange" parameter
set _NoEditionChange=0
@ -155,13 +152,12 @@ if defined _args set _args=%_args:re2=%
if defined _args (
for %%A in (%_args%) do (
if /i "%%A"=="/KMS38" set _act=1
if /i "%%A"=="/KMS38-RemoveProtection" set _rem=1
if /i "%%A"=="/KMS38-NoEditionChange" set _NoEditionChange=1
if /i "%%A"=="-el" set _elev=1
)
)
for %%A in (%_act% %_rem% %_NoEditionChange%) do (if "%%A"=="1" set _unattended=1)
for %%A in (%_act% %_NoEditionChange%) do (if "%%A"=="1" set _unattended=1)
::========================================================================================================================================
@ -382,8 +378,6 @@ cls
::========================================================================================================================================
if %_rem%==1 goto :k_uninstall
:k_menu
if %_unattended%==0 (
@ -400,7 +394,7 @@ echo:
echo [1] KMS38 Activation
echo ____________________________________________
echo:
echo [2] Remove KM38 Protection
echo [2] Remove KMS38 Activation
echo:
echo [0] %_exitmsg%
echo: ______________________________________________________
@ -667,8 +661,7 @@ echo:
%nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f
%nul% reg query "HKLM\%specific_kms%" && (
%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([scriptblock]::Create($f[1]))"
%nul% reg delete "HKLM\%specific_kms%" /f
call :dk_color %Blue% "Specific KMS registry is locked. %_fixmsg%"
)
set k_error=
@ -834,18 +827,6 @@ echo Removing the Added Specific KMS Host [Successful]
)
)
:: Protect KMS38 if opted by the user and conditions are correct
if defined _k38 (
%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([ScriptBlock]::Create($f[1])) -protect"
%nul% reg delete "HKLM\%specific_kms%" /f
%nul% reg query "HKLM\%specific_kms%" && (
echo Protect KMS38 From KMS [Successful] [Locked a Registry Key]
) || (
call :dk_color %Red% "Protect KMS38 From KMS [Failed to Lock a Registry Key]"
)
)
:: clipup.exe does not exist in server cor and acor editions by default, it was copied there with this script
if defined a_cor if exist "%_clipup%" del /f /q "%_clipup%" %nul%
@ -875,57 +856,30 @@ goto :dk_done
cls
if not defined terminal mode 99, 28
title Remove KMS38 Protection %masver%
title Remove KMS38 Activation %masver%
%nul% reg delete "HKLM\%specific_kms%" /f
%nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f
echo:
%nul% reg query "HKLM\%specific_kms%" && (
%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([scriptblock]::Create($f[1]))"
%nul% reg delete "HKLM\%specific_kms%" /f
call :dk_color %Red% "Failed to remove specific KMS Host."
call :dk_color %Blue% "%_fixmsg%"
) || (
echo Successfully removed specific KMS Host.
)
echo:
%nul% reg query "HKLM\%specific_kms%" && (
call :dk_color %Red% "Removing Specific KMS Host [Failed]"
) || (
echo Removing Specific KMS Host [Successful]
)
echo KMS38 activation doesn't modify any Windows components and doesn't install any new files.
echo:
call :dk_color %Gray% "If you want to reset the activation status,"
call :dk_color %Blue% "%_fixmsg%"
echo:
goto :dk_done
::========================================================================================================================================
:: This code runs to protect/undo below registry key for KMS38 protection
:: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f
:: KMS38 protection stops 180 days KMS Activation from replacing KMS38 activation
:regdel:
param (
[switch]$protect
)
$SID = New-Object System.Security.Principal.SecurityIdentifier('S-1-5-32-544')
$Admin = ($SID.Translate([System.Security.Principal.NTAccount])).Value
if($protect) {
$ruleArgs = @("$Admin", "Delete, SetValue", "ContainerInherit", "None", "Deny")
} else {
$ruleArgs = @("$Admin", "FullControl", "Allow")
}
$path = 'SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f'
$key = [Microsoft.Win32.RegistryKey]::OpenBaseKey('LocalMachine', 'Registry64').OpenSubKey($path, 'ReadWriteSubTree', 'ChangePermissions')
$acl = $key.GetAccessControl()
$rule = [System.Security.AccessControl.RegistryAccessRule]::new.Invoke($ruleArgs)
$acl.ResetAccessRule($rule)
$key.SetAccessControl($acl)
:regdel:
::========================================================================================================================================
:: Set variables
:dk_setvar
@ -1592,14 +1546,16 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && (
set error=1
set showfix=1
call :dk_color2 %Red% "Checking Rearm " %Blue% "[System Restart Is Required]"
call :dk_color %Red% "Checking Rearm [System is ReArmed]"
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
)
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && (
set error=1
set showfix=1
call :dk_color2 %Red% "Checking ClipSVC " %Blue% "[System Restart Is Required]"
call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]"
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
)
@ -1641,9 +1597,9 @@ call :dk_color %Red% "Checking SkipRearm [Default 0 Value N
if %winbuild% GEQ 7600 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || (
call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found]"
call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]"
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers
call :dk_color2 %Blue% "Most likely caused by gaming spoofers. Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
set error=1
set showfix=1
)

View File

@ -940,8 +940,15 @@ exit /b
:oh_expiredpreview
echo %_oIds% | find /i "Volume" %nul% || exit /b
for %%# in (%*) do (
if exist "!_oLPath!\ProPlus%%#PreviewVL_*.xrm-ms" if not exist "!_oLPath!\ProPlus%%#VL_*.xrm-ms" (
if %%#==2013 set _offver=
if %%#==2016 set _offver=
if %%#==2019 set _offver=2019
if %%#==2021 set _offver=2021
if %%#==2024 set _offver=2024
if exist "!_oLPath!\ProPlus!_offver!PreviewVL_*.xrm-ms" if not exist "!_oLPath!\ProPlus!_offver!VL_*.xrm-ms" (
set error=1
set showfix=1
call :dk_color %Red% "Checking Expired Preview Products [Office %%# Preview Found]"
@ -2127,14 +2134,16 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && (
set error=1
set showfix=1
call :dk_color2 %Red% "Checking Rearm " %Blue% "[System Restart Is Required]"
call :dk_color %Red% "Checking Rearm [System is ReArmed]"
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
)
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && (
set error=1
set showfix=1
call :dk_color2 %Red% "Checking ClipSVC " %Blue% "[System Restart Is Required]"
call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]"
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
)
@ -2176,9 +2185,9 @@ call :dk_color %Red% "Checking SkipRearm [Default 0 Value N
if %winbuild% GEQ 7600 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || (
call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found]"
call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]"
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers
call :dk_color2 %Blue% "Most likely caused by gaming spoofers. Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
set error=1
set showfix=1
)

View File

@ -1106,8 +1106,15 @@ exit /b
:oh_expiredpreview
echo %_oIds% | find /i "Volume" %nul% || exit /b
for %%# in (%*) do (
if exist "!_oLPath!\ProPlus%%#PreviewVL_*.xrm-ms" if not exist "!_oLPath!\ProPlus%%#VL_*.xrm-ms" (
if %%#==2013 set _offver=
if %%#==2016 set _offver=
if %%#==2019 set _offver=2019
if %%#==2021 set _offver=2021
if %%#==2024 set _offver=2024
if exist "!_oLPath!\ProPlus!_offver!PreviewVL_*.xrm-ms" if not exist "!_oLPath!\ProPlus!_offver!VL_*.xrm-ms" (
set error=1
set showfix=1
call :dk_color %Red% "Checking Expired Preview Products [Office %%# Preview Found]"
@ -3183,14 +3190,16 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && (
set error=1
set showfix=1
call :dk_color2 %Red% "Checking Rearm " %Blue% "[System Restart Is Required]"
call :dk_color %Red% "Checking Rearm [System is ReArmed]"
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
)
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && (
set error=1
set showfix=1
call :dk_color2 %Red% "Checking ClipSVC " %Blue% "[System Restart Is Required]"
call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]"
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
)
@ -3232,9 +3241,9 @@ call :dk_color %Red% "Checking SkipRearm [Default 0 Value N
if %winbuild% GEQ 7600 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || (
call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found]"
call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]"
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers
call :dk_color2 %Blue% "Most likely caused by gaming spoofers. Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
set error=1
set showfix=1
)

View File

@ -2021,8 +2021,15 @@ exit /b
:oh_expiredpreview
echo %_oIds% | find /i "Volume" %nul% || exit /b
for %%# in (%*) do (
if exist "!_oLPath!\ProPlus%%#PreviewVL_*.xrm-ms" if not exist "!_oLPath!\ProPlus%%#VL_*.xrm-ms" (
if %%#==2013 set _offver=
if %%#==2016 set _offver=
if %%#==2019 set _offver=2019
if %%#==2021 set _offver=2021
if %%#==2024 set _offver=2024
if exist "!_oLPath!\ProPlus!_offver!PreviewVL_*.xrm-ms" if not exist "!_oLPath!\ProPlus!_offver!VL_*.xrm-ms" (
set error=1
set showfix=1
call :dk_color %Red% "Checking Expired Preview Products [Office %%# Preview Found]"
@ -3190,14 +3197,16 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\PersistedTSReArmed" %nul% && (
set error=1
set showfix=1
call :dk_color2 %Red% "Checking Rearm " %Blue% "[System Restart Is Required]"
call :dk_color %Red% "Checking Rearm [System is ReArmed]"
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
)
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ClipSVC\Volatile\PersistedSystemState" %nul% && (
set error=1
set showfix=1
call :dk_color2 %Red% "Checking ClipSVC " %Blue% "[System Restart Is Required]"
call :dk_color %Red% "Checking ClipSVC PersistedSystemState [Found]"
call :dk_color %Blue% "Reboot your machine using the restart option to fix this error."
)
@ -3239,9 +3248,9 @@ call :dk_color %Red% "Checking SkipRearm [Default 0 Value N
if %winbuild% GEQ 7600 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || (
call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found]"
call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found] [Most likely caused by gaming spoofers]"
set fixes=%fixes% %mas%issues_due_to_gaming_spoofers
call :dk_color2 %Blue% "Most likely caused by gaming spoofers. Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers"
set error=1
set showfix=1
)

View File

@ -1158,6 +1158,17 @@ set buildchk=0
for /f "tokens=3 delims=." %%a in ("%build%") do set "buildchk=%%a"
call :oe_getlangs %_firstoId%
echo %targetchannel% | find /i "2019 VL" %nul% && (
for %%A in (en-gb es-mx fr-ca) do (
echo %_allLangs% | find /i "%%A" %nul% && (
%eline%
echo [%%A] language is not supported on the Office 2019 Perpetual VL update channel. Aborting...
goto :oe_goback
)
)
)
set "c2rcommand="%_c2rExe%" platform=%_oArch% culture=%_lang% productstoadd=%_firstoId%.16_%_allLangs% cdnbaseurl.16=http://officecdn.microsoft.com/pr/%targetFFN% baseurl.16=http://officecdn.microsoft.com/pr/%targetFFN% version.16=%build% mediatype.16=CDN sourcetype.16=CDN deliverymechanism=%targetFFN% %_firstoId%.excludedapps.16=%_firstoIdExcludelist% flt.useteamsaddon=disabled flt.usebingaddononinstall=disabled flt.usebingaddononupdate=disabled"
set "c2rclientupdate=!c2rcommand! scenario=CLIENTUPDATE"

View File

@ -697,6 +697,25 @@ echo:
call :dk_color %Blue% "Rebuilding SPP licensing tokens..."
echo:
echo Clearing KMS Cache...
echo:
call :_taskclear-cache
%nul% reg query "HKLM\%SPPk%\%_wApp%" && (
echo Removing KMS38 protection...
%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([scriptblock]::Create($f[1]))"
%nul% reg delete "HKLM\%SPPk%\%_wApp%" /f
%nul% reg query "HKLM\%SPPk%\%_wApp%" && (
call :dk_color %Red% "Failed to remove KMS38 protection."
) || (
echo Successfully removed KMS38 protection.
echo Successfully cleared KMS Cache.
)
) || (
echo Successfully cleared KMS Cache.
)
echo:
call :scandat check
if not defined token (
@ -1260,6 +1279,59 @@ exit /b
::========================================================================================================================================
:: Clean existing K-M-S cache from the registry
:_taskclear-cache
set w=
for %%# in (SppE%w%xtComObj.exe sppsvc.exe SLsvc.exe) do (
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" /f %nul%
)
set "OPPk=SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform"
if %winbuild% LSS 7600 (
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SL" %nul% && (
set "SPPk=SOFTWARE\Microsoft\Windows NT\CurrentVersion\SL"
)
)
if not defined SPPk (
set "SPPk=SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform"
)
set "slp=SoftwareLicensingProduct"
set "ospp=OfficeSoftwareProtectionProduct"
set "_wApp=55c92734-d682-4d71-983e-d6ec3f16059f"
set "_oApp=0ff1ce15-a989-479d-af46-f275c6370663"
set "_oA14=59a52881-a989-479d-af46-f275c6370663"
%nul% reg delete "HKLM\%SPPk%" /f /v KeyManagementServiceName
%nul% reg delete "HKLM\%SPPk%" /f /v KeyManagementServiceName /reg:32
%nul% reg delete "HKLM\%SPPk%" /f /v KeyManagementServicePort
%nul% reg delete "HKLM\%SPPk%" /f /v KeyManagementServicePort /reg:32
%nul% reg delete "HKLM\%SPPk%" /f /v DisableDnsPublishing
%nul% reg delete "HKLM\%SPPk%" /f /v DisableKeyManagementServiceHostCaching
%nul% reg delete "HKLM\%SPPk%\%_wApp%" /f
if %winbuild% GEQ 9200 (
%nul% reg delete "HKLM\%SPPk%\%_oApp%" /f
%nul% reg delete "HKLM\%SPPk%\%_oApp%" /f /reg:32
)
if %winbuild% GEQ 9600 (
%nul% reg delete "HKU\S-1-5-20\%SPPk%\%_wApp%" /f
%nul% reg delete "HKU\S-1-5-20\%SPPk%\%_oApp%" /f
)
%nul% reg delete "HKLM\%OPPk%" /f /v KeyManagementServiceName
%nul% reg delete "HKLM\%OPPk%" /f /v KeyManagementServicePort
%nul% reg delete "HKLM\%OPPk%" /f /v DisableDnsPublishing
%nul% reg delete "HKLM\%OPPk%" /f /v DisableKeyManagementServiceHostCaching
%nul% reg delete "HKLM\%OPPk%\%_oA14%" /f
%nul% reg delete "HKLM\%OPPk%\%_oApp%" /f
exit /b
::========================================================================================================================================
:: Fix SPP related registry and folder permissions
:fixsppperms:
@ -1471,6 +1543,36 @@ $key.SetAccessControl($acl)
::========================================================================================================================================
:: This code runs to undo below registry key KMS38 protection
:: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f
:: This option is not used in KMS38 anymore, it's here only to remove previous versions protection.
:regdel:
param (
[switch]$protect
)
$SID = New-Object System.Security.Principal.SecurityIdentifier('S-1-5-32-544')
$Admin = ($SID.Translate([System.Security.Principal.NTAccount])).Value
if($protect) {
$ruleArgs = @("$Admin", "Delete, SetValue", "ContainerInherit", "None", "Deny")
} else {
$ruleArgs = @("$Admin", "FullControl", "Allow")
}
$path = 'SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f'
$key = [Microsoft.Win32.RegistryKey]::OpenBaseKey('LocalMachine', 'Registry64').OpenSubKey($path, 'ReadWriteSubTree', 'ChangePermissions')
$acl = $key.GetAccessControl()
$rule = [System.Security.AccessControl.RegistryAccessRule]::new.Invoke($ruleArgs)
$acl.ResetAccessRule($rule)
$key.SetAccessControl($acl)
:regdel:
::========================================================================================================================================
:dk_color
if %_NCS% EQU 1 (