wmic path %spp% where (Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL) get Name %_Nul2%| findstr /i Windows %_Nul1%&&(set_gvlk=1)||(set_gvlk=0)
wmic path %spp% where (ApplicationID='%_wApp%' and Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL) get Name %_Nul2%| findstr /i Windows %_Nul1%&&(set_gvlk=1)||(set_gvlk=0)
setgpr=0
if%winbuild%GEQ 10240 if%SkipKMS38%NEQ 0 if%_gvlk%EQU 1 for/f"tokens=2 delims=="%%A in('"wmic path %spp% where (ApplicationID='%_wApp%' and Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL) get GracePeriodRemaining /VALUE" %_Nul6%')doset"gpr=%%A"
if%gpr%NEQ 0 if%gpr%GTR 259200 (
@ -653,7 +653,7 @@ exit /b
:sppchkwin
set_office=0
if%winbuild%GEQ 14393 if%_gvlk%EQU 0 wmic path %spp% where (Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL) get Name %_Nul2%| findstr /i Windows %_Nul1%&&(set_gvlk=1)
if%winbuild%GEQ 14393 if%_gvlk%EQU 0 wmic path %spp% where (ApplicationID='%_wApp%' and Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL) get Name %_Nul2%| findstr /i Windows %_Nul1%&&(set_gvlk=1)
wmic path %spp% where ID='%app%' get LicenseStatus %_Nul2%| findstr "1"%_Nul1%&&(echo.&call:activate&exit /b)
wmic path %spp% where (PartialProductKey is not NULL) get ID %_Nul2%| findstr /i "%app%"%_Nul1%&&(echo.&call:activate&exit /b)
if%_gvlk%EQU 1 exit /b
@ -2116,7 +2116,7 @@ set "cTblClient="
set"cAvmClient="
set"ExpireMsg="
set"_xpr="
for/f"tokens=* delims="%%# in('"wmic path %~1 where (ID='%chkID%') get %~3 /value"^| findstr ^=') do set "%%#"
for/f"tokens=* delims="%%# in('"wmic path %~1 where ID='%chkID%' get %~3 /value" ^| findstr ^=') do set "%%#"
<li>wait until the operation is finished and Debug.log is created</li>
<li>upload or post the log file on the home page (MDL forums) for inspection</li>
</ul>
<p>If you have issues with Office activation, or got undesired or duplicate licenses (e.g. Office 2016 and 2019):</p>
<ul>
<li>Download Office Scrubber pack from <a href="https://forums.mydigitallife.net/posts/1466365/">here</a>.</li>
<li>To get rid of any conflicted licenses, run <strong>Uninstall_Licenses.cmd</strong>, then you must start any Office program to repair the licensing.</li>
<li>You may also try <strong>Uninstall_Keys.cmd</strong> for similar manner.</li>
<li>If you wish to remove Office and leftovers completely and start clean:<br />
uninstall Office normally from Control Panel / Programs and Feature<br />
then run <strong>Full_Scrub.cmd</strong><br />
afterward, install new Office.</li>
</ul>
<p>Final tip, you may try to rebuild licensing Tokens.dat as suggested in <a href="https://support.microsoft.com/en-us/help/2736303">KB2736303</a> (this will require to repair Office afterward).</p>