>if 1 EQU 1 ( if defined _args echo /d /a echo "!_batf!" ) /d /a "E:\Downloads\OfficeRTool.2021June22\KMS_VL_ALL_AIO.cmd" >if exist "C:\Users\Public\ReadMeAIO.html" del /f /q "C:\Users\Public\ReadMeAIO.html" >if exist "C:\Windows\Temp\'" del /f /q "C:\Windows\Temp\'" >if exist "C:\Windows\Temp\`.txt" del /f /q "C:\Windows\Temp\`.txt" >set _verb=0 >set "_wApp=55c92734-d682-4d71-983e-d6ec3f16059f" >set "_oApp=0ff1ce15-a989-479d-af46-f275c6370663" >set "_oA14=59a52881-a989-479d-af46-f275c6370663" >set "IFEO=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options" >set "OPPk=SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" >set "SPPk=SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" >set _Hook="C:\Windows\System32\SppExtComObjHook.dll" >set w7inf=C:\Windows\Migration\WTR\KMS_VL_ALL.inf >set "_TaskEx=\Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger" >set "_TaskOs=\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTaskLogon" >set "line1=============================================================" >set "line2=************************************************************" >set "line3=____________________________________________________________" >set "line4=__________________________________________________" >set SSppHook=0 >for /F %A in ('dir /b /ad C:\Windows\System32\spp\tokens\skus') do ( if 18363 GEQ 9200 if exist "C:\Windows\System32\spp\tokens\skus\%A\*GVLK*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\%A\*VLKMS*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\%A\*VL-BYPASS*.xrm-ms" set SSppHook=1 ) >( if 18363 GEQ 9200 if exist "C:\Windows\System32\spp\tokens\skus\csvlk-pack\*GVLK*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\csvlk-pack\*VLKMS*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\csvlk-pack\*VL-BYPASS*.xrm-ms" set SSppHook=1 ) >( if 18363 GEQ 9200 if exist "C:\Windows\System32\spp\tokens\skus\Education\*GVLK*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\Education\*VLKMS*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\Education\*VL-BYPASS*.xrm-ms" set SSppHook=1 ) >( if 18363 GEQ 9200 if exist "C:\Windows\System32\spp\tokens\skus\Enterprise\*GVLK*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\Enterprise\*VLKMS*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\Enterprise\*VL-BYPASS*.xrm-ms" set SSppHook=1 ) >( if 18363 GEQ 9200 if exist "C:\Windows\System32\spp\tokens\skus\IoTEnterprise\*GVLK*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\IoTEnterprise\*VLKMS*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\IoTEnterprise\*VL-BYPASS*.xrm-ms" set SSppHook=1 ) >( if 18363 GEQ 9200 if exist "C:\Windows\System32\spp\tokens\skus\Professional\*GVLK*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\Professional\*VLKMS*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\Professional\*VL-BYPASS*.xrm-ms" set SSppHook=1 ) >( if 18363 GEQ 9200 if exist "C:\Windows\System32\spp\tokens\skus\ProfessionalCountrySpecific\*GVLK*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\ProfessionalCountrySpecific\*VLKMS*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\ProfessionalCountrySpecific\*VL-BYPASS*.xrm-ms" set SSppHook=1 ) >( if 18363 GEQ 9200 if exist "C:\Windows\System32\spp\tokens\skus\ProfessionalEducation\*GVLK*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\ProfessionalEducation\*VLKMS*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\ProfessionalEducation\*VL-BYPASS*.xrm-ms" set SSppHook=1 ) >( if 18363 GEQ 9200 if exist "C:\Windows\System32\spp\tokens\skus\ProfessionalSingleLanguage\*GVLK*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\ProfessionalSingleLanguage\*VLKMS*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\ProfessionalSingleLanguage\*VL-BYPASS*.xrm-ms" set SSppHook=1 ) >( if 18363 GEQ 9200 if exist "C:\Windows\System32\spp\tokens\skus\ProfessionalWorkstation\*GVLK*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\ProfessionalWorkstation\*VLKMS*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\ProfessionalWorkstation\*VL-BYPASS*.xrm-ms" set SSppHook=1 ) >( if 18363 GEQ 9200 if exist "C:\Windows\System32\spp\tokens\skus\ServerRdsh\*GVLK*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\ServerRdsh\*VLKMS*.xrm-ms" set SSppHook=1 if 18363 LSS 9200 if exist "C:\Windows\System32\spp\tokens\skus\ServerRdsh\*VL-BYPASS*.xrm-ms" set SSppHook=1 ) >set OsppHook=1 >sc query osppsvc [SC] EnumQueryServicesStatus:OpenService FAILED 1060: The specified service does not exist as an installed service. >if 1060 EQU 1060 set OsppHook=0 >set ESU_KMS=0 >if 18363 LSS 9200 for /F %A in ('dir /b /ad C:\Windows\System32\spp\tokens\channels') do (if exist "C:\Windows\System32\spp\tokens\channels\%A\*VL-BYPASS*.xrm-ms" set ESU_KMS=1 ) >if 0 EQU 1 (set "adoff=and LicenseDependsOn is NULL" & set "addon=and LicenseDependsOn is not NULL" ) else (set "adoff=" & set "addon=" ) >set ESU_EDT=0 >if 0 EQU 1 for %A in (Enterprise EnterpriseE EnterpriseN Professional ProfessionalE ProfessionalN Ultimate UltimateE UltimateN) do (if exist "C:\Windows\System32\spp\tokens\skus\Security-SPP-Component-SKU-%A\*.xrm-ms" set ESU_EDT=1 ) >set ESU_ADD=0 >if 18363 GEQ 9200 ( set OSType=Win8 set SppVer=SppExtComObj.exe ) else if 18363 GEQ 7600 ( set OSType=Win7 set SppVer=sppsvc.exe ) else (goto :UnsupportedVersion ) >if Win8 EQU Win8 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\sppsvc.exe" && ( reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\sppsvc.exe" /f call :StopService sppsvc ) ERROR: The system was unable to find the specified registry key or value. >set _uRI=10080 >set _uAI=120 >set _dDbg=No >if 1 EQU 0 if 1 EQU 0 set ActWindows=1 >if 1 EQU 1 if not defined fAUR set fAUR=0 & set External=0 >if 1 EQU 1 if not defined fAUR set fAUR=0 & set External=0 >if not defined fAUR if not defined rAUR goto :MainMenu >if defined rAUR (set _verb=1 & cls & call :RemoveHook & goto :cCache ) >set Unattend=1 >set _ReAR=0 >set _AUR=0 >if exist "C:\Windows\System32\SppExtComObjHook.dll" dir /b /al "C:\Windows\System32\SppExtComObjHook.dll" || (reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /v VerifierFlags && (set _AUR=1 ) || (reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe" /v VerifierFlags && set _AUR=1 ) ) >if 1 EQU 1 (set _ReAR=1 & if 0 EQU 0 (set _AUR=1 & set _verb=1 & set _rtr=DoActivate & cls & goto :InstallHook ) else (set _verb=0 & set _rtr=DoActivate & cls & goto :InstallHook ) ) >if No == Yes ( set "_para=/d /a" if 1 EQU 0 set "_para=!_para! /o" if 1 EQU 0 set "_para=!_para! /w" if 1 EQU 0 set "_para=!_para! /x" goto :DoDebug ) >if 1 EQU 1 ( if 0 EQU 0 if 1 EQU 0 ( mode con cols=100 lines=32 powershell -nop -c "&{$W=$Host.UI.RawUI.WindowSize;$B=$Host.UI.RawUI.BufferSize;$W.Height=31;$B.Height=300;$Host.UI.RawUI.WindowSize=$W;$Host.UI.RawUI.BufferSize=$B;}" if 1 EQU 0 title KMS_VL_ALL_AIO v46 ) echo. & echo ____________________________________________________________ & echo. echo Installing Local KMS Emulator... ) ____________________________________________________________ Installing Local KMS Emulator... >set "AddExc=" >set "_qr=WMIC /NAMESPACE:\\root\Microsoft\Windows\Defender PATH MSFT_MpPreference call Add ExclusionPath="C:\Windows\System32\SppExtComObjHook.dll" Force=True" >if 0 NEQ 0 set "_qr=cscript.exe //NoLogo //Job:MPS "KMS_VL_ALL_AIO.cmd?.wsf" Add "C:\Windows\System32\SppExtComObjHook.dll"" >if 18363 GEQ 9600 (WMIC /NAMESPACE:\\root\Microsoft\Windows\Defender PATH MSFT_MpPreference call Add ExclusionPath="C:\Windows\System32\SppExtComObjHook.dll" Force=True && set "AddExc= and Windows Defender exclusion" ) Executing (MSFT_MpPreference)->Add() Method execution successful. >if 1 EQU 1 ( echo. echo Adding File and Windows Defender exclusion... echo C:\Windows\System32\SppExtComObjHook.dll ) Adding File and Windows Defender exclusion... C:\Windows\System32\SppExtComObjHook.dll >if 1 EQU 1 ( call :StopService sppsvc if 0 NEQ 0 call :StopService osppsvc ) >sc query sppsvc | find /i "STOPPED" || net stop sppsvc /y STATE : 1 STOPPED >sc query sppsvc | find /i "STOPPED" || sc stop sppsvc STATE : 1 STOPPED >goto :eof >for %# in (SppExtComObjHookAvrf.dll SppExtComObjHook.dll SppExtComObjPatcher.dll SppExtComObjPatcher.exe) do ( if exist "C:\Windows\System32\%#" del /f /q "C:\Windows\System32\%#" if exist "C:\Windows\SysWOW64\%#" del /f /q "C:\Windows\SysWOW64\%#" ) >( if exist "C:\Windows\System32\SppExtComObjHookAvrf.dll" del /f /q "C:\Windows\System32\SppExtComObjHookAvrf.dll" if exist "C:\Windows\SysWOW64\SppExtComObjHookAvrf.dll" del /f /q "C:\Windows\SysWOW64\SppExtComObjHookAvrf.dll" ) >( if exist "C:\Windows\System32\SppExtComObjHook.dll" del /f /q "C:\Windows\System32\SppExtComObjHook.dll" if exist "C:\Windows\SysWOW64\SppExtComObjHook.dll" del /f /q "C:\Windows\SysWOW64\SppExtComObjHook.dll" ) >( if exist "C:\Windows\System32\SppExtComObjPatcher.dll" del /f /q "C:\Windows\System32\SppExtComObjPatcher.dll" if exist "C:\Windows\SysWOW64\SppExtComObjPatcher.dll" del /f /q "C:\Windows\SysWOW64\SppExtComObjPatcher.dll" ) >( if exist "C:\Windows\System32\SppExtComObjPatcher.exe" del /f /q "C:\Windows\System32\SppExtComObjPatcher.exe" if exist "C:\Windows\SysWOW64\SppExtComObjPatcher.exe" del /f /q "C:\Windows\SysWOW64\SppExtComObjPatcher.exe" ) >setlocal >set "TMP=C:\Windows\Temp" >set "TEMP=C:\Windows\Temp" >powershell -nop -c "$d='C:\Windows\System32';$f=[IO.File]::ReadAllText('!_batp!') -split ':embdbin\:.*';iex ($f[1]);X 2" >endlocal >if 1 EQU 0 title KMS_VL_ALL_AIO v46 >if 1 EQU 1 ( echo. echo Adding Registry Keys... ) Adding Registry Keys... >if 1 NEQ 0 call :CreateIFEOEntry SppExtComObj.exe >if 1 EQU 1 (echo [HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe] ) [HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe] >reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v Debugger 1>nul 2>nul >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v VerifierDlls /t REG_SZ /d "SppExtComObjHook.dll" The operation completed successfully. >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v VerifierDebug /t REG_DWORD /d 0x00000000 The operation completed successfully. >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v VerifierFlags /t REG_DWORD /d 0x80000000 The operation completed successfully. >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v GlobalFlag /t REG_DWORD /d 0x00000100 The operation completed successfully. >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v KMS_Emulation /t REG_DWORD /d 1 The operation completed successfully. >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v KMS_ActivationInterval /t REG_DWORD /d 120 The operation completed successfully. >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v KMS_RenewalInterval /t REG_DWORD /d 10080 The operation completed successfully. >if /I SppExtComObj.exe EQU SppExtComObj.exe if 18363 GEQ 9600 (reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v KMS_HWID /t REG_QWORD /d "0x3A1C049600B60076" ) The operation completed successfully. >goto :eof >if 1 EQU 1 (call :CreateIFEOEntry osppsvc.exe ) else (if 0 NEQ 0 call :CreateIFEOEntry osppsvc.exe ) >if 1 EQU 1 (echo [HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe] ) [HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe] >reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe" /f /v Debugger 1>nul 2>nul >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe" /f /v VerifierDlls /t REG_SZ /d "SppExtComObjHook.dll" The operation completed successfully. >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe" /f /v VerifierDebug /t REG_DWORD /d 0x00000000 The operation completed successfully. >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe" /f /v VerifierFlags /t REG_DWORD /d 0x80000000 The operation completed successfully. >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe" /f /v GlobalFlag /t REG_DWORD /d 0x00000100 The operation completed successfully. >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe" /f /v KMS_Emulation /t REG_DWORD /d 1 The operation completed successfully. >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe" /f /v KMS_ActivationInterval /t REG_DWORD /d 120 The operation completed successfully. >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe" /f /v KMS_RenewalInterval /t REG_DWORD /d 10080 The operation completed successfully. >if /I osppsvc.exe EQU SppExtComObj.exe if 18363 GEQ 9600 (reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe" /f /v KMS_HWID /t REG_QWORD /d "0x3A1C049600B60076" ) >goto :eof >if 1 EQU 1 if Win8 EQU Win7 ( call :CreateIFEOEntry SppExtComObj.exe if 1 NEQ 0 if not exist C:\Windows\Migration\WTR\KMS_VL_ALL.inf ( if 1 EQU 1 (echo. & echo Adding migration fail-safe... & echo C:\Windows\Migration\WTR\KMS_VL_ALL.inf ) if not exist "C:\Windows\Migration\WTR" md "C:\Windows\Migration\WTR" ( echo [WTR] echo Name="KMS_VL_ALL" echo. echo [WTR.W8] echo NotifyUser="No" echo. echo [System.Registry] echo "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\sppsvc.exe [*]" ) 1>C:\Windows\Migration\WTR\KMS_VL_ALL.inf ) ) >if 1 EQU 1 if Win8 EQU Win8 call :CreateTask >schtasks /query /tn "\Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger" || (schtasks /query /tn "\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTaskLogon" && ( schtasks /query /tn "\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTaskLogon" /xml 1>"!_temp!\SvcTrigger.xml" schtasks /create /tn "\Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger" /xml "!_temp!\SvcTrigger.xml" /f schtasks /change /tn "\Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger" /enable del /f /q "!_temp!\SvcTrigger.xml" ) ) ERROR: The system cannot find the file specified. Folder: \Microsoft\Windows\SoftwareProtectionPlatform TaskName Next Run Time Status ======================================== ====================== =============== SvcRestartTaskLogon N/A Ready SUCCESS: The scheduled task "\Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger" has successfully been created. INFO: Scheduled task "\Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger" has already been enabled. SUCCESS: The parameters of scheduled task "\Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger" have been changed. >schtasks /query /tn "\Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger" || ( pushd C:\Windows\Temp powershell -nop -c "$f=[IO.File]::ReadAllText('!_batp!') -split ':spptask\:.*'; [IO.File]::WriteAllText('SvcTrigger.xml',$f[1].Trim(),[System.Text.Encoding]::Unicode)" if 1 EQU 0 title KMS_VL_ALL_AIO v46 popd if exist "!_temp!\SvcTrigger.xml" ( schtasks /create /tn "\Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger" /xml "!_temp!\SvcTrigger.xml" /f del /f /q "!_temp!\SvcTrigger.xml" ) ) Folder: \Microsoft\Windows\SoftwareProtectionPlatform TaskName Next Run Time Status ======================================== ====================== =============== SvcTrigger N/A Ready >schtasks /query /tn "\Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger" && if 1 EQU 1 ( echo. echo Adding Scheduled Task... echo \Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger ) Folder: \Microsoft\Windows\SoftwareProtectionPlatform TaskName Next Run Time Status ======================================== ====================== =============== SvcTrigger N/A Ready Adding Scheduled Task... \Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger >goto :eof >if 1 EQU 1 echo. & echo ____________________________________________________________ & echo. ____________________________________________________________ >goto :DoActivate >if No == Yes ( set "_para=/d" if 1 EQU 0 set "_para=!_para! /o" if 1 EQU 0 set "_para=!_para! /w" if 1 EQU 0 set "_para=!_para! /x" if 0 EQU 1 set "_para=!_para! /e 0.0.0.0" if 0 EQU 0 if 1 EQU 0 set "_para=!_para! /m" if 0 EQU 0 if 1 EQU 1 set "_para=!_para! /a" goto :DoDebug ) >if 0 EQU 1 (if "0.0.0.0" == "0.0.0.0" set External=0 ) >if 0 EQU 1 (set _AUR=1 ) >if 0 EQU 0 (set KMS_IP=0.0.0.0 ) >if 1 EQU 0 ( set KMS_RenewalInterval=43200 set KMS_ActivationInterval=43200 ) else ( set KMS_RenewalInterval=10080 set KMS_ActivationInterval=120 ) >if 0 EQU 1 (color 8F & set "mode=External ^(0.0.0.0^)" ) else (if 1 EQU 0 (color 1F & set "mode=Manual" ) else (color 07 & set "mode=Auto Renewal" ) ) >if 1 EQU 0 (if 1 EQU 0 (title KMS_VL_ALL_AIO v46 ) else (set "_title=KMS_VL_ALL_AIO v46 : Auto Renewal" & title KMS_VL_ALL_AIO v46 : Auto Renewal ) ) else ( echo. echo Running KMS_VL_ALL_AIO v46 ) Running KMS_VL_ALL_AIO v46 >if 0 EQU 0 if 1 EQU 0 ( powershell -nop -c "&{$W=$Host.UI.RawUI.WindowSize;$B=$Host.UI.RawUI.BufferSize;$W.Height=31;$B.Height=300;$Host.UI.RawUI.WindowSize=$W;$Host.UI.RawUI.BufferSize=$B;}" if 1 EQU 0 title KMS_VL_ALL_AIO v46 ) >if 18363 GEQ 9600 ( reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" /v NoGenTicket /t REG_DWORD /d 1 /f if 18363 EQU 14393 reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" /v NoAcquireGT /t REG_DWORD /d 1 /f ) The operation completed successfully. >echo. >echo Activation Mode: Auto Renewal Activation Mode: Auto Renewal >call :StopService sppsvc >sc query sppsvc | find /i "STOPPED" || net stop sppsvc /y STATE : 1 STOPPED >sc query sppsvc | find /i "STOPPED" || sc stop sppsvc STATE : 1 STOPPED >goto :eof >if 0 NEQ 0 call :StopService osppsvc >if 0 EQU 0 if 1 EQU 0 (set _verb=0 & set _rtr=ReturnHook & goto :InstallHook ) >if 0 EQU 0 if 1 EQU 1 ( call :UpdateIFEOEntry SppExtComObj.exe call :UpdateIFEOEntry osppsvc.exe ) >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v KMS_ActivationInterval /t REG_DWORD /d 120 The operation completed successfully. >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v KMS_RenewalInterval /t REG_DWORD /d 10080 The operation completed successfully. >if /I SppExtComObj.exe EQU SppExtComObj.exe if 18363 GEQ 9600 (reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v KMS_HWID /t REG_QWORD /d "0x3A1C049600B60076" ) The operation completed successfully. >if /I SppExtComObj.exe EQU sppsvc.exe ( reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v KMS_ActivationInterval /t REG_DWORD /d 120 reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v KMS_RenewalInterval /t REG_DWORD /d 10080 ) >if /I SppExtComObj.exe EQU osppsvc.exe ( reg add "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" /f /v KeyManagementServiceName /t REG_SZ /d "0.0.0.0" reg add "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" /f /v KeyManagementServicePort /t REG_SZ /d "1688" ) >goto :eof >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe" /f /v KMS_ActivationInterval /t REG_DWORD /d 120 The operation completed successfully. >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe" /f /v KMS_RenewalInterval /t REG_DWORD /d 10080 The operation completed successfully. >if /I osppsvc.exe EQU SppExtComObj.exe if 18363 GEQ 9600 (reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe" /f /v KMS_HWID /t REG_QWORD /d "0x3A1C049600B60076" ) >if /I osppsvc.exe EQU sppsvc.exe ( reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v KMS_ActivationInterval /t REG_DWORD /d 120 reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v KMS_RenewalInterval /t REG_DWORD /d 10080 ) >if /I osppsvc.exe EQU osppsvc.exe ( reg add "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" /f /v KeyManagementServiceName /t REG_SZ /d "0.0.0.0" reg add "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" /f /v KeyManagementServicePort /t REG_SZ /d "1688" ) The operation completed successfully. The operation completed successfully. >goto :eof >if 0 EQU 1 if 1 EQU 1 (call :UpdateOSPPEntry osppsvc.exe ) >SET Win10Gov=0 >SET "EditionWMI=" >SET "EditionID=" >IF 18363 LSS 14393 if 1 NEQ 0 GOTO :Main >SET "RegKey=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages" >SET "Pattern=Microsoft-Windows-*Edition~31bf3856ad364e35" >SET "EditionPKG=FFFFFFFF" >FOR /F "TOKENS=8 DELIMS=\" %A IN ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages" /f "Microsoft-Windows-*Edition~31bf3856ad364e35" /k | FIND /I "CurrentVersion"') DO (REG QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\%A" /v "CurrentState" | FIND /I "0x70" && (FOR /F "TOKENS=3 DELIMS=-~" %B IN ('ECHO %A') DO SET "EditionPKG=%B" ) ) >(REG QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Microsoft-Windows-ProfessionalEdition~31bf3856ad364e35~amd64~~10.0.18362.1016" /v "CurrentState" | FIND /I "0x70" && (FOR /F "TOKENS=3 DELIMS=-~" %B IN ('ECHO Microsoft-Windows-ProfessionalEdition~31bf3856ad364e35~amd64~~10.0.18362.1016') DO SET "EditionPKG=%B" ) ) CurrentState REG_DWORD 0x70 >SET "EditionPKG=ProfessionalEdition" >(REG QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Microsoft-Windows-ProfessionalEdition~31bf3856ad364e35~amd64~~10.0.18362.959" /v "CurrentState" | FIND /I "0x70" && (FOR /F "TOKENS=3 DELIMS=-~" %B IN ('ECHO Microsoft-Windows-ProfessionalEdition~31bf3856ad364e35~amd64~~10.0.18362.959') DO SET "EditionPKG=%B" ) ) >IF /I "Edition" == "Edition" (SET "EditionID=Professional" ) ELSE (FOR /F "TOKENS=3 DELIMS=: " %A IN ('DISM /English /Online /Get-CurrentEdition | FIND /I "Current Edition :"') DO SET "EditionID=%A" ) >net start sppsvc /y The Software Protection service is starting. The Software Protection service was started successfully. >set "_qr="wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' AND PartialProductKey is not NULL) get LicenseFamily /value"" >FOR /F "TOKENS=2 DELIMS==" %A IN ('"wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' AND PartialProductKey is not NULL) get LicenseFamily /value" ') DO SET "EditionWMI=%A" >SET "EditionWMI=Education " >IF "Education" == "" ( IF 18363 GEQ 17063 FOR /F "SKIP=2 TOKENS=2*" %A IN ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionId') DO SET "EditionID=%B" IF 18363 LSS 14393 ( FOR /F "SKIP=2 TOKENS=2*" %A IN ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionId') DO SET "EditionID=%B" GOTO :Main ) ) >IF NOT "Education" == "" SET "EditionID=Education" >IF /I "Education" == "IoTEnterprise" SET "EditionID=Enterprise" >IF /I "Education" == "IoTEnterpriseS" SET "EditionID=EnterpriseS" >IF /I "Education" == "ProfessionalSingleLanguage" SET "EditionID=Professional" >IF /I "Education" == "ProfessionalCountrySpecific" SET "EditionID=Professional" >IF /I "Education" == "EnterpriseG" SET Win10Gov=1 >IF /I "Education" == "EnterpriseGN" SET Win10Gov=1 >if defined EditionID (set "_winos=Windows Education edition" ) else (set "_winos=Detected Windows" ) >for /F "skip=2 tokens=2*" %a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName ') do if not errorlevel 1 set "_winos=%b" >if not errorlevel 1 set "_winos=Windows 10 Education" >set "nKMS=does not support KMS activation..." >set "nEval=Evaluation Editions cannot be activated. Please install full Windows OS." >if exist "C:\Windows\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" set _eval=1 >if exist "C:\Windows\Servicing\Packages\Microsoft-Windows-Server*EvalEdition~*.mum" set "nEval=Server Evaluation cannot be activated. Please convert to full Server OS." >if exist "C:\Windows\Servicing\Packages\Microsoft-Windows-Server*EvalCorEdition~*.mum" set _eval=1 & set "nEval=Server Evaluation cannot be activated. Please convert to full Server OS." >set "_C16R=" >reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath && for /F "skip=2 tokens=2*" %a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath" ') do if exist "%b\root\Licenses16\ProPlus*.xrm-ms" (reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds && set "_C16R=HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration" ) HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun InstallPath REG_SZ C:\Program Files\Microsoft Office >if exist "C:\Program Files\Microsoft Office\root\Licenses16\ProPlus*.xrm-ms" (reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds && set "_C16R=HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration" ) HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration ProductReleaseIds REG_SZ ProPlus2021Volume >if not defined _C16R reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun /v InstallPath && for /F "skip=2 tokens=2*" %a in ('"reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun /v InstallPath" ') do if exist "%b\root\Licenses16\ProPlus*.xrm-ms" (reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds && set "_C16R=HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun\Configuration" ) >set "_C15R=" >reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun /v InstallPath && for /F "skip=2 tokens=2*" %a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun /v InstallPath" ') do if exist "%b\root\Licenses\ProPlus*.xrm-ms" ( reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\Configuration /v ProductReleaseIds && call set "_C15R=HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\Configuration" if not defined _C15R reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\propertyBag /v productreleaseid && call set "_C15R=HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\propertyBag" ) ERROR: The system was unable to find the specified registry key or value. >set "_C14R=" >if 1 == 0 (reg query HKLM\SOFTWARE\Microsoft\Office\14.0\CVH /f Click2run /k && set "_C14R=1" ) else (reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\CVH /f Click2run /k && set "_C14R=1" ) ERROR: The system was unable to find the specified registry key or value. >for %A in (14 15 16 19 21) do call :officeLoc %A >call :officeLoc 14 >set loc_off14=0 >set _O14MSI=0 >if 14 EQU 19 ( if defined _C16R reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds | findstr 2019 && set loc_off14=1 exit /b ) >if 14 EQU 21 ( if defined _C16R reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds | findstr 2021 && set loc_off14=1 exit /b ) >for /F "skip=2 tokens=2*" %a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\14.0\Common\InstallRoot /v Path" ') do if exist "%b\OSPP.VBS" ( set loc_off14=1 set _O14MSI=1 ) ERROR: The system was unable to find the specified registry key or value. >for /F "skip=2 tokens=2*" %a in ('"reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\Common\InstallRoot /v Path" ') do if exist "%b\OSPP.VBS" ( set loc_off14=1 set _O14MSI=1 ) ERROR: The system was unable to find the specified registry key or value. >if 14 EQU 16 if defined _C16R ( for /F "skip=2 tokens=2*" %a in ('reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds') do echo %b 1>"!_temp!\c2rchk.txt" for %a in (Mondo ProPlus ProjectPro VisioPro Standard ProjectStd VisioStd Access SkypeforBusiness OneNote Excel Outlook PowerPoint Publisher Word ProjectProX ProjectStdX VisioProX VisioStdX) do (findstr /I /C:"%aVolume" "!_temp!\c2rchk.txt" && set loc_off14=1 ) for %a in (Mondo ProPlus ProjectPro VisioPro Standard ProjectStd VisioStd Access SkypeforBusiness OneNote Excel Outlook PowerPoint Publisher Word Professional HomeBusiness HomeStudent O365Business O365SmallBusPrem O365HomePrem O365EduCloud) do (findstr /I /C:"%aRetail" "!_temp!\c2rchk.txt" && set loc_off14=1 ) exit /b ) >if 14 EQU 15 if defined _C15R ( set loc_off14=1 exit /b ) >if exist "C:\Program Files\Microsoft Office\Office14\OSPP.VBS" set loc_off14=1 >if not x64 == x86 if exist "C:\Program Files\Microsoft Office\Office14\OSPP.VBS" set loc_off14=1 >if not x64 == x86 if exist "C:\Program Files (x86)\Microsoft Office\Office14\OSPP.VBS" set loc_off14=1 >exit /b >call :officeLoc 15 >set loc_off15=0 >set _O15MSI=0 >if 15 EQU 19 ( if defined _C16R reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds | findstr 2019 && set loc_off15=1 exit /b ) >if 15 EQU 21 ( if defined _C16R reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds | findstr 2021 && set loc_off15=1 exit /b ) >for /F "skip=2 tokens=2*" %a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\15.0\Common\InstallRoot /v Path" ') do if exist "%b\OSPP.VBS" ( set loc_off15=1 set _O15MSI=1 ) ERROR: The system was unable to find the specified registry key or value. >for /F "skip=2 tokens=2*" %a in ('"reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Common\InstallRoot /v Path" ') do if exist "%b\OSPP.VBS" ( set loc_off15=1 set _O15MSI=1 ) ERROR: The system was unable to find the specified registry key or value. >if 15 EQU 16 if defined _C16R ( for /F "skip=2 tokens=2*" %a in ('reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds') do echo %b 1>"!_temp!\c2rchk.txt" for %a in (Mondo ProPlus ProjectPro VisioPro Standard ProjectStd VisioStd Access SkypeforBusiness OneNote Excel Outlook PowerPoint Publisher Word ProjectProX ProjectStdX VisioProX VisioStdX) do (findstr /I /C:"%aVolume" "!_temp!\c2rchk.txt" && set loc_off15=1 ) for %a in (Mondo ProPlus ProjectPro VisioPro Standard ProjectStd VisioStd Access SkypeforBusiness OneNote Excel Outlook PowerPoint Publisher Word Professional HomeBusiness HomeStudent O365Business O365SmallBusPrem O365HomePrem O365EduCloud) do (findstr /I /C:"%aRetail" "!_temp!\c2rchk.txt" && set loc_off15=1 ) exit /b ) >if 15 EQU 15 if defined _C15R ( set loc_off15=1 exit /b ) >if exist "C:\Program Files\Microsoft Office\Office15\OSPP.VBS" set loc_off15=1 >if not x64 == x86 if exist "C:\Program Files\Microsoft Office\Office15\OSPP.VBS" set loc_off15=1 >if not x64 == x86 if exist "C:\Program Files (x86)\Microsoft Office\Office15\OSPP.VBS" set loc_off15=1 >exit /b >call :officeLoc 16 >set loc_off16=0 >set _O16MSI=0 >if 16 EQU 19 ( if defined _C16R reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds | findstr 2019 && set loc_off16=1 exit /b ) >if 16 EQU 21 ( if defined _C16R reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds | findstr 2021 && set loc_off16=1 exit /b ) >for /F "skip=2 tokens=2*" %a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\16.0\Common\InstallRoot /v Path" ') do if exist "%b\OSPP.VBS" ( set loc_off16=1 set _O16MSI=1 ) ERROR: The system was unable to find the specified registry key or value. >for /F "skip=2 tokens=2*" %a in ('"reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\16.0\Common\InstallRoot /v Path" ') do if exist "%b\OSPP.VBS" ( set loc_off16=1 set _O16MSI=1 ) ERROR: The system was unable to find the specified registry key or value. >if 16 EQU 16 if defined _C16R ( for /F "skip=2 tokens=2*" %a in ('reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds') do echo %b 1>"!_temp!\c2rchk.txt" for %a in (Mondo ProPlus ProjectPro VisioPro Standard ProjectStd VisioStd Access SkypeforBusiness OneNote Excel Outlook PowerPoint Publisher Word ProjectProX ProjectStdX VisioProX VisioStdX) do (findstr /I /C:"%aVolume" "!_temp!\c2rchk.txt" && set loc_off16=1 ) for %a in (Mondo ProPlus ProjectPro VisioPro Standard ProjectStd VisioStd Access SkypeforBusiness OneNote Excel Outlook PowerPoint Publisher Word Professional HomeBusiness HomeStudent O365Business O365SmallBusPrem O365HomePrem O365EduCloud) do (findstr /I /C:"%aRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) exit /b ) >echo ProPlus2021Volume 1>"!_temp!\c2rchk.txt" >(findstr /I /C:"MondoVolume" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"ProPlusVolume" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"ProjectProVolume" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"VisioProVolume" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"StandardVolume" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"ProjectStdVolume" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"VisioStdVolume" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"AccessVolume" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"SkypeforBusinessVolume" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"OneNoteVolume" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"ExcelVolume" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"OutlookVolume" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"PowerPointVolume" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"PublisherVolume" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"WordVolume" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"ProjectProXVolume" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"ProjectStdXVolume" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"VisioProXVolume" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"VisioStdXVolume" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"MondoRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"ProPlusRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"ProjectProRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"VisioProRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"StandardRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"ProjectStdRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"VisioStdRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"AccessRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"SkypeforBusinessRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"OneNoteRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"ExcelRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"OutlookRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"PowerPointRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"PublisherRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"WordRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"ProfessionalRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"HomeBusinessRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"HomeStudentRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"O365BusinessRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"O365SmallBusPremRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"O365HomePremRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >(findstr /I /C:"O365EduCloudRetail" "!_temp!\c2rchk.txt" && set loc_off16=1 ) >call :officeLoc 19 >set loc_off19=0 >set _O19MSI=0 >if 19 EQU 19 ( if defined _C16R reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds | findstr 2019 && set loc_off19=1 exit /b ) >call :officeLoc 21 >set loc_off21=0 >set _O21MSI=0 >if 21 EQU 19 ( if defined _C16R reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds | findstr 2019 && set loc_off21=1 exit /b ) >if 21 EQU 21 ( if defined _C16R reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds | findstr 2021 && set loc_off21=1 exit /b ) ProductReleaseIds REG_SZ ProPlus2021Volume >if 0 EQU 1 set "_C14R=" >set S_OK=1 >call :RunSPP >set spp=SoftwareLicensingProduct >set sps=SoftwareLicensingService >set W1nd0ws=1 >set WinPerm=0 >set WinVL=0 >set Off1ce=0 >set RanR2V=0 >set aC2R21=0 >set aC2R19=0 >set aC2R16=0 >set aC2R15=0 >if 18363 GEQ 9200 if 1 NEQ 0 call :sppoff >set OffUWP=0 >if 18363 GEQ 10240 reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\msoxmled.exe" && ( dir /b "C:\Program Files\WindowsApps\Microsoft.Office.Desktop*" && set OffUWP=1 if not x64 == x86 dir /b "C:\Program Files\WindowsApps\Microsoft.Office.Desktop*" && set OffUWP=1 ) HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\msoxmled.exe (Default) REG_SZ C:\Program Files\Microsoft Office\Root\VFS\ProgramFilesCommonX64\Microsoft Shared\OFFICE16\MSOXMLED.EXE UseURL REG_SZ 1 File Not Found File Not Found >rem nothing installed >if 1 EQU 0 if 0 EQU 0 if 0 EQU 0 if 0 EQU 0 ( if 18363 GEQ 9200 ( if 0 EQU 0 (echo. & echo No Installed Office 2013-2021 Product Detected... ) else (echo. & echo Detected Office 365/2016 UWP is not supported by KMS_VL_ALL ) exit /b ) if 18363 LSS 9200 (if 0 EQU 0 (echo. & echo No Installed Office Product Detected... & exit /b ) ) ) >set sub_O365=0 >set sub_proj=0 >set sub_vis=0 >set Off1ce=1 >set _sC2R=sppoff >set _fC2R=ReturnSPP >set vol_off14=0 & set vol_off15=0 & set vol_off16=0 & set vol_off19=0 & set vol_off21=0 >set "_qr=wmic path SoftwareLicensingProduct where (Description like '%KMSCLIENT%' AND NOT Name like '%MondoR_KMS_Automation%' ) get Name /value" >wmic path SoftwareLicensingProduct where (Description like '%KMSCLIENT%' AND NOT Name like '%MondoR_KMS_Automation%' ) get Name /value 1>"!_temp!\sppchk.txt" 2>&1 >find /i "Office 21" "!_temp!\sppchk.txt" && (set vol_off21=1 ) ---------- C:\WINDOWS\TEMP\SPPCHK.TXT Name=Office 21, Office21ProPlus2021PreviewVL_KMS_Client_AE edition Name=Office 21, Office21ProPlus2021VL_KMS_Client_AE edition >find /i "Office 19" "!_temp!\sppchk.txt" && (set vol_off19=1 ) ---------- C:\WINDOWS\TEMP\SPPCHK.TXT >find /i "Office 16" "!_temp!\sppchk.txt" && (set vol_off16=1 ) ---------- C:\WINDOWS\TEMP\SPPCHK.TXT >find /i "Office 15" "!_temp!\sppchk.txt" && (set vol_off15=1 ) ---------- C:\WINDOWS\TEMP\SPPCHK.TXT >if 18363 LSS 9200 find /i "Office 14" "!_temp!\sppchk.txt" && (set vol_off14=1 ) >for %A in (14 15 16 19 21) do if !loc_off%A! EQU 0 set vol_off%A=0 >if !loc_off14! EQU 0 set vol_off14=0 >if !loc_off15! EQU 0 set vol_off15=0 >if !loc_off16! EQU 0 set vol_off16=0 >if !loc_off19! EQU 0 set vol_off19=0 >if !loc_off21! EQU 0 set vol_off21=0 >set "_qr=wmic path SoftwareLicensingProduct where "ApplicationID='0ff1ce15-a989-479d-af46-f275c6370663' AND LicenseFamily like 'Office16O365%'" get LicenseFamily /value" >if 0 EQU 1 find /i "Office16MondoVL_KMS_Client" "!_temp!\sppchk.txt" && (wmic path SoftwareLicensingProduct where "ApplicationID='0ff1ce15-a989-479d-af46-f275c6370663' AND LicenseFamily like 'Office16O365%'" get LicenseFamily /value | find /i "O365" || (set vol_off16=0 ) ) >set "_qr=wmic path SoftwareLicensingProduct where "ApplicationID='0ff1ce15-a989-479d-af46-f275c6370663' AND LicenseFamily like 'OfficeO365%'" get LicenseFamily /value" >if 0 EQU 1 find /i "OfficeMondoVL_KMS_Client" "!_temp!\sppchk.txt" && (wmic path SoftwareLicensingProduct where "ApplicationID='0ff1ce15-a989-479d-af46-f275c6370663' AND LicenseFamily like 'OfficeO365%'" get LicenseFamily /value | find /i "O365" || (set vol_off15=0 ) ) >set ret_off14=0 & set ret_off15=0 & set ret_off16=0 & set ret_off19=0 & set ret_off21=0 >set "_qr=wmic path SoftwareLicensingProduct where (ApplicationID='0ff1ce15-a989-479d-af46-f275c6370663' AND NOT Name like '%O365%' ) get Name /value" >wmic path SoftwareLicensingProduct where (ApplicationID='0ff1ce15-a989-479d-af46-f275c6370663' AND NOT Name like '%O365%' ) get Name /value 1>"!_temp!\sppchk.txt" 2>&1 >find /i "R_Retail" "!_temp!\sppchk.txt" | find /i "Office 21" && (set ret_off21=1 ) >find /i "R_Retail" "!_temp!\sppchk.txt" | find /i "Office 19" && (set ret_off19=1 ) >find /i "R_Retail" "!_temp!\sppchk.txt" | find /i "Office 16" && (set ret_off16=1 ) >find /i "R_Retail" "!_temp!\sppchk.txt" | find /i "Office 15" && (set ret_off15=1 ) >set "_qr=wmic path SoftwareLicensingProduct where (ApplicationID='59a52881-a989-479d-af46-f275c6370663') get Description /value" >if 18363 LSS 9200 if 0 EQU 0 wmic path SoftwareLicensingProduct where (ApplicationID='59a52881-a989-479d-af46-f275c6370663') get Description /value | findstr /i channel && (set ret_off14=1 ) >set run_off21=0 & set prr_off21=0 & set prv_off21=0 >if 1 EQU 1 if 0 EQU 1 if 0 EQU 0 if 1 EQU 0 set run_off21=1 >if 1 EQU 1 if 0 EQU 1 if 0 EQU 0 if 1 EQU 1 ( for %a in (ProPlus Standard Access SkypeforBusiness Excel Outlook PowerPoint Publisher Word) do find /i "Office21%a2021R" "!_temp!\sppchk.txt" && ( call set /a prr_off21+=1 find /i "Office21%a2021VL" "!_temp!\sppchk.txt" && call set /a prv_off21+=1 ) for %a in (Professional) do find /i "Office21%a2021R" "!_temp!\sppchk.txt" && ( call set /a prr_off21+=1 find /i "Office21ProPlus2021VL" "!_temp!\sppchk.txt" && call set /a prv_off21+=1 ) for %a in (HomeBusiness HomeStudent) do find /i "Office21%a2021R" "!_temp!\sppchk.txt" && ( call set /a prr_off21+=1 find /i "Office21Standard2021VL" "!_temp!\sppchk.txt" && call set /a prv_off21+=1 ) if 0 EQU 0 for %a in (ProjectPro ProjectStd) do find /i "Office21%a2021R" "!_temp!\sppchk.txt" && ( call set /a prr_off21+=1 find /i "Office21%a2021VL" "!_temp!\sppchk.txt" && call set /a prv_off21+=1 ) if 0 EQU 0 for %a in (VisioPro VisioStd) do find /i "Office21%a2021R" "!_temp!\sppchk.txt" && ( call set /a prr_off21+=1 find /i "Office21%a2021VL" "!_temp!\sppchk.txt" && call set /a prv_off21+=1 ) ) >if 1 EQU 1 if 0 EQU 1 if 0 EQU 0 if 1 EQU 1 if 0 LSS 0 (set vol_off21=0 & set run_off21=1 ) >set run_off19=0 & set prr_off19=0 & set prv_off19=0 >if 0 EQU 1 if 0 EQU 1 if 0 EQU 0 if 0 EQU 0 set run_off19=1 >if 0 EQU 1 if 0 EQU 1 if 0 EQU 0 if 0 EQU 1 ( for %a in (ProPlus Standard Access SkypeforBusiness Excel Outlook PowerPoint Publisher Word) do find /i "Office19%a2019R" "!_temp!\sppchk.txt" && ( call set /a prr_off19+=1 find /i "Office19%a2019VL" "!_temp!\sppchk.txt" && call set /a prv_off19+=1 ) for %a in (Professional) do find /i "Office19%a2019R" "!_temp!\sppchk.txt" && ( call set /a prr_off19+=1 find /i "Office19ProPlus2019VL" "!_temp!\sppchk.txt" && call set /a prv_off19+=1 ) for %a in (HomeBusiness HomeStudent) do find /i "Office19%a2019R" "!_temp!\sppchk.txt" && ( call set /a prr_off19+=1 find /i "Office19Standard2019VL" "!_temp!\sppchk.txt" && call set /a prv_off19+=1 ) if 0 EQU 0 for %a in (ProjectPro ProjectStd) do find /i "Office19%a2019R" "!_temp!\sppchk.txt" && ( call set /a prr_off19+=1 find /i "Office19%a2019VL" "!_temp!\sppchk.txt" && call set /a prv_off19+=1 ) if 0 EQU 0 for %a in (VisioPro VisioStd) do find /i "Office19%a2019R" "!_temp!\sppchk.txt" && ( call set /a prr_off19+=1 find /i "Office19%a2019VL" "!_temp!\sppchk.txt" && call set /a prv_off19+=1 ) ) >if 0 EQU 1 if 0 EQU 1 if 0 EQU 0 if 0 EQU 1 if 0 LSS 0 (set vol_off19=0 & set run_off19=1 ) >set run_off16=0 & set prr_off16=0 & set prv_off16=0 >if 0 EQU 1 if 0 EQU 1 if 0 EQU 0 if defined _C16R ( for %a in (ProPlus Standard Access SkypeforBusiness Excel Outlook PowerPoint Publisher Word) do find /i "Office16%aR" "!_temp!\sppchk.txt" && ( call set /a prr_off16+=1 if 0 EQU 1 if 1 EQU 0 if 0 EQU 0 find /i "Office16%aVL" "!_temp!\sppchk.txt" && call set /a prv_off16+=1 if 0 EQU 0 if 1 EQU 1 find /i "Office21%a2021VL" "!_temp!\sppchk.txt" && call set /a prv_off16+=1 if 0 EQU 0 if 0 EQU 1 find /i "Office19%a2019VL" "!_temp!\sppchk.txt" && call set /a prv_off16+=1 ) for %a in (Professional) do find /i "Office16%aR" "!_temp!\sppchk.txt" && ( call set /a prr_off16+=1 if 0 EQU 1 if 1 EQU 0 if 0 EQU 0 find /i "Office16ProPlusVL" "!_temp!\sppchk.txt" && call set /a prv_off16+=1 if 0 EQU 0 if 1 EQU 1 find /i "Office21ProPlus2021VL" "!_temp!\sppchk.txt" && call set /a prv_off16+=1 if 0 EQU 0 if 0 EQU 1 find /i "Office19ProPlus2019VL" "!_temp!\sppchk.txt" && call set /a prv_off16+=1 ) for %a in (HomeBusiness HomeStudent) do find /i "Office16%aR" "!_temp!\sppchk.txt" && ( call set /a prr_off16+=1 if 0 EQU 1 if 1 EQU 0 if 0 EQU 0 find /i "Office16StandardVL" "!_temp!\sppchk.txt" && call set /a prv_off16+=1 if 0 EQU 0 if 1 EQU 1 find /i "Office21Standard2021VL" "!_temp!\sppchk.txt" && call set /a prv_off16+=1 if 0 EQU 0 if 0 EQU 1 find /i "Office19Standard2019VL" "!_temp!\sppchk.txt" && call set /a prv_off16+=1 ) if 0 EQU 0 for %a in (ProjectPro ProjectStd) do find /i "Office16%aR" "!_temp!\sppchk.txt" && ( call set /a prr_off16+=1 if 0 EQU 1 if 1 EQU 0 if 0 EQU 0 find /i "Office16%aVL" "!_temp!\sppchk.txt" && call set /a prv_off16+=1 if 0 EQU 0 if 1 EQU 1 find /i "Office21%a2021VL" "!_temp!\sppchk.txt" && call set /a prv_off16+=1 if 0 EQU 0 if 0 EQU 1 find /i "Office19%a2019VL" "!_temp!\sppchk.txt" && call set /a prv_off16+=1 ) if 0 EQU 0 for %a in (VisioPro VisioStd) do find /i "Office16%aR" "!_temp!\sppchk.txt" && ( call set /a prr_off16+=1 if 0 EQU 1 if 1 EQU 0 if 0 EQU 0 find /i "Office16%aVL" "!_temp!\sppchk.txt" && call set /a prv_off16+=1 if 0 EQU 0 if 1 EQU 1 find /i "Office21%a2021VL" "!_temp!\sppchk.txt" && call set /a prv_off16+=1 if 0 EQU 0 if 0 EQU 1 find /i "Office19%a2019VL" "!_temp!\sppchk.txt" && call set /a prv_off16+=1 ) ) >if 0 EQU 1 if 0 EQU 1 if 0 EQU 0 if defined _C16R if 0 LSS 0 (set vol_off16=0 & set run_off16=1 ) >set "_qr=wmic path SoftwareLicensingProduct where (ApplicationID='0ff1ce15-a989-479d-af46-f275c6370663' AND LicenseFamily like 'Office16O365%' ) get LicenseFamily /value" >if 0 EQU 1 if 0 EQU 0 if 0 EQU 0 if defined _C16R wmic path SoftwareLicensingProduct where (ApplicationID='0ff1ce15-a989-479d-af46-f275c6370663' AND LicenseFamily like 'Office16O365%' ) get LicenseFamily /value | find /i "O365" && (find /i "Office16MondoVL" "!_temp!\sppchk.txt" || set run_off16=1 ) >set run_off15=0 >if 0 EQU 1 if 0 EQU 1 if 0 EQU 0 ( set vol_off15=0 if defined _C15R set run_off15=1 ) >set vol_offgl=1 >if 1 EQU 0 if 0 EQU 0 if 0 EQU 0 if 0 EQU 0 ( if 18363 GEQ 9200 set vol_offgl=0 if 18363 LSS 9200 if 0 EQU 0 set vol_offgl=0 ) >rem mixed Volume + Retail >if 0 EQU 1 if 1 EQU 1 if 0 EQU 0 goto :C2RR2V >if 0 EQU 1 if 1 EQU 1 if 0 EQU 0 goto :C2RR2V >if 0 EQU 1 if 1 EQU 1 if 0 EQU 0 goto :C2RR2V >if 0 EQU 1 if 1 EQU 1 if 0 EQU 0 goto :C2RR2V >rem all supported Volume + message for unsupported >if 0 EQU 0 if 0 EQU 1 if 0 EQU 0 if 0 EQU 1 (echo. & echo Detected Office 365/2016 UWP is not supported by KMS_VL_ALL ) >if 1 EQU 1 ( if 0 EQU 1 if 0 EQU 1 (echo. & echo Detected Office 2016 MSI Retail is not supported by KMS_VL_ALL ) if 0 EQU 1 if 0 EQU 1 (echo. & echo Detected Office 2013 MSI Retail is not supported by KMS_VL_ALL ) if 18363 LSS 9200 if 0 EQU 1 if 0 EQU 0 (if defined _C14R (echo. & echo Detected Office 2010 C2R Retail is not supported by KMS_VL_ALL ) else if 0 EQU 1 (if 0 EQU 1 echo. & echo Detected Office 2010 MSI Retail is not supported by KMS_VL_ALL ) ) exit /b ) >set "_qr=wmic path SoftwareLicensingProduct where (Description like '%KMSCLIENT%' ) get Name /value" >wmic path SoftwareLicensingProduct where (Description like '%KMSCLIENT%' ) get Name /value | findstr /i Windows && (set WinVL=1 ) Name=Windows(R), Professional edition Name=Windows(R), ProfessionalEducation edition Name=Windows(R), Enterprise edition Name=Windows(R), ProfessionalWorkstation edition Name=Windows(R), Education edition Name=Windows(R), ServerRdsh edition Name=Windows(R), ServerRdsh edition >if 1 EQU 0 (if 1 EQU 0 (echo. & echo Windows activation is OFF... ) else (if 1 EQU 0 (echo. & echo Windows 10 Education does not support KMS activation... if defined _eval echo Evaluation Editions cannot be activated. Please install full Windows OS. ) else (echo. & echo Failed checking KMS Activation ID(s) for Windows. & echo Either sppsvc service or SppExtComObjHook.dll is not functional. & echo See Read Me for troubleshooting. exit /b ) ) ) >if 1 EQU 0 if 1 EQU 0 exit /b >if 1 EQU 0 ( reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f" /f 1>nul 2>nul rem reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" /f 1>nul 2>nul reg delete "HKU\S-1-5-20\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f" /f 1>nul 2>nul reg delete "HKU\S-1-5-20\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" /f 1>nul 2>nul ) >set _gvlk=0 >set "_qr=wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' and PartialProductKey is not NULL) get Name /value" >if 18363 GEQ 10240 wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' and PartialProductKey is not NULL) get Name /value | findstr /i Windows && (set _gvlk=1 ) Name=Windows(R), Education edition >set gpr=0 >set "_qr="wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' and PartialProductKey is not NULL) get GracePeriodRemaining /value"" >if 18363 GEQ 10240 if 1 NEQ 0 if 1 EQU 1 for /F "tokens=2 delims==" %A in ('"wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' and PartialProductKey is not NULL) get GracePeriodRemaining /value" ') do set "gpr=%A" >set "gpr=0 " >set "_qr=wmic path SoftwareLicensingProduct where "ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' and PartialProductKey is not NULL" get LicenseFamily /value" >if 0 NEQ 0 if 0 GTR 259200 ( set W1nd0ws=0 wmic path SoftwareLicensingProduct where "ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' and PartialProductKey is not NULL" get LicenseFamily /value | findstr /i EnterpriseG && (call set W1nd0ws=1 ) ) >set "_qr="wmic path SoftwareLicensingService get Version /value"" >for /F "tokens=2 delims==" %A in ('"wmic path SoftwareLicensingService get Version /value"') do set slsv=%A >set slsv=10.0.18362.1016 >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /f /v KeyManagementServiceName /t REG_SZ /d "0.0.0.0" The operation completed successfully. >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /f /v KeyManagementServicePort /t REG_SZ /d "1688" The operation completed successfully. >if 18363 GEQ 9200 ( if not x64 == x86 ( reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /f /v KeyManagementServiceName /t REG_SZ /d "0.0.0.0" /reg:32 reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /f /v KeyManagementServicePort /t REG_SZ /d "1688" /reg:32 reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" /f /reg:32 1>nul 2>nul reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" /f /v KeyManagementServiceName /t REG_SZ /d "0.0.0.0" /reg:32 reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" /f /v KeyManagementServicePort /t REG_SZ /d "1688" /reg:32 ) reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" /f 1>nul 2>nul reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" /f /v KeyManagementServiceName /t REG_SZ /d "0.0.0.0" reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" /f /v KeyManagementServicePort /t REG_SZ /d "1688" ) The operation completed successfully. The operation completed successfully. The operation completed successfully. The operation completed successfully. The operation completed successfully. The operation completed successfully. >set "_qr="wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' ) get ID /value"" >if 1 EQU 0 for /F "tokens=2 delims==" %G in ('"wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' ) get ID /value"') do (set app=%G & call :sppchkwin ) >set "_qr="wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' ) get ID /value"" >if 1 EQU 1 if 1 NEQ 0 for /F "tokens=2 delims==" %G in ('"wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' ) get ID /value"') do (set app=%G & call :sppchkwin ) >(set app=2de67392-b7a7-462a-b1ca-108dd189f588 & call :sppchkwin ) >set _officespp=0 >set "_qr=wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' and PartialProductKey is not NULL) get Name /value" >if 18363 GEQ 14393 if 0 EQU 0 if 1 EQU 0 wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' and PartialProductKey is not NULL) get Name /value | findstr /i Windows && (set _gvlk=1 ) >set "_qr=wmic path SoftwareLicensingProduct where (ID='2de67392-b7a7-462a-b1ca-108dd189f588') get LicenseStatus /value" >wmic path SoftwareLicensingProduct where (ID='2de67392-b7a7-462a-b1ca-108dd189f588') get LicenseStatus /value | findstr "1" && (echo. & call :activate & exit /b ) >set "_qr=wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID /value" >wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID /value | findstr /i "2de67392-b7a7-462a-b1ca-108dd189f588" && (echo. & call :activate & exit /b ) >if 18363 GEQ 14393 if 1 EQU 1 exit /b >(set app=3f1afc82-f8ac-4f6c-8005-1d233e606eee & call :sppchkwin ) >set _officespp=0 >set "_qr=wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' and PartialProductKey is not NULL) get Name /value" >if 18363 GEQ 14393 if 0 EQU 0 if 1 EQU 0 wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' and PartialProductKey is not NULL) get Name /value | findstr /i Windows && (set _gvlk=1 ) >set "_qr=wmic path SoftwareLicensingProduct where (ID='3f1afc82-f8ac-4f6c-8005-1d233e606eee') get LicenseStatus /value" >wmic path SoftwareLicensingProduct where (ID='3f1afc82-f8ac-4f6c-8005-1d233e606eee') get LicenseStatus /value | findstr "1" && (echo. & call :activate & exit /b ) >set "_qr=wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID /value" >wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID /value | findstr /i "3f1afc82-f8ac-4f6c-8005-1d233e606eee" && (echo. & call :activate & exit /b ) >if 18363 GEQ 14393 if 1 EQU 1 exit /b >(set app=73111121-5638-40f6-bc11-f1d7b0d64300 & call :sppchkwin ) >set _officespp=0 >set "_qr=wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' and PartialProductKey is not NULL) get Name /value" >if 18363 GEQ 14393 if 0 EQU 0 if 1 EQU 0 wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' and PartialProductKey is not NULL) get Name /value | findstr /i Windows && (set _gvlk=1 ) >set "_qr=wmic path SoftwareLicensingProduct where (ID='73111121-5638-40f6-bc11-f1d7b0d64300') get LicenseStatus /value" >wmic path SoftwareLicensingProduct where (ID='73111121-5638-40f6-bc11-f1d7b0d64300') get LicenseStatus /value | findstr "1" && (echo. & call :activate & exit /b ) >set "_qr=wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID /value" >wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID /value | findstr /i "73111121-5638-40f6-bc11-f1d7b0d64300" && (echo. & call :activate & exit /b ) >if 18363 GEQ 14393 if 1 EQU 1 exit /b >(set app=82bbc092-bc50-4e16-8e18-b74fc486aec3 & call :sppchkwin ) >set _officespp=0 >set "_qr=wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' and PartialProductKey is not NULL) get Name /value" >if 18363 GEQ 14393 if 0 EQU 0 if 1 EQU 0 wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' and PartialProductKey is not NULL) get Name /value | findstr /i Windows && (set _gvlk=1 ) >set "_qr=wmic path SoftwareLicensingProduct where (ID='82bbc092-bc50-4e16-8e18-b74fc486aec3') get LicenseStatus /value" >wmic path SoftwareLicensingProduct where (ID='82bbc092-bc50-4e16-8e18-b74fc486aec3') get LicenseStatus /value | findstr "1" && (echo. & call :activate & exit /b ) >set "_qr=wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID /value" >wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID /value | findstr /i "82bbc092-bc50-4e16-8e18-b74fc486aec3" && (echo. & call :activate & exit /b ) >if 18363 GEQ 14393 if 1 EQU 1 exit /b >(set app=e0c42288-980c-4788-a014-c080d2e1926e & call :sppchkwin ) >set _officespp=0 >set "_qr=wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' and PartialProductKey is not NULL) get Name /value" >if 18363 GEQ 14393 if 0 EQU 0 if 1 EQU 0 wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' and PartialProductKey is not NULL) get Name /value | findstr /i Windows && (set _gvlk=1 ) >set "_qr=wmic path SoftwareLicensingProduct where (ID='e0c42288-980c-4788-a014-c080d2e1926e') get LicenseStatus /value" >wmic path SoftwareLicensingProduct where (ID='e0c42288-980c-4788-a014-c080d2e1926e') get LicenseStatus /value | findstr "1" && (echo. & call :activate & exit /b ) >set "_qr=wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID /value" >wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID /value | findstr /i "e0c42288-980c-4788-a014-c080d2e1926e" && (echo. & call :activate & exit /b ) ID=e0c42288-980c-4788-a014-c080d2e1926e >set S_OK=1 >if SoftwareLicensingService EQU SoftwareLicensingService (if 0 EQU 0 (reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f\e0c42288-980c-4788-a014-c080d2e1926e" /f 1>nul 2>nul ) else (reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663\e0c42288-980c-4788-a014-c080d2e1926e" /f 1>nul 2>nul ) ) else ( reg delete "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform\59a52881-a989-479d-af46-f275c6370663\e0c42288-980c-4788-a014-c080d2e1926e" /f 1>nul 2>nul reg delete "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663\e0c42288-980c-4788-a014-c080d2e1926e" /f 1>nul 2>nul ) >set "_qr="wmic path SoftwareLicensingProduct where (ID='e0c42288-980c-4788-a014-c080d2e1926e') get Name /value"" >if 1 EQU 0 if 0 EQU 0 if SoftwareLicensingService EQU SoftwareLicensingService ( reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f\e0c42288-980c-4788-a014-c080d2e1926e" /f /v KeyManagementServiceName /t REG_SZ /d "127.0.0.2" reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f\e0c42288-980c-4788-a014-c080d2e1926e" /f /v KeyManagementServicePort /t REG_SZ /d "1688" reg add "HKU\S-1-5-20\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f\e0c42288-980c-4788-a014-c080d2e1926e" /f /v DiscoveredKeyManagementServiceIpAddress /t REG_SZ /d "127.0.0.2" for /F "tokens=2 delims==" %x in ('"wmic path SoftwareLicensingProduct where (ID='e0c42288-980c-4788-a014-c080d2e1926e') get Name /value"') do echo Checking: %x echo Product is KMS 2038 Activated. exit /b ) >set "_qr="wmic path SoftwareLicensingProduct where (ID='e0c42288-980c-4788-a014-c080d2e1926e') get Name /value"" >if 0 EQU 0 for /F "tokens=2 delims==" %x in ('"wmic path SoftwareLicensingProduct where (ID='e0c42288-980c-4788-a014-c080d2e1926e') get Name /value"') do echo Activating: %x >echo Activating: Windows(R), Education edition Activating: Windows(R), Education edition >if 0 EQU 1 for /F "tokens=2 delims==f" %x in ('"wmic path SoftwareLicensingProduct where (ID='e0c42288-980c-4788-a014-c080d2e1926e') get Name /value"') do echo Activating: %x >set ESU_ADD=0 >set "_qr=wmic path SoftwareLicensingProduct where ID='e0c42288-980c-4788-a014-c080d2e1926e' call Activate" >if 0 NEQ 0 set "_qr=cscript.exe //NoLogo //Job:WmiMethod "KMS_VL_ALL_AIO.cmd?.wsf" "SoftwareLicensingProduct.ID='e0c42288-980c-4788-a014-c080d2e1926e'" Activate" >wmic path SoftwareLicensingProduct where ID='e0c42288-980c-4788-a014-c080d2e1926e' call Activate Executing (\\DESKTOP-EGE0G8H\root\cimv2:SoftwareLicensingProduct.ID="e0c42288-980c-4788-a014-c080d2e1926e")->Activate() ERROR: Description = Server execution failed >call set ERRORCODE=-2146959355 >if -2146959355 EQU -1073418187 ( echo Product Activation Failed: 0xC004F035 if Win8 EQU Win7 echo Windows 7 cannot be KMS-activated on this computer due to unqualified OEM BIOS. echo See Read Me for details. exit /b ) >if -2146959355 EQU -1073417728 ( echo Product Activation Failed: 0xC004F200 echo Windows needs to rebuild the activation-related files. echo See KB2736303 for details. exit /b ) >if -2146959355 EQU -1073422315 ( echo Product Activation Failed: 0xC004E015 echo Running slmgr.vbs /rilc to mitigate. cscript //Nologo //B C:\Windows\System32\slmgr.vbs /rilc ) >if -2146959355 NEQ 0 ( if SoftwareLicensingService EQU SoftwareLicensingService (call :StopService sppsvc ) else (call :StopService osppsvc ) wmic path SoftwareLicensingProduct where ID='e0c42288-980c-4788-a014-c080d2e1926e' call Activate call set ERRORCODE=!ERRORLEVEL! ) >sc query sppsvc | find /i "STOPPED" || net stop sppsvc /y The Software Protection service is stopping. The Software Protection service was stopped successfully. >sc query sppsvc | find /i "STOPPED" || sc stop sppsvc STATE : 1 STOPPED >goto :eof Executing (\\DESKTOP-EGE0G8H\root\cimv2:SoftwareLicensingProduct.ID="e0c42288-980c-4788-a014-c080d2e1926e")->Activate() ERROR: Description = Server execution failed >set gpr=0 >set gpr2=0 >set "_qr="wmic path SoftwareLicensingProduct where (ID='e0c42288-980c-4788-a014-c080d2e1926e') get GracePeriodRemaining /value"" >for /F "tokens=2 delims==" %x in ('"wmic path SoftwareLicensingProduct where (ID='e0c42288-980c-4788-a014-c080d2e1926e') get GracePeriodRemaining /value"') do (set gpr=%x & set /a "gpr2=(%x+1440-1)/1440" ) >(set gpr=0 & set /a "gpr2=(0 +1440-1)/1440" ) >if -2146959355 EQU 0 if 0 EQU 0 ( echo Product Activation succeeded, but Remaining Period failed to increase. if Win8 EQU Win7 echo This could be related to the error described in KB4487266 exit /b ) >set Act_OK=0 >if 0 EQU 43200 if 0 EQU 0 if 18363 GEQ 9200 set Act_OK=1 >if 0 EQU 64800 set Act_OK=1 >if 0 GTR 259200 if 0 EQU 1 set Act_OK=1 >if 0 EQU 259200 set Act_OK=1 >if -2146959355 EQU 0 if 0 EQU 1 ( echo Product Activation Successful echo Remaining Period: 0 days (0 minutes) exit /b ) >cmd /c exit /b -2146959355 >if -2146959355 NEQ 0 (echo Product Activation Failed: 0x!=ExitCode! ) else (echo Product Activation Failed ) Product Activation Failed: 0x80080005 >echo Remaining Period: 0 days (0 minutes) Remaining Period: 0 days (0 minutes) >set S_OK=0 >exit /b >(set app=e4db50ea-bda1-4566-b047-0ca50abc6f07 & call :sppchkwin ) >set _officespp=0 >set "_qr=wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' and PartialProductKey is not NULL) get Name /value" >if 18363 GEQ 14393 if 0 EQU 0 if 1 EQU 0 wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' and PartialProductKey is not NULL) get Name /value | findstr /i Windows && (set _gvlk=1 ) >set "_qr=wmic path SoftwareLicensingProduct where (ID='e4db50ea-bda1-4566-b047-0ca50abc6f07') get LicenseStatus /value" >wmic path SoftwareLicensingProduct where (ID='e4db50ea-bda1-4566-b047-0ca50abc6f07') get LicenseStatus /value | findstr "1" && (echo. & call :activate & exit /b ) >set "_qr=wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID /value" >wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID /value | findstr /i "e4db50ea-bda1-4566-b047-0ca50abc6f07" && (echo. & call :activate & exit /b ) >if 18363 GEQ 14393 if 1 EQU 1 exit /b >(set app=ec868e65-fadf-4759-b23e-93fe37f2cc29 & call :sppchkwin ) >set _officespp=0 >set "_qr=wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' and PartialProductKey is not NULL) get Name /value" >if 18363 GEQ 14393 if 0 EQU 0 if 1 EQU 0 wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' and PartialProductKey is not NULL) get Name /value | findstr /i Windows && (set _gvlk=1 ) >set "_qr=wmic path SoftwareLicensingProduct where (ID='ec868e65-fadf-4759-b23e-93fe37f2cc29') get LicenseStatus /value" >wmic path SoftwareLicensingProduct where (ID='ec868e65-fadf-4759-b23e-93fe37f2cc29') get LicenseStatus /value | findstr "1" && (echo. & call :activate & exit /b ) >set "_qr=wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID /value" >wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID /value | findstr /i "ec868e65-fadf-4759-b23e-93fe37f2cc29" && (echo. & call :activate & exit /b ) >if 18363 GEQ 14393 if 1 EQU 1 exit /b >if 1 EQU 1 if 1 EQU 0 (echo. & echo Windows activation is OFF... ) >set "_qr="wmic path SoftwareLicensingProduct where (ApplicationID='0ff1ce15-a989-479d-af46-f275c6370663' and Description like '%KMSCLIENT%' ) get ID /value"" >if 1 EQU 1 if 1 NEQ 0 for /F "tokens=2 delims==" %G in ('"wmic path SoftwareLicensingProduct where (ApplicationID='0ff1ce15-a989-479d-af46-f275c6370663' and Description like '%KMSCLIENT%' ) get ID /value"') do (set app=%G & call :sppchkoff 1 ) >(set app=f3fb2d68-83dd-4c8b-8f09-08e0d950ac3b & call :sppchkoff 1 ) >set "_qr=wmic path SoftwareLicensingProduct where (ID='f3fb2d68-83dd-4c8b-8f09-08e0d950ac3b') get Name /value" >wmic path SoftwareLicensingProduct where (ID='f3fb2d68-83dd-4c8b-8f09-08e0d950ac3b') get Name /value 1>"!_temp!\sppchk.txt" >if 18363 LSS 9200 find /i "Office 14" "!_temp!\sppchk.txt" && (if 0 EQU 0 exit /b ) >find /i "Office 15" "!_temp!\sppchk.txt" && (if 0 EQU 0 exit /b ) ---------- C:\WINDOWS\TEMP\SPPCHK.TXT >find /i "Office 16" "!_temp!\sppchk.txt" && (if 0 EQU 0 exit /b ) ---------- C:\WINDOWS\TEMP\SPPCHK.TXT >find /i "Office 19" "!_temp!\sppchk.txt" && (if 0 EQU 0 exit /b ) ---------- C:\WINDOWS\TEMP\SPPCHK.TXT >find /i "Office 21" "!_temp!\sppchk.txt" && (if 1 EQU 0 exit /b ) ---------- C:\WINDOWS\TEMP\SPPCHK.TXT Name=Office 21, Office21ProPlus2021PreviewVL_KMS_Client_AE edition >if 1 EQU 1 (set _officespp=1 ) else (set _officespp=0 ) >set "_qr=wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID /value" >wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID /value | findstr /i "f3fb2d68-83dd-4c8b-8f09-08e0d950ac3b" && (echo. & call :activate & exit /b ) >set "_qr="wmic path SoftwareLicensingProduct where (ID='f3fb2d68-83dd-4c8b-8f09-08e0d950ac3b') get Name /value"" >for /F "tokens=3 delims==, " %G in ('"wmic path SoftwareLicensingProduct where (ID='f3fb2d68-83dd-4c8b-8f09-08e0d950ac3b') get Name /value"') do set OffVer=%G >set OffVer=21 >call :offchk21 >if /I 'f3fb2d68-83dd-4c8b-8f09-08e0d950ac3b' EQU 'f3fb2d68-83dd-4c8b-8f09-08e0d950ac3b' exit /b >exit /b >(set app=fbdb3e18-a8ef-4fb3-9183-dffd60bd0984 & call :sppchkoff 1 ) >set "_qr=wmic path SoftwareLicensingProduct where (ID='fbdb3e18-a8ef-4fb3-9183-dffd60bd0984') get Name /value" >wmic path SoftwareLicensingProduct where (ID='fbdb3e18-a8ef-4fb3-9183-dffd60bd0984') get Name /value 1>"!_temp!\sppchk.txt" >if 18363 LSS 9200 find /i "Office 14" "!_temp!\sppchk.txt" && (if 0 EQU 0 exit /b ) >find /i "Office 15" "!_temp!\sppchk.txt" && (if 0 EQU 0 exit /b ) ---------- C:\WINDOWS\TEMP\SPPCHK.TXT >find /i "Office 16" "!_temp!\sppchk.txt" && (if 0 EQU 0 exit /b ) ---------- C:\WINDOWS\TEMP\SPPCHK.TXT >find /i "Office 19" "!_temp!\sppchk.txt" && (if 0 EQU 0 exit /b ) ---------- C:\WINDOWS\TEMP\SPPCHK.TXT >find /i "Office 21" "!_temp!\sppchk.txt" && (if 1 EQU 0 exit /b ) ---------- C:\WINDOWS\TEMP\SPPCHK.TXT Name=Office 21, Office21ProPlus2021VL_KMS_Client_AE edition >if 1 EQU 1 (set _officespp=1 ) else (set _officespp=0 ) >set "_qr=wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID /value" >wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID /value | findstr /i "fbdb3e18-a8ef-4fb3-9183-dffd60bd0984" && (echo. & call :activate & exit /b ) ID=fbdb3e18-a8ef-4fb3-9183-dffd60bd0984 >set S_OK=1 >if SoftwareLicensingService EQU SoftwareLicensingService (if 1 EQU 0 (reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f\fbdb3e18-a8ef-4fb3-9183-dffd60bd0984" /f 1>nul 2>nul ) else (reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663\fbdb3e18-a8ef-4fb3-9183-dffd60bd0984" /f 1>nul 2>nul ) ) else ( reg delete "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform\59a52881-a989-479d-af46-f275c6370663\fbdb3e18-a8ef-4fb3-9183-dffd60bd0984" /f 1>nul 2>nul reg delete "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663\fbdb3e18-a8ef-4fb3-9183-dffd60bd0984" /f 1>nul 2>nul ) >set "_qr="wmic path SoftwareLicensingProduct where (ID='fbdb3e18-a8ef-4fb3-9183-dffd60bd0984') get Name /value"" >if 1 EQU 0 if 1 EQU 0 if SoftwareLicensingService EQU SoftwareLicensingService ( reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f\fbdb3e18-a8ef-4fb3-9183-dffd60bd0984" /f /v KeyManagementServiceName /t REG_SZ /d "127.0.0.2" reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f\fbdb3e18-a8ef-4fb3-9183-dffd60bd0984" /f /v KeyManagementServicePort /t REG_SZ /d "1688" reg add "HKU\S-1-5-20\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f\fbdb3e18-a8ef-4fb3-9183-dffd60bd0984" /f /v DiscoveredKeyManagementServiceIpAddress /t REG_SZ /d "127.0.0.2" for /F "tokens=2 delims==" %x in ('"wmic path SoftwareLicensingProduct where (ID='fbdb3e18-a8ef-4fb3-9183-dffd60bd0984') get Name /value"') do echo Checking: %x echo Product is KMS 2038 Activated. exit /b ) >set "_qr="wmic path SoftwareLicensingProduct where (ID='fbdb3e18-a8ef-4fb3-9183-dffd60bd0984') get Name /value"" >if 0 EQU 0 for /F "tokens=2 delims==" %x in ('"wmic path SoftwareLicensingProduct where (ID='fbdb3e18-a8ef-4fb3-9183-dffd60bd0984') get Name /value"') do echo Activating: %x >echo Activating: Office 21, Office21ProPlus2021VL_KMS_Client_AE edition Activating: Office 21, Office21ProPlus2021VL_KMS_Client_AE edition >if 0 EQU 1 for /F "tokens=2 delims==f" %x in ('"wmic path SoftwareLicensingProduct where (ID='fbdb3e18-a8ef-4fb3-9183-dffd60bd0984') get Name /value"') do echo Activating: %x >set ESU_ADD=0 >set "_qr=wmic path SoftwareLicensingProduct where ID='fbdb3e18-a8ef-4fb3-9183-dffd60bd0984' call Activate" >if 0 NEQ 0 set "_qr=cscript.exe //NoLogo //Job:WmiMethod "KMS_VL_ALL_AIO.cmd?.wsf" "SoftwareLicensingProduct.ID='fbdb3e18-a8ef-4fb3-9183-dffd60bd0984'" Activate" >wmic path SoftwareLicensingProduct where ID='fbdb3e18-a8ef-4fb3-9183-dffd60bd0984' call Activate Executing (\\DESKTOP-EGE0G8H\root\cimv2:SoftwareLicensingProduct.ID="fbdb3e18-a8ef-4fb3-9183-dffd60bd0984")->Activate() ERROR: Description = Server execution failed >call set ERRORCODE=-2146959355 >if -2146959355 EQU -1073418187 ( echo Product Activation Failed: 0xC004F035 if Win8 EQU Win7 echo Windows 7 cannot be KMS-activated on this computer due to unqualified OEM BIOS. echo See Read Me for details. exit /b ) >if -2146959355 EQU -1073417728 ( echo Product Activation Failed: 0xC004F200 echo Windows needs to rebuild the activation-related files. echo See KB2736303 for details. exit /b ) >if -2146959355 EQU -1073422315 ( echo Product Activation Failed: 0xC004E015 echo Running slmgr.vbs /rilc to mitigate. cscript //Nologo //B C:\Windows\System32\slmgr.vbs /rilc ) >if -2146959355 NEQ 0 ( if SoftwareLicensingService EQU SoftwareLicensingService (call :StopService sppsvc ) else (call :StopService osppsvc ) wmic path SoftwareLicensingProduct where ID='fbdb3e18-a8ef-4fb3-9183-dffd60bd0984' call Activate call set ERRORCODE=!ERRORLEVEL! ) >sc query sppsvc | find /i "STOPPED" || net stop sppsvc /y The Software Protection service is stopping. The Software Protection service was stopped successfully. >sc query sppsvc | find /i "STOPPED" || sc stop sppsvc STATE : 1 STOPPED >goto :eof Executing (\\DESKTOP-EGE0G8H\root\cimv2:SoftwareLicensingProduct.ID="fbdb3e18-a8ef-4fb3-9183-dffd60bd0984")->Activate() ERROR: Description = Server execution failed >set gpr=0 >set gpr2=0 >set "_qr="wmic path SoftwareLicensingProduct where (ID='fbdb3e18-a8ef-4fb3-9183-dffd60bd0984') get GracePeriodRemaining /value"" >for /F "tokens=2 delims==" %x in ('"wmic path SoftwareLicensingProduct where (ID='fbdb3e18-a8ef-4fb3-9183-dffd60bd0984') get GracePeriodRemaining /value"') do (set gpr=%x & set /a "gpr2=(%x+1440-1)/1440" ) >(set gpr=0 & set /a "gpr2=(0 +1440-1)/1440" ) >if -2146959355 EQU 0 if 0 EQU 0 ( echo Product Activation succeeded, but Remaining Period failed to increase. if Win8 EQU Win7 echo This could be related to the error described in KB4487266 exit /b ) >set Act_OK=0 >if 0 EQU 43200 if 1 EQU 0 if 18363 GEQ 9200 set Act_OK=1 >if 0 EQU 64800 set Act_OK=1 >if 0 GTR 259200 if 0 EQU 1 set Act_OK=1 >if 0 EQU 259200 set Act_OK=1 >if -2146959355 EQU 0 if 0 EQU 1 ( echo Product Activation Successful echo Remaining Period: 0 days (0 minutes) exit /b ) >cmd /c exit /b -2146959355 >if -2146959355 NEQ 0 (echo Product Activation Failed: 0x!=ExitCode! ) else (echo Product Activation Failed ) Product Activation Failed: 0x80080005 >echo Remaining Period: 0 days (0 minutes) Remaining Period: 0 days (0 minutes) >set S_OK=0 >exit /b >if 1 EQU 0 (call :cREG ) else ( reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /f /v DisableDnsPublishing 1>nul 2>nul reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /f /v DisableKeyManagementServiceHostCaching 1>nul 2>nul ) >exit /b >if 1 NEQ 0 call :RunOSPP >set spp=OfficeSoftwareProtectionProduct >set sps=OfficeSoftwareProtectionService >set Off1ce=0 >set RanR2V=0 >set aC2R21=0 >set aC2R19=0 >set aC2R16=0 >set aC2R15=0 >if 18363 LSS 9200 (set "aword=2010-2021" ) else (set "aword=2010" ) >if 0 EQU 0 (echo. & echo No Installed Office 2010 Product Detected... & exit /b ) No Installed Office 2010 Product Detected... >if 1 EQU 0 (echo. & echo Office activation is OFF... ) >if 0 EQU 0 if 0 EQU 0 call :CheckFR >if not exist "C:\Windows\System32\SppExtComObjHook.dll" ( echo. echo ==== ERROR ==== echo File existence failed. echo "C:\Windows\System32\SppExtComObjHook.dll" echo. echo Verify that Antivirus protection is OFF or the file path is excluded. ) >for /F "skip=1 tokens=* delims=" %# in ('certutil -hashfile "C:\Windows\System32\SppExtComObjHook.dll" SHA1|findstr /i /v CertUtil') do set "_hash=%#" >set "_hash=684103f5c312ae956e66a02b965d9aad59710745" >set "_hash=684103f5c312ae956e66a02b965d9aad59710745" >if /I not "684103f5c312ae956e66a02b965d9aad59710745" == "684103f5c312ae956e66a02b965d9aad59710745" ( echo. echo ==== ERROR ==== echo SHA1 hash verification failed. echo "C:\Windows\System32\SppExtComObjHook.dll" echo Expected: 684103f5c312ae956e66a02b965d9aad59710745 echo Detected: 684103f5c312ae956e66a02b965d9aad59710745 echo. echo Verify that Antivirus protection is OFF or the file path is excluded. ) >set E_REG=0 >if 1 NEQ 0 for %A in (VerifierDlls VerifierDebug VerifierFlags GlobalFlag KMS_Emulation) do (reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /v %A || set E_REG=1 ) >(reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /v VerifierDlls || set E_REG=1 ) HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe VerifierDlls REG_SZ SppExtComObjHook.dll >(reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /v VerifierDebug || set E_REG=1 ) HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe VerifierDebug REG_DWORD 0x0 >(reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /v VerifierFlags || set E_REG=1 ) HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe VerifierFlags REG_DWORD 0x80000000 >(reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /v GlobalFlag || set E_REG=1 ) HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe GlobalFlag REG_DWORD 0x100 >(reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /v KMS_Emulation || set E_REG=1 ) HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe KMS_Emulation REG_DWORD 0x1 >if 0 EQU 1 ( echo. echo ==== ERROR ==== echo Some or all required registry values are missing. echo [HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe] echo VerifierDlls, VerifierDebug, VerifierFlags, GlobalFlag, KMS_Emulation echo. echo Verify that Antivirus protection is OFF or the registry path is excluded. ) >set E_REG=0 >if 0 NEQ 0 for %A in (VerifierDlls VerifierDebug VerifierFlags GlobalFlag KMS_Emulation) do (reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe" /v %A || set E_REG=1 ) >if 0 EQU 1 ( echo. echo ==== ERROR ==== echo Some or all required registry values are missing. echo [HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe] echo VerifierDlls, VerifierDebug, VerifierFlags, GlobalFlag, KMS_Emulation echo. echo Verify that Antivirus protection is OFF or the registry path is excluded. ) >set E_WMI=0 >for /F "skip=2 tokens=2*" %a in ('reg query HKLM\SYSTEM\CurrentControlSet\Services\WinMgmt /v Start ') do if /I %b EQU 0x4 set E_WMI=1 >if /I 0x2 EQU 0x4 set E_WMI=1 >set "_qr=wmic path Win32_ComputerSystem get CreationClassName /value" >wmic path Win32_ComputerSystem get CreationClassName /value | find /i "computersystem" CreationClassName=Win32_ComputerSystem >if 0 NEQ 0 set E_WMI=1 >set "_qr=wmic path SoftwareLicensingService get Version /value" >wmic path SoftwareLicensingService get Version /value | find /i "." Version=10.0.18362.1016 >if 0 NEQ 0 set E_WMI=1 >if 0 EQU 1 ( echo. echo ==== ERROR ==== echo Failed running WMI query check. echo. echo Verify that these services are working correctly: echo Windows Management Instrumentation [WinMgmt] echo Software Protection [sppsvc] ) >goto :eof >if exist "!_temp!\crv*.txt" del /f /q "!_temp!\crv*.txt" >if exist "!_temp!\*chk.txt" del /f /q "!_temp!\*chk.txt" >if exist "!_temp!\slmgr.vbs" del /f /q "!_temp!\slmgr.vbs" >call :StopService sppsvc >sc query sppsvc | find /i "STOPPED" || net stop sppsvc /y The Software Protection service is stopping. The Software Protection service was stopped successfully. >sc query sppsvc | find /i "STOPPED" || sc stop sppsvc STATE : 1 STOPPED >goto :eof >if 0 NEQ 0 call :StopService osppsvc >if 1 EQU 0 call :RemoveHook >sc start sppsvc trigger=timer;sessionid=0 SERVICE_NAME: sppsvc TYPE : 10 WIN32_OWN_PROCESS STATE : 2 START_PENDING (NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN) WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x1 WAIT_HINT : 0x4e20 PID : 2204 FLAGS : >if 1 EQU 1 (echo. & echo ____________________________________________________________ & echo. if 0 EQU 0 if "DoActivate" == "DoActivate" ( echo. echo Make sure to exclude this file in the Antivirus protection. echo C:\Windows\System32\SppExtComObjHook.dll ) ) ____________________________________________________________ Make sure to exclude this file in the Antivirus protection. C:\Windows\System32\SppExtComObjHook.dll >set External=0 >set KMS_IP=0.0.0.0 >if 0 EQU 1 timeout 5 >if 0 EQU 1 timeout 5 >if 1 NEQ 0 goto :TheEnd >if exist "C:\Users\Public\ReadMeAIO.html" del /f /q "C:\Users\Public\ReadMeAIO.html" >if exist "C:\Windows\Temp\'" del /f /q "C:\Windows\Temp\'" >if exist "C:\Windows\Temp\`.txt" del /f /q "C:\Windows\Temp\`.txt" >if defined _quit goto :eof >echo. >if 1 EQU 0 echo Press any key to exit. >goto :eof