[DISCUSSION] Microsoft Office 2019

Discussion in 'Microsoft Office' started by ratzlefatz, Sep 26, 2017.

  1. coleoptere2007

    coleoptere2007 MDL Guru

    Apr 8, 2008
    3,311
    1,938
    120
    First you need to have a VL version or convert Retail to VL, for the other questions I dunno.
     
  2. Windows_Addict

    Windows_Addict MDL Expert

    Jul 19, 2018
    1,255
    3,455
    60
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Bobby P.

    Bobby P. MDL Novice

    Oct 4, 2015
    31
    0
    0
    HELP! After a year or so, having installed and activated flawlessly Office 2019 Pro Plus , using abbodi's KMS VL ALL tool, modified so as to renew activation every day (1440 minutes), I just discovered that since I updated WINDOWS 10 to ver. 1909 -from 1903-, about a month ago, no auto renewal occurs. I am on WIN 10 1909 enterprise,OFFICE PRO PLUS and VISIO 2004 and activation days have gone from 179 to 148(today).
    I ran AutoRenewal-Setup to uninstall the script, then rebooted and ran again AutoRenewal-Setup to re-activate Office but all I 've got is failure (error 0xC004F074). Any ideas before I delete everything and start from scratch? THANX
     
  4. sweks

    sweks MDL Novice

    Jul 18, 2015
    1
    0
    0
  5. Windows_Addict

    Windows_Addict MDL Expert

    Jul 19, 2018
    1,255
    3,455
    60
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Bobby P.

    Bobby P. MDL Novice

    Oct 4, 2015
    31
    0
    0
    Code:
    >if 1 EQU 1 (
    if defined _args echo /d /a /o 
     echo "!_batf!"
    )
    /d /a /o
    "C:\O19\KMS_VL_ALL_AIO.cmd"
    
    >if exist "C:\WINDOWS\Temp\'" del /f /q "C:\WINDOWS\Temp\'"
    
    >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=__________________________________________________"
    
    >for /F "tokens=6 delims=[]. " %G in ('ver') do set winbuild=%G
    
    >set winbuild=18363
    
    >set "_cRed=0C"
    
    >set "_cYel=0E"
    
    >if 18363 GTR 14393 (
    set "_cRed=04" 
     set "_cYel=06"
    )
    
    >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
    
    >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=1440
    
    >set _uAI=120
    
    >set _dDbg=No
    
    >if 0 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 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 KMS_Emulation    && set AUR=1 
     reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe" /v KMS_Emulation    && set AUR=1
    )
    File Not Found
    ERROR: The system was unable to find the specified registry key or value.
    ERROR: The system was unable to find the specified registry key or value.
    
    >if 1 EQU 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 0 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=31 
     powershell -nop -ep bypass -c "&{$H=get-host;$W=$H.ui.rawui;$B=$W.buffersize;$B.height=300;$W.buffersize=$B;}"
    ) 
     echo. & echo ____________________________________________________________  & echo.
     echo Installing Local KMS Emulator...
    )
    
    ____________________________________________________________
    
    Installing Local KMS Emulator...
    
    >if 18363 GEQ 9600 (WMIC /NAMESPACE:\\root\Microsoft\Windows\Defender PATH MSFT_MpPreference call Add ExclusionPath="C:\WINDOWS\System32\SppExtComObjHook.dll"    && set "AddExc= and Windows Defender exclusion" )
    Executing (MSFT_MpPreference)->Add()
    
    ERROR:
    
    Description = Generic failure
    
    
    >if 1 EQU 1 (
    echo.
     echo Adding File... 
     echo C:\WINDOWS\System32\SppExtComObjHook.dll
    )
    
    Adding File...
    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\System32\SppExtComObjHookAvrf.dll" (del /f /q "C:\WINDOWS\System32\SppExtComObjHookAvrf.dll"  )
    
    >if exist "C:\WINDOWS\System32\SppExtComObjHook.dll" (del /f /q "C:\WINDOWS\System32\SppExtComObjHook.dll"  )
    
    >if exist "C:\WINDOWS\System32\SppExtComObjPatcher.dll" (del /f /q "C:\WINDOWS\System32\SppExtComObjPatcher.dll"  )
    
    >if exist "C:\WINDOWS\System32\SppExtComObjPatcher.exe" (del /f /q "C:\WINDOWS\System32\SppExtComObjPatcher.exe"  )
    
    >pushd C:\WINDOWS\System32
    
    >powershell -nop -ep bypass -c "$f=[io.file]::ReadAllText('!_batp!') -split ':x64dll\:.*';iex ($f[1]);X 1;"
    
    >popd
    
    >if not exist "C:\WINDOWS\System32\SppExtComObjHook.dll" goto :E_DLL
    
    >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 
    ERROR: The system was unable to find the specified registry key or value.
    
    >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v VerifierDlls /t REG_SZ /d "SppExtComObjHook.dll" 
    ERROR: Access is denied.
    
    
    >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v GlobalFlag /t REG_DWORD /d 256 
    ERROR: Access is denied.
    
    
    >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v KMS_Emulation /t REG_DWORD /d 1 
    ERROR: Access is denied.
    
    
    >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v KMS_ActivationInterval /t REG_DWORD /d 120 
    ERROR: Access is denied.
    
    
    >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v KMS_RenewalInterval /t REG_DWORD /d 1440 
    ERROR: Access is denied.
    
    
    >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"  )
    ERROR: Access is denied.
    
    
    >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 
    ERROR: The system was unable to find the specified registry key or value.
    
    >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe" /f /v VerifierDlls /t REG_SZ /d "SppExtComObjHook.dll" 
    ERROR: Access is denied.
    
    
    >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe" /f /v GlobalFlag /t REG_DWORD /d 256 
    ERROR: Access is denied.
    
    
    >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe" /f /v KMS_Emulation /t REG_DWORD /d 1 
    ERROR: Access is denied.
    
    
    >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe" /f /v KMS_ActivationInterval /t REG_DWORD /d 120 
    ERROR: Access is denied.
    
    
    >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe" /f /v KMS_RenewalInterval /t REG_DWORD /d 1440 
    ERROR: Access is denied.
    
    
    >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" 
    ) )
    
    Folder: \Microsoft\Windows\SoftwareProtectionPlatform
    TaskName                                 Next Run Time          Status         
    ======================================== ====================== ===============
    SvcTrigger                               N/A                    Ready         
    
    >schtasks /query /tn "\Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger"    || (
    pushd C:\WINDOWS\Temp 
     powershell -nop -ep bypass -c "$f=[io.file]::ReadAllText('!_batp!') -split ':spptask\:.*';iex ($f[1]);" 
     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 Schedule Task... 
     echo \Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger
    )
    
    Folder: \Microsoft\Windows\SoftwareProtectionPlatform
    TaskName                                 Next Run Time          Status         
    ======================================== ====================== ===============
    SvcTrigger                               N/A                    Ready         
    
    Adding Schedule Task...
    \Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger
    
    >goto :eof
    
    >if 1 EQU 1 echo. & echo ____________________________________________________________  & echo.
    
    ____________________________________________________________
    
    
    >goto :DoActivate
    
    >if No == Yes (
    set "_para=/d" 
     if 0 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 172.16.0.2" 
     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 "172.16.0.2" == "172.16.0.2" set External=0 )
    
    >if 0 EQU 1 (set AUR=1 )
    
    >if 0 EQU 0 (set KMS_IP=172.16.0.2 )
    
    >if 1 EQU 0 (
    set KMS_RenewalInterval=43200 
     set KMS_ActivationInterval=43200
    )  else (
    set KMS_RenewalInterval=1440 
     set KMS_ActivationInterval=120
    )
    
    >if 0 EQU 1 (color 8F  & set "mode=External ^(172.16.0.2^)" )  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 v38.0 )  else (title KMS_VL_ALL_AIO v38.0 : Auto Renewal ) )  else (
    echo.
     echo Running KMS_VL_ALL_AIO v38.0
    )
    
    Running KMS_VL_ALL_AIO v38.0
    
    >if 0 EQU 0 if 1 EQU 0 (powershell -nop -ep bypass -c "&{$H=get-host;$W=$H.ui.rawui;$B=$W.buffersize;$B.height=300;$W.buffersize=$B;}" )
    
    >if 18363 GEQ 9600 (reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" /f /v NoGenTicket /t REG_DWORD /d 1  )
    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 query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /v KMS_Emulation    || goto :eof
    ERROR: The system was unable to find the specified registry key or value.
    
    >reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osppsvc.exe" /v KMS_Emulation    || goto :eof
    ERROR: The system was unable to find the specified registry key or value.
    
    >if 0 EQU 1 if 1 EQU 1 (call :UpdateOSPPEntry osppsvc.exe )
    
    >SET Win10Gov=0
    
    >IF 18363 LSS 14393 if 1 NEQ 0 GOTO :Main
    
    >SET "EditionWMI="
    
    >SET "EditionID="
    
    >SET "RegKey=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages"
    
    >SET "Pattern=Microsoft-Windows-*Edition~31bf3856ad364e35"
    
    >SET "EditionPKG=NUL"
    
    >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.815" /v "CurrentState"    | FIND /I "0x70"    && (FOR /F "TOKENS=3 DELIMS=-~" %B IN ('ECHO Microsoft-Windows-ProfessionalEdition~31bf3856ad364e35~amd64~~10.0.18362.815') DO SET "EditionPKG=%B" ) )
    
    >(REG QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Microsoft-Windows-ProfessionalEdition~31bf3856ad364e35~amd64~~10.0.18362.836" /v "CurrentState"    | FIND /I "0x70"    && (FOR /F "TOKENS=3 DELIMS=-~" %B IN ('ECHO Microsoft-Windows-ProfessionalEdition~31bf3856ad364e35~amd64~~10.0.18362.836') DO SET "EditionPKG=%B" ) )
        CurrentState    REG_DWORD    0x70
    
    >SET "EditionPKG=ProfessionalEdition"
    
    >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" )
    
    >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=Enterprise
    "
    
    >IF "Enterprise" == "" (
    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
    )
    
    >FOR %A IN (Cloud CloudN IoTEnterprise IoTEnterpriseS ProfessionalSingleLanguage ProfessionalCountrySpecific) DO (IF /I "Enterprise" == "%A" GOTO :Main )
    
    >(IF /I "Enterprise" == "Cloud" GOTO :Main )
    
    >(IF /I "Enterprise" == "CloudN" GOTO :Main )
    
    >(IF /I "Enterprise" == "IoTEnterprise" GOTO :Main )
    
    >(IF /I "Enterprise" == "IoTEnterpriseS" GOTO :Main )
    
    >(IF /I "Enterprise" == "ProfessionalSingleLanguage" GOTO :Main )
    
    >(IF /I "Enterprise" == "ProfessionalCountrySpecific" GOTO :Main )
    
    >SET "EditionID=Enterprise"
    
    >IF DEFINED EditionID FOR %A IN (EnterpriseG EnterpriseGN) DO (IF /I "Enterprise" == "%A" SET Win10Gov=1 )
    
    >(IF /I "Enterprise" == "EnterpriseG" SET Win10Gov=1 )
    
    >(IF /I "Enterprise" == "EnterpriseGN" SET Win10Gov=1 )
    
    >if defined EditionID (set "_winos=Windows Enterprise 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 Enterprise"
    
    >set "nKMS=does not support KMS activation..."
    
    >set "nEval=Evaluation Editions cannot be activated. Please install full Windows OS."
    
    >if defined EditionID echo Enterprise  | findstr /I /E Eval    && (
    set _eval=1 
     echo Enterprise  | findstr /I /B Server    && (set "nEval=Server Evaluation cannot be activated. Please convert to full Server OS." )
    )
    
    >set "_C16R="
    
    >reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath    && (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
    
    
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration
        ProductReleaseIds    REG_SZ    VisioPro2019Retail,ProPlus2019Retail,ProPlus2019Volume,VisioPro2019Volume
    
    
    >set "_C15R="
    
    >reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun /v InstallPath    && (
    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 _V16Ids=Mondo,ProPlus,ProjectPro,VisioPro,Standard,ProjectStd,VisioStd,Access,SkypeforBusiness,OneNote,Excel,Outlook,PowerPoint,Publisher,Word
    
    >set _R16Ids=Mondo,ProPlus,ProjectPro,VisioPro,Standard,ProjectStd,VisioStd,Access,SkypeforBusiness,OneNote,Excel,Outlook,PowerPoint,Publisher,Word,Professional,HomeBusiness,HomeStudent,O365Business,O365SmallBusPrem,O365HomePrem,O365EduCloud
    
    >set _O16MSI=0
    
    >set _O15MSI=0
    
    >for %A in (14 15 16 19) do call :officeLoc %A
    
    >call :officeLoc 14
    
    >set loc_off14=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
    )
    
    >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 
     if 14 EQU 16 set _O16MSI=1 
     if 14 EQU 15 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\14.0\Common\InstallRoot /v Path" ') do if exist "%b\OSPP.VBS" (
    set loc_off14=1 
     if 14 EQU 16 set _O16MSI=1 
     if 14 EQU 15 set _O15MSI=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 x64 == x64 if exist "C:\Program Files\Microsoft Office\Office14\OSPP.VBS" set loc_off14=1
    
    >if x64 == x64 if exist "C:\Program Files (x86)\Microsoft Office\Office14\OSPP.VBS" set loc_off14=1
    
    >exit /b
    
    >call :officeLoc 15
    
    >set loc_off15=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
    )
    
    >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 
     if 15 EQU 16 set _O16MSI=1 
     if 15 EQU 15 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 
     if 15 EQU 16 set _O16MSI=1 
     if 15 EQU 15 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 x64 == x64 if exist "C:\Program Files\Microsoft Office\Office15\OSPP.VBS" set loc_off15=1
    
    >if x64 == x64 if exist "C:\Program Files (x86)\Microsoft Office\Office15\OSPP.VBS" set loc_off15=1
    
    >exit /b
    
    >call :officeLoc 16
    
    >set loc_off16=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
    )
    
    >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 
     if 16 EQU 16 set _O16MSI=1 
     if 16 EQU 15 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\16.0\Common\InstallRoot /v Path" ') do if exist "%b\OSPP.VBS" (
    set loc_off16=1 
     if 16 EQU 16 set _O16MSI=1 
     if 16 EQU 15 set _O15MSI=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 VisioPro2019Retail,ProPlus2019Retail,ProPlus2019Volume,VisioPro2019Volume 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
    
    >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
    )
        ProductReleaseIds    REG_SZ    VisioPro2019Retail,ProPlus2019Retail,ProPlus2019Volume,VisioPro2019Volume
    
    >call :RunSPP
    
    >set spp=SoftwareLicensingProduct
    
    >set sps=SoftwareLicensingService
    
    >set W1nd0ws=1
    
    >set WinPerm=0
    
    >set WinVL=0
    
    >set Off1ce=0
    
    >set RunR2V=0
    
    >if 18363 GEQ 9200 if 1 NEQ 0 call :sppoff
    
    >set _sC2R=sppoff
    
    >set _fC2R=ReturnSPP
    
    >set vol_off15=0  & set vol_off16=0  & set vol_off19=0
    
    >wmic path SoftwareLicensingProduct where (Description like '%KMSCLIENT%' AND NOT Name like '%MondoR_KMS_Automation%') get Name  1>"!_temp!\sppchk.txt" 2>&1
    
    >find /i "Office 19" "!_temp!\sppchk.txt"    && (set vol_off19=1 )
    
    ---------- C:\WINDOWS\TEMP\SPPCHK.TXT
    Office 19, Office19ProPlus2019XC2RVL_KMS_ClientC2R edition   
    Office 19, Office19VisioPro2019XC2RVL_KMS_ClientC2R edition 
    Office 19, Office19VisioPro2019VL_KMS_Client_AE edition     
    Office 19, Office19ProPlus2019VL_KMS_Client_AE edition       
    
    >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
    
    >for %A in (15 16 19) do if !loc_off%A! EQU 0 set vol_off%A=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 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    | find /i "O365"    || (set vol_off16=0 ) )
    
    >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    | find /i "O365"    || (set vol_off15=0 ) )
    
    >set ret_off15=0  & set ret_off16=0  & set ret_off19=0
    
    >wmic path SoftwareLicensingProduct where (ApplicationID='0ff1ce15-a989-479d-af46-f275c6370663' AND NOT Name like '%O365%') get Name  1>"!_temp!\sppchk.txt" 2>&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 )
    
    >if 0 EQU 1 if 0 EQU 0 set vol_off19=0
    
    >if 0 EQU 1 if 0 EQU 0 set vol_off16=0
    
    >if 0 EQU 1 if 0 EQU 0 set vol_off15=0
    
    >set loc_offgl=1
    
    >if 1 EQU 0 if 0 EQU 0 if 0 EQU 0 set loc_offgl=0
    
    >if 1 EQU 1 set Off1ce=1
    
    >set vol_offgl=1
    
    >if 1 EQU 0 if 0 EQU 0 if 0 EQU 0 set vol_offgl=0
    
    >if 1 EQU 1 if 1 EQU 0 if 0 EQU 0 if 1 EQU 1 goto :C2RR2V
    
    >if defined _C16R if 0 EQU 1 if 0 EQU 0 if 1 EQU 0 if 0 EQU 0 if 1 EQU 1 goto :C2RR2V
    
    >if defined _C15R if 0 EQU 1 if 0 EQU 0 if 0 EQU 0 if 1 EQU 1 goto :C2RR2V
    
    >if 1 EQU 1 exit /b
    
    >wmic path SoftwareLicensingProduct where (Description like '%KMSCLIENT%') get Name    | findstr /i Windows    && (set WinVL=1 )  || (if 0 EQU 0 (echo. & echo Windows activation is OFF... )  else (echo. & echo Windows 10 Enterprise does not support KMS activation... 
     if defined _eval echo Evaluation Editions cannot be activated. Please install full Windows OS. ) )
    Windows(R), Professional edition                             
    
    Windows(R), ProfessionalEducation edition                   
    
    Windows(R), Enterprise edition                               
    
    Windows(R), ProfessionalWorkstation edition                 
    
    Windows(R), Education edition                               
    
    Windows(R), ServerRdsh edition                               
    
    Windows(R), ServerRdsh edition                               
    
    
    >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   
     reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" /f 
    )
    
    >wmic path SoftwareLicensingProduct where (ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' and Description like '%KMSCLIENT%' and PartialProductKey is not NULL) get Name    | findstr /i Windows    && (set _gvlk=1 )  || (set _gvlk=0 )
    No Instance(s) Available.
    
    
    >set gpr=0
    
    >if 18363 GEQ 10240 if 1 NEQ 0 if 0 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"
    
    >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    | findstr /i EnterpriseG    && (call set W1nd0ws=1 )
    )
    
    >for /F "tokens=2 delims==" %A in ('"wmic path SoftwareLicensingService get Version /VALUE"') do set ver=%A
    
    >set ver=10.0.18362.815
     
    
    >wmic path SoftwareLicensingService where version='10.0.18362.815' call SetKeyManagementServiceMachine MachineName="172.16.0.2" 
    Executing (\\BOB-PC\root\cimv2:SoftwareLicensingService.Version="10.0.18362.815")->SetKeyManagementServiceMachine()
    
    Method execution successful.
    
    Out Parameters:
    instance of __PARAMETERS
    {
    };
    
    
    >wmic path SoftwareLicensingService where version='10.0.18362.815' call SetKeyManagementServicePort 1688 
    Executing (\\BOB-PC\root\cimv2:SoftwareLicensingService.Version="10.0.18362.815")->SetKeyManagementServicePort()
    
    Method execution successful.
    
    Out Parameters:
    instance of __PARAMETERS
    {
    };
    
    
    >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 )
    
    >if 1 EQU 1 if 0 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 )
    
    >if 1 EQU 1 if 0 EQU 0 (echo. & echo Windows activation is OFF... )
    
    Windows activation is OFF...
    
    >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 )
    
    >(set app=0bc88885-718c-491d-921f-6f214349e79c
      & call :sppchkoff )
    
    >wmic path SoftwareLicensingProduct where ID='0bc88885-718c-491d-921f-6f214349e79c' get Name  1>"!_temp!\sppchk.txt"
    
    >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 1 EQU 0 exit /b )
    
    ---------- C:\WINDOWS\TEMP\SPPCHK.TXT
    Office 19, Office19ProPlus2019XC2RVL_KMS_ClientC2R edition 
    
    >set _office=1
    
    >wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID    | findstr /i "0bc88885-718c-491d-921f-6f214349e79c"    && (echo. & call :activate  & exit /b )
    
    >for /F "tokens=3 delims==, " %G in ('"wmic path SoftwareLicensingProduct where ID='0bc88885-718c-491d-921f-6f214349e79c' get Name /value"') do set OffVer=%G
    
    >set OffVer=19
    
    >call :offchk19
    
    >if /I '0bc88885-718c-491d-921f-6f214349e79c' EQU '0bc88885-718c-491d-921f-6f214349e79c' exit /b
    
    >exit /b
    
    >(set app=500f6619-ef93-4b75-bcb4-82819998a3ca
      & call :sppchkoff )
    
    >wmic path SoftwareLicensingProduct where ID='500f6619-ef93-4b75-bcb4-82819998a3ca' get Name  1>"!_temp!\sppchk.txt"
    
    >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 1 EQU 0 exit /b )
    
    ---------- C:\WINDOWS\TEMP\SPPCHK.TXT
    Office 19, Office19VisioPro2019XC2RVL_KMS_ClientC2R edition 
    
    >set _office=1
    
    >wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID    | findstr /i "500f6619-ef93-4b75-bcb4-82819998a3ca"    && (echo. & call :activate  & exit /b )
    
    >for /F "tokens=3 delims==, " %G in ('"wmic path SoftwareLicensingProduct where ID='500f6619-ef93-4b75-bcb4-82819998a3ca' get Name /value"') do set OffVer=%G
    
    >set OffVer=19
    
    >call :offchk19
    
    >if /I '500f6619-ef93-4b75-bcb4-82819998a3ca' EQU '0bc88885-718c-491d-921f-6f214349e79c' exit /b
    
    >if /I '500f6619-ef93-4b75-bcb4-82819998a3ca' EQU 'fc7c4d0c-2e85-4bb9-afd4-01ed1476b5e9' exit /b
    
    >if /I '500f6619-ef93-4b75-bcb4-82819998a3ca' EQU '500f6619-ef93-4b75-bcb4-82819998a3ca' exit /b
    
    >exit /b
    
    >(set app=5b5cf08f-b81a-431d-b080-3450d8620565
      & call :sppchkoff )
    
    >wmic path SoftwareLicensingProduct where ID='5b5cf08f-b81a-431d-b080-3450d8620565' get Name  1>"!_temp!\sppchk.txt"
    
    >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 1 EQU 0 exit /b )
    
    ---------- C:\WINDOWS\TEMP\SPPCHK.TXT
    Office 19, Office19VisioPro2019VL_KMS_Client_AE edition 
    
    >set _office=1
    
    >wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID    | findstr /i "5b5cf08f-b81a-431d-b080-3450d8620565"    && (echo. & call :activate  & exit /b )
    5b5cf08f-b81a-431d-b080-3450d8620565 
    
    
    
    >wmic path SoftwareLicensingProduct where ID='5b5cf08f-b81a-431d-b080-3450d8620565' call ClearKeyManagementServiceMachine 
    Executing (\\BOB-PC\root\cimv2:SoftwareLicensingProduct.ID="5b5cf08f-b81a-431d-b080-3450d8620565")->ClearKeyManagementServiceMachine()
    
    Method execution successful.
    
    Out Parameters:
    instance of __PARAMETERS
    {
    };
    
    
    >wmic path SoftwareLicensingProduct where ID='5b5cf08f-b81a-431d-b080-3450d8620565' call ClearKeyManagementServicePort 
    Executing (\\BOB-PC\root\cimv2:SoftwareLicensingProduct.ID="5b5cf08f-b81a-431d-b080-3450d8620565")->ClearKeyManagementServicePort()
    
    Method execution successful.
    
    Out Parameters:
    instance of __PARAMETERS
    {
    };
    
    
    >if 1 EQU 0 if 1 EQU 0 if SoftwareLicensingService EQU SoftwareLicensingService (
    wmic path SoftwareLicensingProduct where ID='5b5cf08f-b81a-431d-b080-3450d8620565' call SetKeyManagementServiceMachine MachineName="127.0.0.2"   
     wmic path SoftwareLicensingProduct where ID='5b5cf08f-b81a-431d-b080-3450d8620565' call SetKeyManagementServicePort 1688   
     for /F "tokens=2 delims==" %x in ('"wmic path SoftwareLicensingProduct where ID='5b5cf08f-b81a-431d-b080-3450d8620565' get Name /VALUE"') do echo Checking: %x 
     echo Product is KMS 2038 Activated. 
     exit /b
    )
    
    >for /F "tokens=2 delims==" %x in ('"wmic path SoftwareLicensingProduct where ID='5b5cf08f-b81a-431d-b080-3450d8620565' get Name /VALUE"') do echo Activating: %x
    
    >echo Activating: Office 19, Office19VisioPro2019VL_KMS_Client_AE edition
     
    Activating: Office 19, Office19VisioPro2019VL_KMS_Client_AE edition
    
    
    >wmic path SoftwareLicensingProduct where ID='5b5cf08f-b81a-431d-b080-3450d8620565' call Activate 
    Executing (\\BOB-PC\root\cimv2:SoftwareLicensingProduct.ID="5b5cf08f-b81a-431d-b080-3450d8620565")->Activate()
    
    ERROR:
    
    Description =
    >call set ERRORCODE=-1073418124
    
    >if -1073418124 EQU -1073418187 (
    echo Product Activation Failed: 0xC004F035 
     echo Windows 7 cannot be KMS-activated on this computer due to unqualified OEM BIOS. 
     echo See Read Me for details. 
     exit /b
    )
    
    >if -1073418124 NEQ 0 (
    if SoftwareLicensingService EQU SoftwareLicensingService (call :StopService sppsvc )  else (call :StopService osppsvc ) 
     wmic path SoftwareLicensingProduct where ID='5b5cf08f-b81a-431d-b080-3450d8620565' 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 (\\BOB-PC\root\cimv2:SoftwareLicensingProduct.ID="5b5cf08f-b81a-431d-b080-3450d8620565")->Activate()
    
    ERROR:
    
    Description =
    >if SoftwareLicensingService EQU SoftwareLicensingService wmic path SoftwareLicensingService where version='10.0.18362.815' call RefreshLicenseStatus 
    Executing (\\BOB-PC\root\cimv2:SoftwareLicensingService.Version="10.0.18362.815")->RefreshLicenseStatus()
    
    Method execution successful.
    
    Out Parameters:
    instance of __PARAMETERS
    {
    };
    
    
    >set gpr=0
    
    >set gpr2=0
    
    >for /F "tokens=2 delims==" %x in ('"wmic path SoftwareLicensingProduct where ID='5b5cf08f-b81a-431d-b080-3450d8620565' get GracePeriodRemaining /VALUE"') do (set gpr=%x  & set /a "gpr2=(%x+1440-1)/1440" )
    
    >(set gpr=213186
      & set /a "gpr2=(213186
    +1440-1)/1440" )
    
    >if 213186 EQU 43200 if 1 EQU 0 if 18363 GEQ 9200 (
    echo Product Activation Successful 
     echo Remaining Period: 149 days (213186 minutes) 
     exit /b
    )
    
    >if 213186 EQU 64800 (
    echo Product Activation Successful 
     echo Remaining Period: 149 days (213186 minutes) 
     exit /b
    )
    
    >if 213186 GTR 259200 if 0 EQU 1 (
    echo Product Activation Successful 
     echo Remaining Period: 149 days (213186 minutes) 
     exit /b
    )
    
    >if 213186 EQU 259200 (
    echo Product Activation Successful 
     echo Remaining Period: 149 days (213186 minutes) 
     exit /b
    )
    
    >cmd /c exit /b -1073418124
    
    >if -1073418124 NEQ 0 (echo Product Activation Failed: 0x!=ExitCode! )  else (echo Product Activation Failed )
    Product Activation Failed: 0xC004F074
    
    >echo Remaining Period: 149 days (213186 minutes)
    Remaining Period: 149 days (213186 minutes)
    
    >exit /b
    
    >(set app=85dd8b5f-eaa4-4af3-a628-cce9e77c9a03
      & call :sppchkoff )
    
    >wmic path SoftwareLicensingProduct where ID='85dd8b5f-eaa4-4af3-a628-cce9e77c9a03' get Name  1>"!_temp!\sppchk.txt"
    
    >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 1 EQU 0 exit /b )
    
    ---------- C:\WINDOWS\TEMP\SPPCHK.TXT
    Office 19, Office19ProPlus2019VL_KMS_Client_AE edition 
    
    >set _office=1
    
    >wmic path SoftwareLicensingProduct where (PartialProductKey is not NULL) get ID    | findstr /i "85dd8b5f-eaa4-4af3-a628-cce9e77c9a03"    && (echo. & call :activate  & exit /b )
    85dd8b5f-eaa4-4af3-a628-cce9e77c9a03 
    
    
    
    >wmic path SoftwareLicensingProduct where ID='85dd8b5f-eaa4-4af3-a628-cce9e77c9a03' call ClearKeyManagementServiceMachine 
    Executing (\\BOB-PC\root\cimv2:SoftwareLicensingProduct.ID="85dd8b5f-eaa4-4af3-a628-cce9e77c9a03")->ClearKeyManagementServiceMachine()
    
    Method execution successful.
    
    Out Parameters:
    instance of __PARAMETERS
    {
    };
    
    
    >wmic path SoftwareLicensingProduct where ID='85dd8b5f-eaa4-4af3-a628-cce9e77c9a03' call ClearKeyManagementServicePort 
    Executing (\\BOB-PC\root\cimv2:SoftwareLicensingProduct.ID="85dd8b5f-eaa4-4af3-a628-cce9e77c9a03")->ClearKeyManagementServicePort()
    
    Method execution successful.
    
    Out Parameters:
    instance of __PARAMETERS
    {
    };
    
    
    >if 1 EQU 0 if 1 EQU 0 if SoftwareLicensingService EQU SoftwareLicensingService (
    wmic path SoftwareLicensingProduct where ID='85dd8b5f-eaa4-4af3-a628-cce9e77c9a03' call SetKeyManagementServiceMachine MachineName="127.0.0.2"   
     wmic path SoftwareLicensingProduct where ID='85dd8b5f-eaa4-4af3-a628-cce9e77c9a03' call SetKeyManagementServicePort 1688   
     for /F "tokens=2 delims==" %x in ('"wmic path SoftwareLicensingProduct where ID='85dd8b5f-eaa4-4af3-a628-cce9e77c9a03' get Name /VALUE"') do echo Checking: %x 
     echo Product is KMS 2038 Activated. 
     exit /b
    )
    
    >for /F "tokens=2 delims==" %x in ('"wmic path SoftwareLicensingProduct where ID='85dd8b5f-eaa4-4af3-a628-cce9e77c9a03' get Name /VALUE"') do echo Activating: %x
    
    >echo Activating: Office 19, Office19ProPlus2019VL_KMS_Client_AE edition
     
    Activating: Office 19, Office19ProPlus2019VL_KMS_Client_AE edition
    
    
    >wmic path SoftwareLicensingProduct where ID='85dd8b5f-eaa4-4af3-a628-cce9e77c9a03' call Activate 
    Executing (\\BOB-PC\root\cimv2:SoftwareLicensingProduct.ID="85dd8b5f-eaa4-4af3-a628-cce9e77c9a03")->Activate()
    
    ERROR:
    
    Description =
    >call set ERRORCODE=-1073418124
    
    >if -1073418124 EQU -1073418187 (
    echo Product Activation Failed: 0xC004F035 
     echo Windows 7 cannot be KMS-activated on this computer due to unqualified OEM BIOS. 
     echo See Read Me for details. 
     exit /b
    )
    
    >if -1073418124 NEQ 0 (
    if SoftwareLicensingService EQU SoftwareLicensingService (call :StopService sppsvc )  else (call :StopService osppsvc ) 
     wmic path SoftwareLicensingProduct where ID='85dd8b5f-eaa4-4af3-a628-cce9e77c9a03' 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 (\\BOB-PC\root\cimv2:SoftwareLicensingProduct.ID="85dd8b5f-eaa4-4af3-a628-cce9e77c9a03")->Activate()
    
    ERROR:
    
    Description =
    >if SoftwareLicensingService EQU SoftwareLicensingService wmic path SoftwareLicensingService where version='10.0.18362.815' call RefreshLicenseStatus 
    Executing (\\BOB-PC\root\cimv2:SoftwareLicensingService.Version="10.0.18362.815")->RefreshLicenseStatus()
    
    Method execution successful.
    
    Out Parameters:
    instance of __PARAMETERS
    {
    };
    
    
    >set gpr=0
    
    >set gpr2=0
    
    >for /F "tokens=2 delims==" %x in ('"wmic path SoftwareLicensingProduct where ID='85dd8b5f-eaa4-4af3-a628-cce9e77c9a03' get GracePeriodRemaining /VALUE"') do (set gpr=%x  & set /a "gpr2=(%x+1440-1)/1440" )
    
    >(set gpr=213185
      & set /a "gpr2=(213185
    +1440-1)/1440" )
    
    >if 213185 EQU 43200 if 1 EQU 0 if 18363 GEQ 9200 (
    echo Product Activation Successful 
     echo Remaining Period: 149 days (213185 minutes) 
     exit /b
    )
    
    >if 213185 EQU 64800 (
    echo Product Activation Successful 
     echo Remaining Period: 149 days (213185 minutes) 
     exit /b
    )
    
    >if 213185 GTR 259200 if 0 EQU 1 (
    echo Product Activation Successful 
     echo Remaining Period: 149 days (213185 minutes) 
     exit /b
    )
    
    >if 213185 EQU 259200 (
    echo Product Activation Successful 
     echo Remaining Period: 149 days (213185 minutes) 
     exit /b
    )
    
    >cmd /c exit /b -1073418124
    
    >if -1073418124 NEQ 0 (echo Product Activation Failed: 0x!=ExitCode! )  else (echo Product Activation Failed )
    Product Activation Failed: 0xC004F074
    
    >echo Remaining Period: 149 days (213185 minutes)
    Remaining Period: 149 days (213185 minutes)
    
    >exit /b
    
    >if 1 EQU 0 (
    call :cKMS   
     call :cREG 
    )  else (
    wmic path SoftwareLicensingService where version='10.0.18362.815' call DisableKeyManagementServiceDnsPublishing 0   
     wmic path SoftwareLicensingService where version='10.0.18362.815' call DisableKeyManagementServiceHostCaching 0 
    )
    Executing (\\BOB-PC\root\cimv2:SoftwareLicensingService.Version="10.0.18362.815")->DisableKeyManagementServiceDnsPublishing()
    
    Method execution successful.
    
    Out Parameters:
    instance of __PARAMETERS
    {
    };
    
    Executing (\\BOB-PC\root\cimv2:SoftwareLicensingService.Version="10.0.18362.815")->DisableKeyManagementServiceHostCaching()
    
    Method execution successful.
    
    Out Parameters:
    instance of __PARAMETERS
    {
    };
    
    
    >exit /b
    
    >if 1 NEQ 0 call :RunOSPP
    
    >set spp=OfficeSoftwareProtectionProduct
    
    >set sps=OfficeSoftwareProtectionService
    
    >set Off1ce=0
    
    >set RunR2V=0
    
    >if 18363 LSS 9200 (set "aword=2010/2013/2016/2019" )  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 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         : 0x0
            WAIT_HINT          : 0x7d0
            PID                : 18604
            FLAGS              :
    
    >set External=0
    
    >set KMS_IP=172.16.0.2
    
    >if 1 EQU 1 (echo. & echo ____________________________________________________________  & echo.
     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
    
    >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 "!_temp!\'" del /f /q "!_temp!\'"
    
    >if exist "!_temp!\`.txt" del /f /q "!_temp!\`.txt"
    
    >if defined _quit goto :eof
    
    >echo.
    
    
    >if 1 EQU 0 echo Press any key to exit.
    
    >goto :eof
    
     
  7. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,209
    84,855
    340
    @Bobby P.

    your antivirus is blocking access to registry keys
     
  8. jimwell

    jimwell MDL Novice

    Aug 15, 2019
    17
    4
    0
    @abbodi1406
    I uninstalled Office pro+ 2019 (16.0.10349.20017) through the control panel and ran full_scrub.cmd (latest version) to install Office 2019 pro+ 2019 (16.0.10359.20023) which is the latest version. I used ODT to install it but it got stuck at 2% for at least 1 hour. Is this a problem with ODT or my pc?

    I plan to use KMS_VL_ALL to activate Office. If my installed Office is set to automatically receive updates, will it destroy the KMS activation?
     
  9. Bobby P.

    Bobby P. MDL Novice

    Oct 4, 2015
    31
    0
    0
    Thank you abbodi! And thank you for the great tools you've given us.
    However I'm confused with your suggestion, since I didn't change anything compared to what there was in my system during the last year or so, when auto-renewal worked flawlessly. I use avast free -excluding C:\Windows\system32\SppExtComObjHook.dll- and malwarebytes free. Is it possible the latest version of one of them to block something in the background? Should I exclude something more or just uninstall them, see what happens and use other protection?
     
  10. jimwell

    jimwell MDL Novice

    Aug 15, 2019
    17
    4
    0
    @abbodi1406
    I used your YAOCTRI and it installed. So the problem was the ODT. I love YAOCTRI. It is very functional and not faulty or buggy. But I recommend you allow the "Office" folder to contain English only (or another language) to save space. It is impractical to put all languages inside the folder. That is around 3.5 GB. One language only consumes more or less 250 MB. That is a very big difference.

    I read "readMe.html". It said "Updates for Windows or Office do not affect or block KMS activation, only a new KMS protocol will not work with the local emulator.". So that means Office 365 or Pro+ 2019 auto-updates don't interfere with manual KMS activation. Thanks!
     
  11. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,209
    84,855
    340
    Code:
    >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v VerifierDlls /t REG_SZ /d "SppExtComObjHook.dll"
    ERROR: Access is denied.
    
    >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v GlobalFlag /t REG_DWORD /d 256
    ERROR: Access is denied.
    
    >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v KMS_Emulation /t REG_DWORD /d 1
    ERROR: Access is denied.
    
    >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v KMS_ActivationInterval /t REG_DWORD /d 120
    ERROR: Access is denied.
    
    >reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SppExtComObj.exe" /f /v KMS_RenewalInterval /t REG_DWORD /d 1440
    ERROR: Access is denied.
    
    >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"  )
    ERROR: Access is denied.
    Either exclude that registry if possible, or temporary disable antivirus
     
  12. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,209
    84,855
    340
    I'm not sure what you mean
    the user is free to download one or any languages for the same build
     
  13. Bruno.H.

    Bruno.H. MDL Novice

    Mar 12, 2009
    16
    3
    0
    #3035 Bruno.H., Jun 6, 2020
    Last edited: Jun 6, 2020
    @abboddi1406: I have a one question to check something;

    By your opinion, on 'Microsoft Windows 10 Enterprise 2019 LTSC OS', which is the smartest long term/LTSC 'Installation Channel' to use for Updating, on here installed 'Microsoft Office 2016 VL and/or 2019 VL software?

    Thank you in advance for your most kindest answer and best regards!
     
  14. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,209
    84,855
    340
    Office 2016 MSI
     
  15. Bruno.H.

    Bruno.H. MDL Novice

    Mar 12, 2009
    16
    3
    0
    And, if on 'Microsoft Windows 10 Enterprise 2019 LTSC OS' we install the 'Microsoft Office 2019 VL software,
    which Update Channel for this Office need to be use, to also serve with the "LTSC" Update Channel in mind here?
     
  16. adric

    adric MDL Expert

    Jul 30, 2009
    1,251
    1,324
    60
    #3040 adric, Jun 7, 2020
    Last edited: Jun 7, 2020
    This gets updates via WU and 2019 doesn't - is that correct? I can't recall why 2019 was less recommended.