From 0950210b3dc0a4e52be472c7208abf96c7e04f21 Mon Sep 17 00:00:00 2001 From: kkkgp <4530897+kkkgo@users.noreply.github.com> Date: Sun, 3 Oct 2021 11:54:27 +0800 Subject: [PATCH] v0.44.0 release --- $OEM$/$$/Setup/Scripts/bin/A64.dll | Bin 0 -> 20480 bytes $OEM$/$$/Setup/Scripts/bin/Win32.dll | Bin 16384 -> 0 bytes $OEM$/$$/Setup/Scripts/bin/cleanosppx64.exe | Bin 0 -> 19968 bytes $OEM$/$$/Setup/Scripts/bin/cleanosppx86.exe | Bin 0 -> 17408 bytes $OEM$/$$/Setup/Scripts/bin/x64.dll | Bin 18432 -> 19968 bytes $OEM$/$$/Setup/Scripts/bin/x86.dll | Bin 0 -> 15872 bytes $OEM$/$$/Setup/Scripts/setupcomplete.cmd | 1947 ++++++++++++--- Activate.cmd | 2368 +++++++++++++++---- AutoRenewal-Setup.cmd | 515 ++-- Check-Activation-Status-Alternative.cmd | 204 -- Check-Activation-Status-vbs.cmd | 200 ++ Check-Activation-Status-wmic.cmd | 440 ++++ Check-Activation-Status.cmd | 132 -- README.md | 8 +- ReadMe.html | 603 +++-- bin/A64.dll | Bin 0 -> 20480 bytes bin/README.md | 384 --- bin/Win32.dll | Bin 16384 -> 0 bytes bin/cleanosppx64.exe | Bin 0 -> 19968 bytes bin/cleanosppx86.exe | Bin 0 -> 17408 bytes bin/x64.dll | Bin 18432 -> 19968 bytes bin/x86.dll | Bin 0 -> 15872 bytes 22 files changed, 4835 insertions(+), 1966 deletions(-) create mode 100644 $OEM$/$$/Setup/Scripts/bin/A64.dll delete mode 100644 $OEM$/$$/Setup/Scripts/bin/Win32.dll create mode 100644 $OEM$/$$/Setup/Scripts/bin/cleanosppx64.exe create mode 100644 $OEM$/$$/Setup/Scripts/bin/cleanosppx86.exe create mode 100644 $OEM$/$$/Setup/Scripts/bin/x86.dll delete mode 100644 Check-Activation-Status-Alternative.cmd create mode 100644 Check-Activation-Status-vbs.cmd create mode 100644 Check-Activation-Status-wmic.cmd delete mode 100644 Check-Activation-Status.cmd create mode 100644 bin/A64.dll delete mode 100644 bin/README.md delete mode 100644 bin/Win32.dll create mode 100644 bin/cleanosppx64.exe create mode 100644 bin/cleanosppx86.exe create mode 100644 bin/x86.dll diff --git a/$OEM$/$$/Setup/Scripts/bin/A64.dll b/$OEM$/$$/Setup/Scripts/bin/A64.dll new file mode 100644 index 0000000000000000000000000000000000000000..45ac3237e572494419ff8387d0a43b42f4e025ee GIT binary patch literal 20480 zcmeHvd0doL`}etL1{gpEWpPcwB>|Vr6*J`?Z~-+`AhY_FAWY3D4hm?Z8JiYLi<6oq zl`Lk=q=ls>ZQ_!mWDnq4PbG-U2$q-|qv5>Y>t1j`^6`1!=a2XE`#hsJ=RW6L*LAM# zoO7LJ=80!kGbLk8g~w)NY!_1c@WS8w|0zRt2cNGxu&0uqZ_UY z`J=h@NMD@&&kc=2TCw2@(nx)rj$m7JHf=m(@n#isIMOLXu4`bud|eeCdI-X_6HAMF zAaxhs(>Y4$UBQ?m{lQ00SvoRMN@5?5aV!R)B9ffkn{O^5GVD|gWB$UM^ato&ga)Pj ze8$$|RR?~Er3e1RfcAZW2c>8ir=b2?F#ZtBJRUNx-N%=)m_hNeDX}PPaKN8wcpUMJ z!(;d187m#67Xf#Ylf>X5T9feDeR#AoC`p@;7$?faAe*4hW=n{`fC~}d{`>d;7Y$H< z(6SoN{UOG_<@63gK8)>PHHrqLCWYSN-Cm4!RMof^J(_kwEiV8&|LS#IW|jQxr}q6X(rOOx8Xn zY!2S#PwUbs z0ct#33{8asdLEl9V94-t>dra|ufCm_F#dLs2Gk%a--UG(>cgbG!$!&P`sX+6 z5*kJxJbSt7#6Pna8hXuJasJTI-fw=i&of*z;K0VB$3Ojj)%59h6R@s!@Hru3={Xgr<&^1Ih_H_!ZZe*Z`NI^{2O`aOHasVUbU z8hA2teAdU`|C;I)pZ7}LrM{atcL~Z_Flm|kgx~LPRgQn+%4n1BsSiw(H0#cAp#yWv zC#W1wP4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on$$Aj6=&4ivyF;E(8zHgBM07d?^@mL)uIy(&O2l^HcV#KtJ^mKo zl#dv@B?$q+FVJz-$qrMEuC7rb;@_e=5AU6x#t6oNpToJ+;Vw(qKwp}!{=ctf$?sL< zNLVPLB4L$;4HC9X*e&642?rz`m2h0b)BqPI6K&e#IRCUL;70({{L{Ldi#Ec8XdWs4ZQ9%U=w zZu}^u0OdNsy?9lk+z9Buk}>*CYC9ml3&kkjm38g*&$i(2DIbeV*u?0ci}}iRe;@i zjiF4C?mnnoi~Eiqyk0~3HNf|+__s%!8T$aRY&r5B$|~TCcom{d@aYxM7v)jFy`RO8 z%~5Uyd>*e6l*a(y&jufqKL8wC$=LU(9Wa6)z!6R>Am$pk=R*Xq1%I^L0N?yPcFHKH zT*ufxyi#ySK=(g%mlKAZ1kcDa-Pyb;%YT=M#2Ft~PR!n0)mz)!-Fvh*)_c5{8W0Bn z{l^B5v04;Nc*Rm~w52HWnL?#bc8()|1+k*^|{{?aAq}^%VBldz2n`PgPHCPeV_zr?scO=TJ{~&(WS( z&+(rAo`Ighp3^;}J!3uNJ@KB&o{K%KH?=pjH>=m$o6~FSE$p@TD!uOBU~g-0d+(ts zx%+zudIx(?_m1|C^^W&W_Fn8|eW`t!eOZ0hzMMW=UtyoUPw8{_RrS^O1^Zh2+WQXm qb@v_Zi}fAv>+c)r8|*vXH`+JWH{KWTo9w&T$BtzlgWmtZ&;J2+G`YM0 literal 0 HcmV?d00001 diff --git a/$OEM$/$$/Setup/Scripts/bin/cleanosppx86.exe b/$OEM$/$$/Setup/Scripts/bin/cleanosppx86.exe new file mode 100644 index 0000000000000000000000000000000000000000..248bf4a10d087da73c7c6ead862f36ccfaa76e3d GIT binary patch literal 17408 zcmeHu4OCm#mF^J;TTa1{6dIhE1Uq)?NsN0h;zvRVgpmk-0b51}Obo^tE|#!BRNU*I zCV1@1WLcG!@oL@Iq|ejZaXc?GX%lyvzL1Wa$j0$c;>?hYUxruHE;`Ri}1u6@tX-e;fvclJH^>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`H&4ETS7h!*&k9Daw_CPNNb2aL>MX#^$#5#s(=-fLTAB-MWGP*-{1c+ G3;ZwPeFdEW literal 0 HcmV?d00001 diff --git a/$OEM$/$$/Setup/Scripts/setupcomplete.cmd b/$OEM$/$$/Setup/Scripts/setupcomplete.cmd index 502223d..dcbe10a 100644 --- a/$OEM$/$$/Setup/Scripts/setupcomplete.cmd +++ b/$OEM$/$$/Setup/Scripts/setupcomplete.cmd @@ -1,57 +1,151 @@ +@setlocal DisableDelayedExpansion +@set uivr=v44 @echo off +:: change to 1 to enable debug mode +set _Debug=0 + +:: change to 1 to cleanup after completion (auto delete the script and bin folder) +set _Cleanup=0 + +:: change External to 1 and set KMS_IP address to activate via external KMS server (bin folder is not needed in that case) +set External=0 +set KMS_IP=0.0.0.0 + set ActWindows=1 set ActOffice=1 +set AutoR2V=1 set SkipKMS38=1 set KMS_RenewalInterval=10080 set KMS_ActivationInterval=120 set KMS_HWID=0x3A1C049600B60076 -set KMS_IP=172.16.0.2 set KMS_Port=1688 set KMS_Emulation=1 - -set "SysPath=%Windir%\System32" -if exist "%Windir%\Sysnative\reg.exe" (set "SysPath=%Windir%\Sysnative") -set "Path=%SysPath%;%Windir%;%SysPath%\Wbem;%SysPath%\WindowsPowerShell\v1.0\" - -fsutil dirty query %systemdrive% >nul 2>&1 || exit /b - -set "_Nul1=1>nul" -set "_Nul2=2>nul" -set "_Nul6=2^>nul" -set "_Nul3=1>nul 2>nul" +set _uIP=0.0.0.0 + +set "_Null=1>nul 2>nul" + +set "SysPath=%SystemRoot%\System32" +if exist "%SystemRoot%\Sysnative\reg.exe" (set "SysPath=%SystemRoot%\Sysnative") +set "Path=%SysPath%;%SystemRoot%;%SysPath%\Wbem;%SysPath%\WindowsPowerShell\v1.0\" +set "_bit=64" +set "_wow=1" +if /i "%PROCESSOR_ARCHITECTURE%"=="amd64" set "xBit=x64"&set "xOS=x64" +if /i "%PROCESSOR_ARCHITECTURE%"=="arm64" set "xBit=x86"&set "xOS=A64" +if /i "%PROCESSOR_ARCHITECTURE%"=="x86" if "%PROCESSOR_ARCHITEW6432%"=="" set "xBit=x86"&set "xOS=x86"&set "_wow=0"&set "_bit=32" +if /i "%PROCESSOR_ARCHITEW6432%"=="amd64" set "xBit=x64"&set "xOS=x64" +if /i "%PROCESSOR_ARCHITEW6432%"=="arm64" set "xBit=x86"&set "xOS=A64" + +set "param=%~f0" +cmd /v:on /c echo(^^!param^^!| findstr /R "[| ` ~ ! @ %% \^ & ( ) \[ \] { } + = ; ' , |]*^" 1>nul 2>nul +if %errorlevel% EQU 0 exit /b +reg query HKU\S-1-5-19 1>nul 2>nul || exit /b + +set "_Local=%LocalAppData%" set "_temp=%SystemRoot%\Temp" +set "_log=%~dp0KMS_VL_ALL" set "_work=%~dp0" if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%" -setlocal EnableExtensions EnableDelayedExpansion +for /f "skip=2 tokens=2*" %%a in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Desktop') do call set "_dsk=%%b" +if exist "%PUBLIC%\Desktop\desktop.ini" set "_dsk=%PUBLIC%\Desktop" +set DO16Ids=ProPlus,ProjectPro,VisioPro,Standard,ProjectStd,VisioStd,Access,SkypeforBusiness,Excel,Outlook,PowerPoint,Publisher,Word +set LV16Ids=Mondo,ProPlus,ProjectPro,VisioPro,Standard,ProjectStd,VisioStd,Access,SkypeforBusiness,OneNote,Excel,Outlook,PowerPoint,Publisher,Word +set LR16Ids=%LV16Ids%,Professional,HomeBusiness,HomeStudent,O365Business,O365SmallBusPrem,O365HomePrem,O365EduCloud +set "ESUEditions=Enterprise,EnterpriseE,EnterpriseN,Professional,ProfessionalE,ProfessionalN,Ultimate,UltimateE,UltimateN" +if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" ( +set "ESUEditions=ServerDatacenter,ServerDatacenterCore,ServerDatacenterV,ServerDatacenterVCore,ServerStandard,ServerStandardCore,ServerStandardV,ServerStandardVCore,ServerEnterprise,ServerEnterpriseCore,ServerEnterpriseV,ServerEnterpriseVCore" +) +setlocal EnableDelayedExpansion + +if %_Debug% EQU 0 ( + set "_Nul1=1>nul" + set "_Nul2=2>nul" + set "_Nul6=2^>nul" + set "_Nul3=1>nul 2>nul" + call :Begin +) else ( + set "_Nul1=" + set "_Nul2=" + set "_Nul6=" + set "_Nul3=" + copy /y nul "!_work!\#.rw" 1>nul 2>nul && (if exist "!_work!\#.rw" del /f /q "!_work!\#.rw") || (set "_log=!_dsk!\KMS_VL_ALL") + @echo on + @prompt $G + @call :Begin >"!_log!_tmp.log" 2>&1 &cmd /u /c type "!_log!_tmp.log">"!_log!_Debug.log"&del "!_log!_tmp.log" +) +@color 07 +@title %ComSpec% +@echo off +if %_Cleanup% EQU 0 exit /b +(goto) 2>nul &rd /s /q "%~dp0bin" &del /f /q %0 &exit /b -if %ActWindows% EQU 0 if %ActOffice% EQU 0 exit /b -set xOS=x64 -if /i "%PROCESSOR_ARCHITECTURE%"=="x86" (if not defined PROCESSOR_ARCHITEW6432 set xOS=Win32) +:Begin +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 "OSPP=SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" +set "OPPk=SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" set "SPPk=SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" -set _Hook="%SystemRoot%\system32\SppExtComObjHook.dll" +set _Hook="%SysPath%\SppExtComObjHook.dll" +set w7inf="%SystemRoot%\Migration\WTR\KMS_VL_ALL.inf" set "_TaskEx=\Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger" set "_TaskOs=\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTaskLogon" -wmic path SoftwareLicensingProduct where (Description like '%%KMSCLIENT%%') get Name %_Nul2% | findstr /i Windows %_Nul1% && (set SppHook=1) || (set SppHook=0) -wmic path OfficeSoftwareProtectionService get Version %_Nul3% && (set OsppHook=1) || (set OsppHook=0) for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G +set SSppHook=0 +for /f %%A in ('dir /b /ad %SysPath%\spp\tokens\skus') do ( + if %winbuild% GEQ 9200 if exist "%SysPath%\spp\tokens\skus\%%A\*GVLK*.xrm-ms" set SSppHook=1 + if %winbuild% LSS 9200 if exist "%SysPath%\spp\tokens\skus\%%A\*VLKMS*.xrm-ms" set SSppHook=1 + if %winbuild% LSS 9200 if exist "%SysPath%\spp\tokens\skus\%%A\*VL-BYPASS*.xrm-ms" set SSppHook=1 +) +set OsppHook=1 +sc query osppsvc %_Nul3% +if %errorlevel% EQU 1060 set OsppHook=0 +set ESU_KMS=0 +if %winbuild% LSS 9200 for /f %%A in ('dir /b /ad %SysPath%\spp\tokens\channels') do ( + if exist "%SysPath%\spp\tokens\channels\%%A\*VL-BYPASS*.xrm-ms" set ESU_KMS=1 +) +if %ESU_KMS% 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 %ESU_KMS% EQU 1 for %%A in (%ESUEditions%) do ( + if exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%%A\*.xrm-ms" set ESU_EDT=1 +) +if %ESU_EDT% EQU 1 set SSppHook=1 +set ESU_ADD=0 if %winbuild% GEQ 9200 ( - set OSType=Win8 + set OSType=Win8 + set SppVer=SppExtComObj.exe ) else if %winbuild% GEQ 7600 ( - set OSType=Win7 + set OSType=Win7 + set SppVer=sppsvc.exe ) else ( - exit /b + exit /b +) +if %OSType% EQU Win8 reg query "%IFEO%\sppsvc.exe" %_Nul3% && ( +reg delete "%IFEO%\sppsvc.exe" /f %_Nul3% +call :StopService sppsvc +) +if %ActWindows% EQU 0 if %ActOffice% EQU 0 set ActWindows=1 + +if %External% EQU 0 ( +set KMS_IP=%_uIP% ) if %winbuild% GEQ 9600 ( -reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" /f /v NoGenTicket /t REG_DWORD /d 1 %_Nul3% -WMIC /NAMESPACE:\\root\Microsoft\Windows\Defender PATH MSFT_MpPreference call Add ExclusionPath=%_Hook% %_Nul3% + reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" /v NoGenTicket /t REG_DWORD /d 1 /f %_Nul3% + if %winbuild% EQU 14393 reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" /v NoAcquireGT /t REG_DWORD /d 1 /f %_Nul3% ) +call :StopService sppsvc +if %OsppHook% NEQ 0 call :StopService osppsvc +if %OSType% EQU Win8 call :CreateTask +if %External% EQU 1 call :UpdateOSPPEntry osppsvc.exe +if %External% EQU 0 goto :InstallHook + +:ReturnHook SET Win10Gov=0 -IF %winbuild% LSS 14393 GOTO :Main +SET "EditionWMI=" +SET "EditionID=" +IF %winbuild% LSS 14393 if %SSppHook% NEQ 0 GOTO :Main SET "RegKey=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages" SET "Pattern=Microsoft-Windows-*Edition~31bf3856ad364e35" -SET "EditionPKG=NUL" +SET "EditionPKG=FFFFFFFF" FOR /F "TOKENS=8 DELIMS=\" %%A IN ('REG QUERY "%RegKey%" /f "%Pattern%" /k %_Nul6% ^| FIND /I "CurrentVersion"') DO ( REG QUERY "%RegKey%\%%A" /v "CurrentState" %_Nul2% | FIND /I "0x70" %_Nul1% && ( FOR /F "TOKENS=3 DELIMS=-~" %%B IN ('ECHO %%A') DO SET "EditionPKG=%%B" @@ -62,136 +156,192 @@ SET "EditionID=%EditionPKG:~0,-7%" ) ELSE ( FOR /F "TOKENS=3 DELIMS=: " %%A IN ('DISM /English /Online /Get-CurrentEdition %_Nul6% ^| FIND /I "Current Edition :"') DO SET "EditionID=%%A" ) -FOR /F "TOKENS=2 DELIMS==" %%A IN ('"WMIC PATH SoftwareLicensingProduct WHERE (Name LIKE 'Windows%%' AND PartialProductKey is not NULL) GET LicenseFamily /VALUE" %_Nul6%') DO IF NOT ERRORLEVEL 1 SET "EditionWMI=%%A" -IF NOT DEFINED EditionWMI ( -IF %winbuild% GEQ 17063 FOR /F "SKIP=2 TOKENS=3 DELIMS= " %%A IN ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionId') DO SET "EditionID=%%A" -GOTO :Main +net start sppsvc /y %_Nul3% +FOR /F "TOKENS=2 DELIMS==" %%A IN ('"WMIC PATH SoftwareLicensingProduct WHERE (ApplicationID='%_wApp%' %adoff% AND PartialProductKey is not NULL) GET LicenseFamily /VALUE" %_Nul6%') DO SET "EditionWMI=%%A" +IF "%EditionWMI%"=="" ( +IF %winbuild% 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 %winbuild% 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) DO (IF /I "%EditionWMI%"=="%%A" GOTO :Main) -SET EditionID=%EditionWMI% -FOR %%A IN (EnterpriseG,EnterpriseGN) DO (IF /I "%EditionID%"=="%%A" SET Win10Gov=1) +IF NOT "%EditionWMI%"=="" SET "EditionID=%EditionWMI%" +IF /I "%EditionID%"=="IoTEnterprise" SET "EditionID=Enterprise" +IF /I "%EditionID%"=="IoTEnterpriseS" SET "EditionID=EnterpriseS" +IF /I "%EditionID%"=="ProfessionalSingleLanguage" SET "EditionID=Professional" +IF /I "%EditionID%"=="ProfessionalCountrySpecific" SET "EditionID=Professional" +IF /I "%EditionID%"=="EnterpriseG" SET Win10Gov=1 +IF /I "%EditionID%"=="EnterpriseGN" SET Win10Gov=1 :Main -if not exist "!_work!\bin\!xOS!.dll" exit /b -call :StopService sppsvc -if %OsppHook% NEQ 0 call :StopService osppsvc -for %%# in (SppExtComObjHookAvrf.dll,SppExtComObjHook.dll,SppExtComObjPatcher.dll,SppExtComObjPatcher.exe) do ( - if exist "%SystemRoot%\system32\%%#" del /f /q "%SystemRoot%\system32\%%#" %_Nul3% +set "_C16R=" +reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath %_Nul3% && for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath" %_Nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" ( +reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds %_Nul3% && set "_C16R=HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration" ) -copy /y "!_work!\bin\!xOS!.dll" %_Hook% %_Nul3% || exit /b -if %OSType% EQU Win8 call :CreateIFEOEntry SppExtComObj.exe -if %OSType% EQU Win7 if %SppHook% NEQ 0 call :CreateIFEOEntry sppsvc.exe -call :CreateIFEOEntry osppsvc.exe -reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds %_Nul3% && set "_C2R=HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration" -if not defined _C2R reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds %_Nul3% && set "_C2R=HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun\Configuration" -for %%A in (14,15,16,19) do call :officeLoc %%A -call :SPP -if %ActOffice% NEQ 0 call :OSPP -if %winbuild% GEQ 9200 call :CreateTask +if not defined _C16R reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun /v InstallPath %_Nul3% && for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun /v InstallPath" %_Nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" ( +reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds %_Nul3% && set "_C16R=HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun\Configuration" +) +set "_C15R=" +reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun /v InstallPath %_Nul3% && for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun /v InstallPath" %_Nul6%') do if exist "%%b\root\Licenses\ProPlus*.xrm-ms" ( +reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\Configuration /v ProductReleaseIds %_Nul3% && 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 %_Nul3% && call set "_C15R=HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\propertyBag" +) +set "_C14R=" +if %_wow%==0 (reg query HKLM\SOFTWARE\Microsoft\Office\14.0\CVH /f Click2run /k %_Nul3% && set "_C14R=1") else (reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\CVH /f Click2run /k %_Nul3% && set "_C14R=1") +for %%A in (14,15,16,19,21) do call :officeLoc %%A +if %_O14MSI% EQU 1 set "_C14R=" +call :RunSPP +if %ActOffice% NEQ 0 call :RunOSPP +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 +if %OsppHook% NEQ 0 call :StopService osppsvc sc start sppsvc trigger=timer;sessionid=0 %_Nul3% exit /b -:StopService -sc query %1 | find /i "STOPPED" %_Nul1% || net stop %1 /y %_Nul3% -sc query %1 | find /i "STOPPED" %_Nul1% || sc stop %1 %_Nul3% -goto :eof - -:CreateIFEOEntry -reg delete "%IFEO%\%1" /f /v Debugger %_Nul3% -reg add "%IFEO%\%1" /f /v VerifierDlls /t REG_SZ /d "SppExtComObjHook.dll" %_Nul3% -reg add "%IFEO%\%1" /f /v GlobalFlag /t REG_DWORD /d 256 %_Nul3% -reg add "%IFEO%\%1" /f /v KMS_Emulation /t REG_DWORD /d %KMS_Emulation% %_Nul3% -reg add "%IFEO%\%1" /f /v KMS_ActivationInterval /t REG_DWORD /d %KMS_ActivationInterval% %_Nul3% -reg add "%IFEO%\%1" /f /v KMS_RenewalInterval /t REG_DWORD /d %KMS_RenewalInterval% %_Nul3% -if /i %1 EQU SppExtComObj.exe if %winbuild% GEQ 9600 ( -reg add "%IFEO%\%1" /f /v KMS_HWID /t REG_QWORD /d "%KMS_HWID%" %_Nul3% -) -if /i %1 EQU osppsvc.exe ( -reg add "HKLM\%OSPP%" /f /v KeyManagementServiceName /t REG_SZ /d %KMS_IP% %_Nul3% -reg add "HKLM\%OSPP%" /f /v KeyManagementServicePort /t REG_SZ /d %KMS_Port% %_Nul3% -) -goto :eof - -:CreateTask -schtasks /query /tn "%_TaskEx%" %_Nul3% || ( - schtasks /query /tn "%_TaskOs%" %_Nul3% && ( - schtasks /query /tn "%_TaskOs%" /xml >"!_temp!\SvcTrigger.xml" - schtasks /create /tn "%_TaskEx%" /xml "!_temp!\SvcTrigger.xml" /f %_Nul3% - schtasks /change /tn "%_TaskEx%" /enable %_Nul3% - del /f /q "!_temp!\SvcTrigger.xml" %_Nul3% - ) -) -schtasks /query /tn "%_TaskEx%" %_Nul3% || ( - if exist "!_work!\bin\SvcTrigger.xml" schtasks /create /tn "%_TaskEx%" /xml "!_work!\bin\SvcTrigger.xml" /f %_Nul3% -) -goto :eof - -:SPP +:RunSPP set spp=SoftwareLicensingProduct set sps=SoftwareLicensingService set W1nd0ws=1 set WinPerm=0 set WinVL=0 set Off1ce=0 -if %winbuild% GEQ 9200 if %ActOffice% NEQ 0 ( -call :sppoff -) -wmic path %spp% where (Description like '%%KMSCLIENT%%') get Name %_Nul2% | findstr /i Windows %_Nul1% && (set WinVL=1) -if %Off1ce% EQU 0 if %WinVL% EQU 0 exit /b -wmic path %spp% where (Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL) get Name %_Nul2% | findstr /i Windows %_Nul1% && (set gvlk=1) || (set gvlk=0) +set RunR2V=0 +set aC2R21=0 +set aC2R19=0 +set aC2R16=0 +set aC2R15=0 +if %winbuild% GEQ 9200 if %ActOffice% NEQ 0 call :sppoff +wmic path %spp% where (Description like '%%KMSCLIENT%%') get Name /value %_Nul2% | findstr /i Windows %_Nul1% && (set WinVL=1) +if %WinVL% EQU 0 if %ActWindows% NEQ 0 if %SSppHook% NEQ 0 exit /b +if %WinVL% EQU 0 if %Off1ce% EQU 0 exit /b +set _gvlk=0 +if %winbuild% GEQ 10240 wmic path %spp% where (ApplicationID='%_wApp%' and Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL) get Name /value %_Nul2% | findstr /i Windows %_Nul1% && (set _gvlk=1) set gpr=0 -if %winbuild% GEQ 10240 if %SkipKMS38% NEQ 0 if %gvlk% EQU 1 for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (Description like '%%KMSCLIENT%%' and Name like 'Windows%%' and PartialProductKey is not NULL) get GracePeriodRemaining /VALUE" %_Nul6%') do set "gpr=%%A" +if %winbuild% GEQ 10240 if %SkipKMS38% NEQ 0 if %_gvlk% EQU 1 for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (ApplicationID='%_wApp%' and Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL) get GracePeriodRemaining /VALUE" %_Nul6%') do set "gpr=%%A" if %gpr% NEQ 0 if %gpr% GTR 259200 ( set W1nd0ws=0 -wmic path %spp% where "Description like '%%KMSCLIENT%%' and Name like 'Windows%%' and PartialProductKey is not NULL" get LicenseFamily %_Nul2% | findstr /i EnterpriseG %_Nul1% && (set W1nd0ws=1) +wmic path %spp% where "ApplicationID='%_wApp%' and Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL" get LicenseFamily /value %_Nul2% | findstr /i EnterpriseG %_Nul1% && (call set W1nd0ws=1) ) for /f "tokens=2 delims==" %%A in ('"wmic path %sps% get Version /VALUE"') do set ver=%%A -wmic path %sps% where version='%ver%' call SetKeyManagementServiceMachine MachineName="%KMS_IP%" %_Nul3% -wmic path %sps% where version='%ver%' call SetKeyManagementServicePort %KMS_Port% %_Nul3% -if %W1nd0ws% EQU 0 for /f "tokens=2 delims==" %%G in ('"wmic path %spp% where (Description like '%%KMSCLIENT%%' and Name like 'Windows%%') get ID /VALUE"') do (set app=%%G&call :sppchkwin) -if %W1nd0ws% EQU 1 if %ActWindows% NEQ 0 for /f "tokens=2 delims==" %%G in ('"wmic path %spp% where (Description like '%%KMSCLIENT%%' and Name like 'Windows%%') get ID /VALUE"') do (set app=%%G&call :sppchkwin) -if %Off1ce% EQU 1 if %ActOffice% NEQ 0 for /f "tokens=2 delims==" %%G in ('"wmic path %spp% where (Description like '%%KMSCLIENT%%' and Name like 'Office%%') get ID /VALUE"') do (set app=%%G&call :sppchkoff) -wmic path %sps% where version='%ver%' call DisableKeyManagementServiceDnsPublishing 0 %_Nul3% -wmic path %sps% where version='%ver%' call DisableKeyManagementServiceHostCaching 0 %_Nul3% +reg add "HKLM\%SPPk%" /f /v KeyManagementServiceName /t REG_SZ /d "%KMS_IP%" %_Nul3% +reg add "HKLM\%SPPk%" /f /v KeyManagementServicePort /t REG_SZ /d "%KMS_Port%" %_Nul3% +if %winbuild% GEQ 9200 ( +if not %xOS%==x86 ( +reg add "HKLM\%SPPk%" /f /v KeyManagementServiceName /t REG_SZ /d "%KMS_IP%" /reg:32 %_Nul3% +reg add "HKLM\%SPPk%" /f /v KeyManagementServicePort /t REG_SZ /d "%KMS_Port%" /reg:32 %_Nul3% +reg delete "HKLM\%SPPk%\%_oApp%" /f /reg:32 %_Null% +reg add "HKLM\%SPPk%\%_oApp%" /f /v KeyManagementServiceName /t REG_SZ /d "%KMS_IP%" /reg:32 %_Nul3% +reg add "HKLM\%SPPk%\%_oApp%" /f /v KeyManagementServicePort /t REG_SZ /d "%KMS_Port%" /reg:32 %_Nul3% +) +reg delete "HKLM\%SPPk%\%_oApp%" /f %_Null% +reg add "HKLM\%SPPk%\%_oApp%" /f /v KeyManagementServiceName /t REG_SZ /d "%KMS_IP%" %_Nul3% +reg add "HKLM\%SPPk%\%_oApp%" /f /v KeyManagementServicePort /t REG_SZ /d "%KMS_Port%" %_Nul3% +) +if %W1nd0ws% EQU 0 for /f "tokens=2 delims==" %%G in ('"wmic path %spp% where (ApplicationID='%_wApp%' and Description like '%%KMSCLIENT%%') get ID /VALUE"') do (set app=%%G&call :sppchkwin) +if %W1nd0ws% EQU 1 if %ActWindows% NEQ 0 for /f "tokens=2 delims==" %%G in ('"wmic path %spp% where (ApplicationID='%_wApp%' and Description like '%%KMSCLIENT%%' %adoff%) get ID /VALUE"') do (set app=%%G&call :sppchkwin) +rem if %ESU_EDT% EQU 1 if %ActWindows% NEQ 0 for /f "tokens=2 delims==" %%G in ('"wmic path %spp% where (ApplicationID='%_wApp%' and Description like '%%KMSCLIENT%%' %addon%) get ID /VALUE"') do (set app=%%G&call :esuchk) +if %Off1ce% EQU 1 if %ActOffice% NEQ 0 for /f "tokens=2 delims==" %%G in ('"wmic path %spp% where (ApplicationID='%_oApp%' and Description like '%%KMSCLIENT%%') get ID /VALUE"') do (set app=%%G&call :sppchkoff) +reg delete "HKLM\%SPPk%" /f /v DisableDnsPublishing %_Null% +reg delete "HKLM\%SPPk%" /f /v DisableKeyManagementServiceHostCaching %_Null% exit /b :sppoff -set spp_off15=0&set spp_off16=0&set spp_off19=0 -wmic path %spp% where (Description like '%%KMSCLIENT%%') get Name > "!_temp!\sppchk.txt" 2>&1 -find /i "Office 15" "!_temp!\sppchk.txt" %_Nul1% && (set spp_off15=1) -find /i "Office 16" "!_temp!\sppchk.txt" %_Nul1% && (set spp_off16=1) -find /i "Office 19" "!_temp!\sppchk.txt" %_Nul1% && (set spp_off19=1) -for %%A in (15,16,19) do if !loc_off%%A! EQU 0 set spp_off%%A=0 -set loc_offgl=1 -if %loc_off15% EQU 0 if %loc_off16% EQU 0 if %loc_off19% EQU 0 (set loc_offgl=0) -if %loc_offgl% EQU 1 set Off1ce=1 -set spp_offgl=1 -if %spp_off15% EQU 0 if %spp_off16% EQU 0 if %spp_off19% EQU 0 (set spp_offgl=0) -if %spp_offgl% EQU 0 ( -set Off1ce=0 +set OffUWP=0 +if %winbuild% GEQ 10240 reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\msoxmled.exe" %_Nul3% && ( +dir /b "%ProgramFiles%\WindowsApps\Microsoft.Office.Desktop*" %_Nul3% && set OffUWP=1 +if not %xOS%==x86 dir /b "%ProgramW6432%\WindowsApps\Microsoft.Office.Desktop*" %_Nul3% && set OffUWP=1 +) +rem nothing installed +if %loc_off21% EQU 0 if %loc_off19% EQU 0 if %loc_off16% EQU 0 if %loc_off15% EQU 0 (exit /b) +set Off1ce=1 +set _sC2R=sppoff +set _fC2R=ReturnSPP +set vol_off15=0&set vol_off16=0&set vol_off19=0&set vol_off21=0 +wmic path %spp% where (Description like '%%KMSCLIENT%%' AND NOT Name like '%%MondoR_KMS_Automation%%') get Name /value > "!_temp!\sppchk.txt" 2>&1 +find /i "Office 21" "!_temp!\sppchk.txt" %_Nul1% && (set vol_off21=1) +find /i "Office 19" "!_temp!\sppchk.txt" %_Nul1% && (set vol_off19=1) +find /i "Office 16" "!_temp!\sppchk.txt" %_Nul1% && (set vol_off16=1) +find /i "Office 15" "!_temp!\sppchk.txt" %_Nul1% && (set vol_off15=1) +for %%A in (15,16,19,21) do if !loc_off%%A! EQU 0 set vol_off%%A=0 +if %vol_off16% EQU 1 find /i "Office16MondoVL_KMS_Client" "!_temp!\sppchk.txt" %_Nul1% && ( +wmic path %spp% where 'ApplicationID="%_oApp%" AND LicenseFamily like "Office16O365%%"' get LicenseFamily /value %_Nul2% | find /i "O365" %_Nul1% || (set vol_off16=0) +) +if %vol_off15% EQU 1 find /i "OfficeMondoVL_KMS_Client" "!_temp!\sppchk.txt" %_Nul1% && ( +wmic path %spp% where 'ApplicationID="%_oApp%" AND LicenseFamily like "OfficeO365%%"' get LicenseFamily /value %_Nul2% | find /i "O365" %_Nul1% || (set vol_off15=0) +) +set ret_off15=0&set ret_off16=0&set ret_off19=0&set ret_off21=0 +wmic path %spp% where (ApplicationID='%_oApp%' AND NOT Name like '%%O365%%') get Name /value > "!_temp!\sppchk.txt" 2>&1 +find /i "R_Retail" "!_temp!\sppchk.txt" %_Nul2% | find /i "Office 21" %_Nul1% && (set ret_off21=1) +find /i "R_Retail" "!_temp!\sppchk.txt" %_Nul2% | find /i "Office 19" %_Nul1% && (set ret_off19=1) +find /i "R_Retail" "!_temp!\sppchk.txt" %_Nul2% | find /i "Office 16" %_Nul1% && (set ret_off16=1) +find /i "R_Retail" "!_temp!\sppchk.txt" %_Nul2% | find /i "Office 15" %_Nul1% && (set ret_off15=1) +if %ret_off21% EQU 1 if %_O16MSI% EQU 0 set vol_off21=0 +if %ret_off19% EQU 1 if %_O16MSI% EQU 0 set vol_off19=0 +if %ret_off16% EQU 1 if %_O16MSI% EQU 0 set vol_off16=0 +if %ret_off15% EQU 1 if %_O15MSI% EQU 0 set vol_off15=0 +set run_off16=0 +if defined _C16R if %loc_off16% EQU 1 if %vol_off16% EQU 0 if %ret_off16% EQU 1 ( +for %%a in (%DO16Ids%) do find /i "Office16%%aR" "!_temp!\sppchk.txt" %_Nul1% && ( + if %vol_off21% EQU 1 find /i "Office21%%a2021VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + if %vol_off19% EQU 1 find /i "Office19%%a2019VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + ) +for %%a in (Professional) do find /i "Office16%%aR" "!_temp!\sppchk.txt" %_Nul1% && ( + if %vol_off21% EQU 1 find /i "Office21ProPlus2021VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + if %vol_off19% EQU 1 find /i "Office19ProPlus2019VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + ) +for %%a in (HomeBusiness,HomeStudent) do find /i "Office16%%aR" "!_temp!\sppchk.txt" %_Nul1% && ( + if %vol_off21% EQU 1 find /i "Office21Standard2021VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + if %vol_off19% EQU 1 find /i "Office19Standard2019VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + ) ) +if defined _C16R if %loc_off16% EQU 1 if %run_off16% EQU 0 wmic path %spp% where (ApplicationID='%_oApp%' AND LicenseFamily like 'Office16O365%%') get LicenseFamily /value %_Nul2% | find /i "O365" %_Nul1% && ( +find /i "Office16MondoVL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 +) +set vol_offgl=1 +if %vol_off21% EQU 0 if %vol_off19% EQU 0 if %vol_off16% EQU 0 if %vol_off15% EQU 0 set vol_offgl=0 +rem mixed Volume + Retail +if %loc_off21% EQU 1 if %vol_off21% EQU 0 if %RunR2V% EQU 0 if %AutoR2V% EQU 1 goto :C2RR2V +if %loc_off19% EQU 1 if %vol_off19% EQU 0 if %RunR2V% EQU 0 if %AutoR2V% EQU 1 goto :C2RR2V +if defined _C16R if %loc_off16% EQU 1 if %vol_off16% EQU 0 if %RunR2V% EQU 0 if %AutoR2V% EQU 1 if %run_off16% EQU 1 goto :C2RR2V +if defined _C15R if %loc_off15% EQU 1 if %vol_off15% EQU 0 if %RunR2V% EQU 0 if %AutoR2V% EQU 1 goto :C2RR2V +rem all supported Volume +if %vol_offgl% EQU 1 exit /b +set Off1ce=0 +rem Retail C2R +if %RunR2V% EQU 0 if %AutoR2V% EQU 1 goto :C2RR2V +:ReturnSPP +rem Retail MSI/C2R or failed C2R-R2V exit /b :sppchkoff -wmic path %spp% where ID='%app%' get Name > "!_temp!\sppchk.txt" +wmic path %spp% where ID='%app%' get Name /value > "!_temp!\sppchk.txt" find /i "Office 15" "!_temp!\sppchk.txt" %_Nul1% && (if %loc_off15% EQU 0 exit /b) find /i "Office 16" "!_temp!\sppchk.txt" %_Nul1% && (if %loc_off16% EQU 0 exit /b) find /i "Office 19" "!_temp!\sppchk.txt" %_Nul1% && (if %loc_off19% EQU 0 exit /b) -set office=1 -wmic path %spp% where (PartialProductKey is not NULL) get ID %_Nul2% | findstr /i "%app%" %_Nul1% && (call :activate %app%&exit /b) +find /i "Office 21" "!_temp!\sppchk.txt" %_Nul1% && (if %loc_off21% EQU 0 exit /b) +if /i '%app%' EQU 'f3fb2d68-83dd-4c8b-8f09-08e0d950ac3b' ( +wmic path %spp% get ID | findstr /i "fbdb3e18-a8ef-4fb3-9183-dffd60bd0984" %_Nul3% && (exit /b) +) +if /i '%app%' EQU '76093b1b-7057-49d7-b970-638ebcbfd873' ( +wmic path %spp% get ID | findstr /i "76881159-155c-43e0-9db7-2d70a9a3a4ca" %_Nul3% && (exit /b) +) +if /i '%app%' EQU 'a3b44174-2451-4cd6-b25f-66638bfb9046' ( +wmic path %spp% get ID | findstr /i "fb61ac9a-1688-45d2-8f6b-0674dbffa33c" %_Nul3% && (exit /b) +) +set _officespp=1 +wmic path %spp% where (PartialProductKey is not NULL) get ID /value %_Nul2% | findstr /i "%app%" %_Nul1% && (call :activate&exit /b) for /f "tokens=3 delims==, " %%G in ('"wmic path %spp% where ID='%app%' get Name /value"') do set OffVer=%%G call :offchk%OffVer% exit /b :sppchkwin -set office=0 -if %winbuild% GEQ 14393 if %gvlk% EQU 0 wmic path %spp% where (Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL) get Name %_Nul2% | findstr /i Windows %_Nul1% && (set gvlk=1) -wmic path %spp% where ID='%app%' get LicenseStatus %_Nul2% | findstr "1" %_Nul1% && (call :activate %app%&exit /b) -wmic path %spp% where (PartialProductKey is not NULL) get ID %_Nul2% | findstr /i "%app%" %_Nul1% && (call :activate %app%&exit /b) -if %gvlk% EQU 1 exit /b +set _officespp=0 +if %winbuild% GEQ 14393 if %WinPerm% EQU 0 if %_gvlk% EQU 0 wmic path %spp% where (ApplicationID='%_wApp%' and Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL) get Name /value %_Nul2% | findstr /i Windows %_Nul1% && (set _gvlk=1) +wmic path %spp% where ID='%app%' get LicenseStatus /value %_Nul2% | findstr "1" %_Nul1% && (call :activate&exit /b) +wmic path %spp% where (PartialProductKey is not NULL) get ID /value %_Nul2% | findstr /i "%app%" %_Nul1% && (call :activate&exit /b) +if %winbuild% GEQ 14393 if %_gvlk% EQU 1 exit /b if %WinPerm% EQU 1 exit /b if %winbuild% LSS 10240 (call :winchk&exit /b) for %%A in ( @@ -204,6 +354,9 @@ b71515d9-89a2-4c60-88c8-656fbcca7f3a,af43f7f0-3b1e-4266-a123-1fdb53f4323b,075aca if /i '%app%' EQU '%%A' exit /b ) if not defined EditionID (call :winchk&exit /b) +if %winbuild% LSS 14393 (call :winchk&exit /b) +if /i '%app%' EQU 'ca7df2e3-5ea0-47b8-9ac1-b1be4d8edd69' if /i %EditionID% NEQ CloudEdition exit /b +if /i '%app%' EQU 'd30136fc-cb4b-416e-a23d-87207abc44a9' if /i %EditionID% NEQ CloudEditionN exit /b if /i '%app%' EQU '0df4f814-3f57-4b8b-9a9d-fddadcd69fac' if /i %EditionID% NEQ CloudE exit /b if /i '%app%' EQU 'e0c42288-980c-4788-a014-c080d2e1926e' if /i %EditionID% NEQ Education exit /b if /i '%app%' EQU '73111121-5638-40f6-bc11-f1d7b0d64300' if /i %EditionID% NEQ Enterprise exit /b @@ -220,56 +373,184 @@ if /i '%app%' EQU 'cd918a57-a41b-4c82-8dce-1a538e221a83' if /i %EditionID% NEQ C if /i '%app%' EQU 'ec868e65-fadf-4759-b23e-93fe37f2cc29' if /i %EditionID% NEQ ServerRdsh exit /b if /i '%app%' EQU 'e4db50ea-bda1-4566-b047-0ca50abc6f07' if /i %EditionID% NEQ ServerRdsh exit /b if /i '%app%' EQU 'e4db50ea-bda1-4566-b047-0ca50abc6f07' ( -wmic path %spp% where 'Description like "%%KMSCLIENT%%"' get ID | findstr /i "ec868e65-fadf-4759-b23e-93fe37f2cc29" %_Nul3% && (exit /b) +wmic path %spp% where 'Description like "%%KMSCLIENT%%"' get ID /value | findstr /i "ec868e65-fadf-4759-b23e-93fe37f2cc29" %_Nul3% && (exit /b) ) call :winchk exit /b :winchk if not defined tok (if %winbuild% GEQ 9200 (set "tok=4") else (set "tok=7")) -if not defined wApp set wApp=55c92734-d682-4d71-983e-d6ec3f16059f -wmic path %spp% where (LicenseStatus='1' and Description like '%%KMSCLIENT%%') get Name %_Nul2% | findstr /i "Windows" %_Nul3% && (exit /b) -echo. -wmic path %spp% where (LicenseStatus='1' and GracePeriodRemaining='0' and PartialProductKey is not NULL) get Name %_Nul2% | findstr /i "Windows" %_Nul3% && ( +wmic path %spp% where (LicenseStatus='1' and Description like '%%KMSCLIENT%%' %adoff%) get Name /value %_Nul2% | findstr /i "Windows" %_Nul3% && (exit /b) +wmic path %spp% where (LicenseStatus='1' and GracePeriodRemaining='0' %adoff% and PartialProductKey is not NULL) get Name /value %_Nul2% | findstr /i "Windows" %_Nul3% && ( set WinPerm=1 ) if %WinPerm% EQU 0 ( -wmic path %spp% where "ApplicationID='%wApp%' and LicenseStatus='1'" get Name %_Nul2% | findstr /i "Windows" %_Nul3% && ( -for /f "tokens=%tok% delims=, " %%G in ('"wmic path %spp% where (ApplicationID='%wApp%' and LicenseStatus='1') get Description /VALUE"') do set "channel=%%G" +wmic path %spp% where "ApplicationID='%_wApp%' and LicenseStatus='1' %adoff%" get Name /value %_Nul2% | findstr /i "Windows" %_Nul3% && ( +for /f "tokens=%tok% delims=, " %%G in ('"wmic path %spp% where (ApplicationID='%_wApp%' and LicenseStatus='1' %adoff%) get Description /VALUE"') do set "channel=%%G" for %%A in (VOLUME_MAK, RETAIL, OEM_DM, OEM_SLP, OEM_COA, OEM_COA_SLP, OEM_COA_NSLP, OEM_NONSLP, OEM) do if /i "%%A"=="!channel!" set WinPerm=1 ) ) if %WinPerm% EQU 0 ( -copy /y %Windir%\System32\slmgr.vbs "!_temp!\slmgr.vbs" %_Nul3% +copy /y %SysPath%\slmgr.vbs "!_temp!\slmgr.vbs" %_Nul3% cscript //nologo "!_temp!\slmgr.vbs" /xpr %_Nul2% | findstr /i "permanently" %_Nul3% && set WinPerm=1 ) if %WinPerm% EQU 1 ( exit /b ) -call :insKey %app% +call :insKey +exit /b + +:esuchk +set _officespp=0 +set ESU_ADD=1 +wmic path %spp% where ID='%app%' get LicenseStatus /value %_Nul2% | findstr "1" %_Nul1% && (call :activate&exit /b) +if /i '%app%' EQU '3fcc2df2-f625-428d-909a-1f76efc849b6' ( +wmic path %spp% where ID="77db037b-95c3-48d7-a3ab-a9c6d41093e0" get LicenseStatus /value %_Nul2% | findstr "1" %_Nul1% && (exit /b) +) +if /i '%app%' EQU 'dadfcd24-6e37-47be-8f7f-4ceda614cece' ( +wmic path %spp% where ID="0e00c25d-8795-4fb7-9572-3803d91b6880" get LicenseStatus /value %_Nul2% | findstr "1" %_Nul1% && (exit /b) +) +if /i '%app%' EQU '0c29c85e-12d7-4af8-8e4d-ca1e424c480c' ( +wmic path %spp% where ID="4220f546-f522-46df-8202-4d07afd26454" get LicenseStatus /value %_Nul2% | findstr "1" %_Nul1% && (exit /b) +) +if /i '%app%' EQU 'f2b21bfc-a6b0-4413-b4bb-9f06b55f2812' ( +wmic path %spp% where ID="553673ed-6ddf-419c-a153-b760283472fd" get LicenseStatus /value %_Nul2% | findstr "1" %_Nul1% && (exit /b) +) +if /i '%app%' EQU 'bfc078d0-8c7f-475c-8519-accc46773113' ( +wmic path %spp% where ID="04fa0286-fa74-401e-bbe9-fbfbb158010d" get LicenseStatus /value %_Nul2% | findstr "1" %_Nul1% && (exit /b) +) +if /i '%app%' EQU '23c6188f-c9d8-457e-81b6-adb6dacb8779' ( +wmic path %spp% where ID="16c08c85-0c8b-4009-9b2b-f1f7319e45f9" get LicenseStatus /value %_Nul2% | findstr "1" %_Nul1% && (exit /b) +) +if /i '%app%' EQU 'e7cce015-33d6-41c1-9831-022ba63fe1da' ( +wmic path %spp% where ID="8e7bfb1e-acc1-4f56-abae-b80fce56cd4b" get LicenseStatus /value %_Nul2% | findstr "1" %_Nul1% && (exit /b) +) +wmic path %spp% where (PartialProductKey is not NULL) get ID /value %_Nul2% | findstr /i "%app%" %_Nul1% && (call :activate&exit /b) +call :insKey exit /b -:OSPP +:RunOSPP set spp=OfficeSoftwareProtectionProduct set sps=OfficeSoftwareProtectionService -wmic path %sps% get Version /VALUE %_Nul3% || (exit /b) -wmic path %spp% where (Description like '%%KMSCLIENT%%') get Name /VALUE %_Nul3% || (exit /b) +set Off1ce=0 +set RunR2V=0 +set aC2R21=0 +set aC2R19=0 +set aC2R16=0 +set aC2R15=0 +if %OsppHook% EQU 0 exit /b +if %winbuild% GEQ 9200 if %loc_off14% EQU 0 exit /b +set err_offsvc=0 +net start osppsvc /y %_Nul3% || ( +sc start osppsvc %_Nul3% +if !errorlevel! EQU 1053 set err_offsvc=1 +) +if %err_offsvc% EQU 1 exit /b +if %winbuild% GEQ 9200 call :win8off +if %winbuild% LSS 9200 call :win7off +if %Off1ce% EQU 0 exit /b +set "vPrem="&set "vProf=" +if %loc_off14% EQU 1 ( +for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (LicenseFamily='OfficeVisioPrem-MAK') get LicenseStatus /VALUE" %_Nul6%') do set vPrem=%%A +for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (LicenseFamily='OfficeVisioPro-MAK') get LicenseStatus /VALUE" %_Nul6%') do set vProf=%%A +) for /f "tokens=2 delims==" %%A in ('"wmic path %sps% get Version /VALUE" %_Nul6%') do set ver=%%A -wmic path %sps% where version='%ver%' call SetKeyManagementServiceMachine MachineName="%KMS_IP%" %_Nul3% -wmic path %sps% where version='%ver%' call SetKeyManagementServicePort %KMS_Port% %_Nul3% +reg add "HKLM\%OPPk%" /f /v KeyManagementServiceName /t REG_SZ /d "%KMS_IP%" %_Nul3% +reg add "HKLM\%OPPk%" /f /v KeyManagementServicePort /t REG_SZ /d "%KMS_Port%" %_Nul3% for /f "tokens=2 delims==" %%G in ('"wmic path %spp% where (Description like '%%KMSCLIENT%%') get ID /VALUE"') do (set app=%%G&call :osppchk) -wmic path %sps% where version='%ver%' call DisableKeyManagementServiceDnsPublishing 0 %_Nul3% -wmic path %sps% where version='%ver%' call DisableKeyManagementServiceHostCaching 0 %_Nul3% +reg delete "HKLM\%OPPk%" /f /v DisableDnsPublishing %_Null% +reg delete "HKLM\%OPPk%" /f /v DisableKeyManagementServiceHostCaching %_Null% +exit /b + +:win8off +wmic path %spp% get Description /value %_Nul2% | findstr /i KMSCLIENT %_Nul1% && ( +set Off1ce=1 +) +exit /b + +:win7off +rem nothing installed +if %loc_off21% EQU 0 if %loc_off19% EQU 0 if %loc_off16% EQU 0 if %loc_off15% EQU 0 if %loc_off14% EQU 0 (exit /b) +set Off1ce=1 +set _sC2R=win7off +set _fC2R=ReturnOSPP +set vol_off14=0&set vol_off15=0&set vol_off16=0&set vol_off19=0&set vol_off21=0 +wmic path %spp% where (Description like '%%KMSCLIENT%%' AND NOT Name like '%%MondoR_KMS_Automation%%') get Name /value > "!_temp!\sppchk.txt" 2>&1 +find /i "Office 21" "!_temp!\sppchk.txt" %_Nul1% && (set vol_off21=1) +find /i "Office 19" "!_temp!\sppchk.txt" %_Nul1% && (set vol_off19=1) +find /i "Office 16" "!_temp!\sppchk.txt" %_Nul1% && (set vol_off16=1) +find /i "Office 15" "!_temp!\sppchk.txt" %_Nul1% && (set vol_off15=1) +find /i "Office 14" "!_temp!\sppchk.txt" %_Nul1% && (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 %vol_off16% EQU 1 find /i "Office16MondoVL_KMS_Client" "!_temp!\sppchk.txt" %_Nul1% && ( +wmic path %spp% where 'ApplicationID="%_oApp%" AND LicenseFamily like "Office16O365%%"' get LicenseFamily /value %_Nul2% | find /i "O365" %_Nul1% || (set vol_off16=0) +) +if %vol_off15% EQU 1 find /i "OfficeMondoVL_KMS_Client" "!_temp!\sppchk.txt" %_Nul1% && ( +wmic path %spp% where 'ApplicationID="%_oApp%" AND LicenseFamily like "OfficeO365%%"' get LicenseFamily /value %_Nul2% | find /i "O365" %_Nul1% || (set vol_off15=0) +) +set ret_off15=0&set ret_off16=0&set ret_off19=0&set ret_off21=0 +wmic path %spp% where (ApplicationID='%_oApp%' AND NOT Name like '%%O365%%') get Name /value > "!_temp!\sppchk.txt" 2>&1 +find /i "R_Retail" "!_temp!\sppchk.txt" %_Nul2% | find /i "Office 21" %_Nul1% && (set ret_off21=1) +find /i "R_Retail" "!_temp!\sppchk.txt" %_Nul2% | find /i "Office 19" %_Nul1% && (set ret_off19=1) +find /i "R_Retail" "!_temp!\sppchk.txt" %_Nul2% | find /i "Office 16" %_Nul1% && (set ret_off16=1) +find /i "R_Retail" "!_temp!\sppchk.txt" %_Nul2% | find /i "Office 15" %_Nul1% && (set ret_off15=1) +if %ret_off21% EQU 1 if %_O16MSI% EQU 0 set vol_off21=0 +if %ret_off19% EQU 1 if %_O16MSI% EQU 0 set vol_off19=0 +if %ret_off16% EQU 1 if %_O16MSI% EQU 0 set vol_off16=0 +if %ret_off15% EQU 1 if %_O15MSI% EQU 0 set vol_off15=0 +if %vol_off14% EQU 0 wmic path %spp% where ApplicationID='%_oA14%' get Description /value %_Nul2% | findstr /i channel %_Nul1% && (set ret_off14=1) +set run_off16=0 +if defined _C16R if %loc_off16% EQU 1 if %vol_off16% EQU 0 if %ret_off16% EQU 1 ( +for %%a in (%DO16Ids%) do find /i "Office16%%aR" "!_temp!\sppchk.txt" %_Nul1% && ( + if %vol_off21% EQU 1 find /i "Office21%%a2021VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + if %vol_off19% EQU 1 find /i "Office19%%a2019VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + ) +for %%a in (Professional) do find /i "Office16%%aR" "!_temp!\sppchk.txt" %_Nul1% && ( + if %vol_off21% EQU 1 find /i "Office21ProPlus2021VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + if %vol_off19% EQU 1 find /i "Office19ProPlus2019VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + ) +for %%a in (HomeBusiness,HomeStudent) do find /i "Office16%%aR" "!_temp!\sppchk.txt" %_Nul1% && ( + if %vol_off21% EQU 1 find /i "Office21Standard2021VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + if %vol_off19% EQU 1 find /i "Office19Standard2019VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + ) +) +if defined _C16R if %loc_off16% EQU 1 if %run_off16% EQU 0 wmic path %spp% where (ApplicationID='%_oApp%' AND LicenseFamily like 'Office16O365%%') get LicenseFamily /value %_Nul2% | find /i "O365" %_Nul1% && ( +find /i "Office16MondoVL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 +) +set vol_offgl=1 +if %vol_off21% EQU 0 if %vol_off19% EQU 0 if %vol_off16% EQU 0 if %vol_off15% EQU 0 if %vol_off14% EQU 0 set vol_offgl=0 +rem mixed Volume + Retail +if %loc_off21% EQU 1 if %vol_off21% EQU 0 if %RunR2V% EQU 0 if %AutoR2V% EQU 1 goto :C2RR2V +if %loc_off19% EQU 1 if %vol_off19% EQU 0 if %RunR2V% EQU 0 if %AutoR2V% EQU 1 goto :C2RR2V +if defined _C16R if %loc_off16% EQU 1 if %vol_off16% EQU 0 if %RunR2V% EQU 0 if %AutoR2V% EQU 1 if %run_off16% EQU 1 goto :C2RR2V +if defined _C15R if %loc_off15% EQU 1 if %vol_off15% EQU 0 if %RunR2V% EQU 0 if %AutoR2V% EQU 1 goto :C2RR2V +rem all supported Volume +if %vol_offgl% EQU 1 exit /b +set Off1ce=0 +rem Retail C2R +if %RunR2V% EQU 0 if %AutoR2V% EQU 1 goto :C2RR2V +:ReturnOSPP +rem Retail MSI/C2R or failed C2R-R2V exit /b :osppchk -wmic path %spp% where ID='%app%' get Name > "!_temp!\osppchk.txt" -find /i "Office 14" "!_temp!\osppchk.txt" %_Nul1% && (if %loc_off14% EQU 0 exit /b) -find /i "Office 15" "!_temp!\osppchk.txt" %_Nul1% && (if %loc_off15% EQU 0 exit /b) -find /i "Office 16" "!_temp!\osppchk.txt" %_Nul1% && (if %loc_off16% EQU 0 exit /b) -find /i "Office 19" "!_temp!\osppchk.txt" %_Nul1% && (if %loc_off19% EQU 0 exit /b) -set office=0 -wmic path %spp% where (PartialProductKey is not NULL) get ID | findstr /i "%app%" %_Nul3% && (call :activate %app%&exit /b) +wmic path %spp% where ID='%app%' get Name /value > "!_temp!\sppchk.txt" +find /i "Office 14" "!_temp!\sppchk.txt" %_Nul1% && (if %loc_off14% EQU 0 exit /b) +find /i "Office 15" "!_temp!\sppchk.txt" %_Nul1% && (if %loc_off15% EQU 0 exit /b) +find /i "Office 16" "!_temp!\sppchk.txt" %_Nul1% && (if %loc_off16% EQU 0 exit /b) +find /i "Office 19" "!_temp!\sppchk.txt" %_Nul1% && (if %loc_off19% EQU 0 exit /b) +find /i "Office 21" "!_temp!\sppchk.txt" %_Nul1% && (if %loc_off21% EQU 0 exit /b) +if /i '%app%' EQU 'f3fb2d68-83dd-4c8b-8f09-08e0d950ac3b' ( +wmic path %spp% get ID | findstr /i "fbdb3e18-a8ef-4fb3-9183-dffd60bd0984" %_Nul3% && (exit /b) +) +if /i '%app%' EQU '76093b1b-7057-49d7-b970-638ebcbfd873' ( +wmic path %spp% get ID | findstr /i "76881159-155c-43e0-9db7-2d70a9a3a4ca" %_Nul3% && (exit /b) +) +if /i '%app%' EQU 'a3b44174-2451-4cd6-b25f-66638bfb9046' ( +wmic path %spp% get ID | findstr /i "fb61ac9a-1688-45d2-8f6b-0674dbffa33c" %_Nul3% && (exit /b) +) +set _officespp=0 +wmic path %spp% where (PartialProductKey is not NULL) get ID /value %_Nul2% | findstr /i "%app%" %_Nul1% && (call :activate&exit /b) for /f "tokens=3 delims==, " %%G in ('"wmic path %spp% where ID='%app%' get Name /value"') do set OffVer=%%G call :offchk%OffVer% exit /b @@ -277,13 +558,45 @@ exit /b :offchk set ls=0 set ls2=0 -for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (Name like '%%Office%~2%%') get LicenseStatus /VALUE" %_Nul6%') do set /a ls=%%A -if "%~4" NEQ "" ( -for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (Name like '%%Office%~4%%') get LicenseStatus /VALUE" %_Nul6%') do set /a ls2=%%A -) +set ls3=0 +for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (LicenseFamily='Office%~1') get LicenseStatus /VALUE" %_Nul6%') do set /a ls=%%A +if "%~3" NEQ "" for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (LicenseFamily='Office%~3') get LicenseStatus /VALUE" %_Nul6%') do set /a ls2=%%A +if "%~5" NEQ "" for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (LicenseFamily='Office%~5') get LicenseStatus /VALUE" %_Nul6%') do set /a ls3=%%A +if "%ls3%" EQU "1" exit /b if "%ls2%" EQU "1" exit /b if "%ls%" EQU "1" exit /b -call :insKey %app% +call :insKey +exit /b + +:offchk21 +if /i '%app%' EQU 'f3fb2d68-83dd-4c8b-8f09-08e0d950ac3b' exit /b +if /i '%app%' EQU '76093b1b-7057-49d7-b970-638ebcbfd873' exit /b +if /i '%app%' EQU 'a3b44174-2451-4cd6-b25f-66638bfb9046' exit /b +if /i '%app%' EQU 'fbdb3e18-a8ef-4fb3-9183-dffd60bd0984' ( +call :offchk "21ProPlus2021VL_MAK_AE1" "Office ProPlus 2021" "21ProPlus2021VL_MAK_AE2" +exit /b +) +if /i '%app%' EQU '080a45c5-9f9f-49eb-b4b0-c3c610a5ebd3' ( +call :offchk "21Standard2021VL_MAK_AE" "Office Standard 2021" +exit /b +) +if /i '%app%' EQU '76881159-155c-43e0-9db7-2d70a9a3a4ca' ( +call :offchk "21ProjectPro2021VL_MAK_AE1" "Project Pro 2021" "21ProjectPro2021VL_MAK_AE2" +exit /b +) +if /i '%app%' EQU '6dd72704-f752-4b71-94c7-11cec6bfc355' ( +call :offchk "21ProjectStd2021VL_MAK_AE" "Project Standard 2021" +exit /b +) +if /i '%app%' EQU 'fb61ac9a-1688-45d2-8f6b-0674dbffa33c' ( +call :offchk "21VisioPro2021VL_MAK_AE" "Visio Pro 2021" +exit /b +) +if /i '%app%' EQU '72fce797-1884-48dd-a860-b2f6a5efd3ca' ( +call :offchk "21VisioStd2021VL_MAK_AE" "Visio Standard 2021" +exit /b +) +call :insKey exit /b :offchk19 @@ -291,890 +604,1748 @@ if /i '%app%' EQU '0bc88885-718c-491d-921f-6f214349e79c' exit /b if /i '%app%' EQU 'fc7c4d0c-2e85-4bb9-afd4-01ed1476b5e9' exit /b if /i '%app%' EQU '500f6619-ef93-4b75-bcb4-82819998a3ca' exit /b if /i '%app%' EQU '85dd8b5f-eaa4-4af3-a628-cce9e77c9a03' ( -wmic path %spp% where 'PartialProductKey is not NULL' get ID | findstr /i "0bc88885-718c-491d-921f-6f214349e79c" %_Nul3% && (exit /b) -) -if /i '%app%' EQU '2ca2bf3f-949e-446a-82c7-e25a15ec78c4' ( -wmic path %spp% where 'PartialProductKey is not NULL' get ID | findstr /i "fc7c4d0c-2e85-4bb9-afd4-01ed1476b5e9" %_Nul3% && (exit /b) -) -if /i '%app%' EQU '5b5cf08f-b81a-431d-b080-3450d8620565' ( -wmic path %spp% where 'PartialProductKey is not NULL' get ID | findstr /i "500f6619-ef93-4b75-bcb4-82819998a3ca" %_Nul3% && (exit /b) -) -if /i '%app%' EQU '85dd8b5f-eaa4-4af3-a628-cce9e77c9a03' ( -call :offchk "%app%" "19ProPlus2019VL_MAK_AE" "Office ProPlus 2019" "19ProPlus2019XC2RVL_MAKC2R" "Office ProPlus 2019 C2R" +call :offchk "19ProPlus2019VL_MAK_AE" "Office ProPlus 2019" exit /b ) if /i '%app%' EQU '6912a74b-a5fb-401a-bfdb-2e3ab46f4b02' ( -call :offchk "%app%" "19Standard2019VL_MAK_AE" "Office Standard 2019" +call :offchk "19Standard2019VL_MAK_AE" "Office Standard 2019" exit /b ) if /i '%app%' EQU '2ca2bf3f-949e-446a-82c7-e25a15ec78c4' ( -call :offchk "%app%" "19ProjectPro2019VL_MAK_AE" "Project Pro 2019" "19ProjectPro2019XC2RVL_MAKC2R" "Project Pro 2019 C2R" +call :offchk "19ProjectPro2019VL_MAK_AE" "Project Pro 2019" exit /b ) if /i '%app%' EQU '1777f0e3-7392-4198-97ea-8ae4de6f6381' ( -call :offchk "%app%" "19ProjectStd2019VL_MAK_AE" "Project Standard 2019" +call :offchk "19ProjectStd2019VL_MAK_AE" "Project Standard 2019" exit /b ) if /i '%app%' EQU '5b5cf08f-b81a-431d-b080-3450d8620565' ( -call :offchk "%app%" "19VisioPro2019VL_MAK_AE" "Visio Pro 2019" "19VisioPro2019XC2RVL_MAKC2R" "Visio Pro 2019 C2R" +call :offchk "19VisioPro2019VL_MAK_AE" "Visio Pro 2019" exit /b ) if /i '%app%' EQU 'e06d7df3-aad0-419d-8dfb-0ac37e2bdf39' ( -call :offchk "%app%" "19VisioStd2019VL_MAK_AE" "Visio Standard 2019" +call :offchk "19VisioStd2019VL_MAK_AE" "Visio Standard 2019" exit /b ) -call :insKey %app% +call :insKey exit /b :offchk16 if /i '%app%' EQU 'd450596f-894d-49e0-966a-fd39ed4c4c64' ( -call :offchk "%app%" "16ProPlusVL_MAK" "Office ProPlus 2016" +call :offchk "16ProPlusVL_MAK" "Office ProPlus 2016" exit /b ) if /i '%app%' EQU 'dedfa23d-6ed1-45a6-85dc-63cae0546de6' ( -call :offchk "%app%" "16StandardVL_MAK" "Office Standard 2016" +call :offchk "16StandardVL_MAK" "Office Standard 2016" exit /b ) if /i '%app%' EQU '4f414197-0fc2-4c01-b68a-86cbb9ac254c' ( -call :offchk "%app%" "16ProjectProVL_MAK" "Project Pro 2016" +call :offchk "16ProjectProVL_MAK" "Project Pro 2016" exit /b ) if /i '%app%' EQU 'da7ddabc-3fbe-4447-9e01-6ab7440b4cd4' ( -call :offchk "%app%" "16ProjectStdVL_MAK" "Project Standard 2016" +call :offchk "16ProjectStdVL_MAK" "Project Standard 2016" exit /b ) if /i '%app%' EQU '6bf301c1-b94a-43e9-ba31-d494598c47fb' ( -call :offchk "%app%" "16VisioProVL_MAK" "Visio Pro 2016" +call :offchk "16VisioProVL_MAK" "Visio Pro 2016" exit /b ) if /i '%app%' EQU 'aa2a7821-1827-4c2c-8f1d-4513a34dda97' ( -call :offchk "%app%" "16VisioStdVL_MAK" "Visio Standard 2016" +call :offchk "16VisioStdVL_MAK" "Visio Standard 2016" exit /b ) if /i '%app%' EQU '829b8110-0e6f-4349-bca4-42803577788d' ( -call :offchk "%app%" "16ProjectProXC2RVL_MAKC2R" "Project Pro 2016 C2R" +call :offchk "16ProjectProXC2RVL_MAKC2R" "Project Pro 2016 C2R" exit /b ) if /i '%app%' EQU 'cbbaca45-556a-4416-ad03-bda598eaa7c8' ( -call :offchk "%app%" "16ProjectStdXC2RVL_MAKC2R" "Project Standard 2016 C2R" +call :offchk "16ProjectStdXC2RVL_MAKC2R" "Project Standard 2016 C2R" exit /b ) if /i '%app%' EQU 'b234abe3-0857-4f9c-b05a-4dc314f85557' ( -call :offchk "%app%" "16VisioProXC2RVL_MAKC2R" "Visio Pro 2016 C2R" +call :offchk "16VisioProXC2RVL_MAKC2R" "Visio Pro 2016 C2R" exit /b ) if /i '%app%' EQU '361fe620-64f4-41b5-ba77-84f8e079b1f7' ( -call :offchk "%app%" "16VisioStdXC2RVL_MAKC2R" "Visio Standard 2016 C2R" +call :offchk "16VisioStdXC2RVL_MAKC2R" "Visio Standard 2016 C2R" exit /b ) -call :insKey %app% +call :insKey exit /b :offchk15 if /i '%app%' EQU 'b322da9c-a2e2-4058-9e4e-f59a6970bd69' ( -call :offchk "%app%" "ProPlusVL_MAK" "Office ProPlus 2013" +call :offchk "ProPlusVL_MAK" "Office ProPlus 2013" exit /b ) if /i '%app%' EQU 'b13afb38-cd79-4ae5-9f7f-eed058d750ca' ( -call :offchk "%app%" "StandardVL_MAK" "Office Standard 2013" +call :offchk "StandardVL_MAK" "Office Standard 2013" exit /b ) if /i '%app%' EQU '4a5d124a-e620-44ba-b6ff-658961b33b9a' ( -call :offchk "%app%" "ProjectProVL_MAK" "Project Pro 2013" +call :offchk "ProjectProVL_MAK" "Project Pro 2013" exit /b ) if /i '%app%' EQU '427a28d1-d17c-4abf-b717-32c780ba6f07' ( -call :offchk "%app%" "ProjectStdVL_MAK" "Project Standard 2013" +call :offchk "ProjectStdVL_MAK" "Project Standard 2013" exit /b ) if /i '%app%' EQU 'e13ac10e-75d0-4aff-a0cd-764982cf541c' ( -call :offchk "%app%" "VisioProVL_MAK" "Visio Pro 2013" +call :offchk "VisioProVL_MAK" "Visio Pro 2013" exit /b ) if /i '%app%' EQU 'ac4efaf0-f81f-4f61-bdf7-ea32b02ab117' ( -call :offchk "%app%" "VisioStdVL_MAK" "Visio Standard 2013" +call :offchk "VisioStdVL_MAK" "Visio Standard 2013" exit /b ) -call :insKey %app% +call :insKey exit /b :offchk14 -set "vPrem="&set "vPro=" -for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (Name like '%%OfficeVisioPrem-MAK%%') get LicenseStatus /VALUE" %_Nul6%') do set vPrem=%%A -for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (Name like '%%OfficeVisioPro-MAK%%') get LicenseStatus /VALUE" %_Nul6%') do set vPro=%%A if /i '%app%' EQU '6f327760-8c5c-417c-9b61-836a98287e0c' ( -call :offchk "%app%" "ProPlus-MAK" "Office ProPlus 2010" "ProPlusAcad-MAK" "Office Professional Academic 2010" +call :offchk "ProPlus-MAK" "Office ProPlus 2010" "ProPlusAcad-MAK" "Office Professional Academic 2010" exit /b ) if /i '%app%' EQU '9da2a678-fb6b-4e67-ab84-60dd6a9c819a' ( -call :offchk "%app%" "Standard-MAK" "Office Standard 2010" +call :offchk "Standard-MAK" "Office Standard 2010" "StandardAcad-MAK" "Office Standard Academic 2010" exit /b ) if /i '%app%' EQU 'ea509e87-07a1-4a45-9edc-eba5a39f36af' ( -call :offchk "%app%" "SmallBusBasics-MAK" "Office Home and Business 2010" +call :offchk "SmallBusBasics-MAK" "Office Small Business Basics 2010" exit /b ) if /i '%app%' EQU 'df133ff7-bf14-4f95-afe3-7b48e7e331ef' ( -call :offchk "%app%" "ProjectPro-MAK" "Project Pro 2010" +call :offchk "ProjectPro-MAK" "Project Pro 2010" exit /b ) if /i '%app%' EQU '5dc7bf61-5ec9-4996-9ccb-df806a2d0efe' ( -call :offchk "%app%" "ProjectStd-MAK" "Project Standard 2010" +call :offchk "ProjectStd-MAK" "Project Standard 2010" "ProjectStd-MAK2" "Project Standard 2010" exit /b ) if /i '%app%' EQU '92236105-bb67-494f-94c7-7f7a607929bd' ( -call :offchk "%app%" "VisioPrem-MAK" "Visio Premium 2010" "VisioPro-MAK" "Visio Pro 2010" +call :offchk "VisioPrem-MAK" "Visio Premium 2010" "VisioPro-MAK" "Visio Pro 2010" exit /b ) if defined vPrem exit /b if /i '%app%' EQU 'e558389c-83c3-4b29-adfe-5e4d7f46c358' ( -call :offchk "%app%" "VisioPro-MAK" "Visio Pro 2010" "VisioStd-MAK" "Visio Standard 2010" +call :offchk "VisioPro-MAK" "Visio Pro 2010" "VisioStd-MAK" "Visio Standard 2010" exit /b ) -if defined vPro exit /b +if defined vProf exit /b if /i '%app%' EQU '9ed833ff-4f92-4f36-b370-8683a4f13275' ( -call :offchk "%app%" "VisioStd-MAK" "Visio Standard 2010" +call :offchk "VisioStd-MAK" "Visio Standard 2010" exit /b ) -call :insKey %app% +call :insKey exit /b :officeLoc set loc_off%1=0 +set _O%1MSI=0 if %1 EQU 19 ( -if defined _C2R reg query %_C2R% /v ProductReleaseIds %_Nul2% | findstr 2019 %_Nul1% && set loc_off%1=1 +if defined _C16R reg query %_C16R% /v ProductReleaseIds %_Nul2% | findstr 2019 %_Nul1% && set loc_off%1=1 +exit /b +) +if %1 EQU 21 ( +if defined _C16R reg query %_C16R% /v ProductReleaseIds %_Nul2% | findstr 2021 %_Nul1% && set loc_off%1=1 exit /b ) -for /f "tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\%1.0\Common\InstallRoot /v Path" %_Nul6%') do if exist "%%b\OSPP.VBS" set loc_off%1=1 -for /f "tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\%1.0\Common\InstallRoot /v Path" %_Nul6%') do if exist "%%b\OSPP.VBS" set loc_off%1=1 +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\%1.0\Common\InstallRoot /v Path" %_Nul6%') do if exist "%%b\OSPP.VBS" ( +set loc_off%1=1 +set _O%1MSI=1 +) +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\%1.0\Common\InstallRoot /v Path" %_Nul6%') do if exist "%%b\OSPP.VBS" ( +set loc_off%1=1 +set _O%1MSI=1 +) -if %1 EQU 16 if defined _C2R ( -for /f "skip=2 tokens=2*" %%a in ('reg query %_C2R% /v ProductReleaseIds') do echo %%b> "!_temp!\c2rchk.txt" -for %%a in (Mondo,ProPlus,Standard,ProjectProX,ProjectStdX,ProjectPro,ProjectStd,VisioProX,VisioStdX,VisioPro,VisioStd,Access,Excel,OneNote,Outlook,PowerPoint,Publisher,SkypeforBusiness,Word) do ( +if %1 EQU 16 if defined _C16R ( +for /f "skip=2 tokens=2*" %%a in ('reg query %_C16R% /v ProductReleaseIds') do echo %%b> "!_temp!\c2rchk.txt" +for %%a in (%LV16Ids%,ProjectProX,ProjectStdX,VisioProX,VisioStdX) do ( findstr /I /C:"%%aVolume" "!_temp!\c2rchk.txt" %_Nul1% && set loc_off%1=1 + ) +for %%a in (%LR16Ids%) do ( findstr /I /C:"%%aRetail" "!_temp!\c2rchk.txt" %_Nul1% && set loc_off%1=1 ) exit /b ) +if %1 EQU 15 if defined _C15R ( +set loc_off%1=1 +exit /b +) + if exist "%ProgramFiles%\Microsoft Office\Office%1\OSPP.VBS" set loc_off%1=1 -if exist "%ProgramFiles(x86)%\Microsoft Office\Office%1\OSPP.VBS" set loc_off%1=1 +if not %xOS%==x86 if exist "%ProgramW6432%\Microsoft Office\Office%1\OSPP.VBS" set loc_off%1=1 +if not %xOS%==x86 if exist "%ProgramFiles(x86)%\Microsoft Office\Office%1\OSPP.VBS" set loc_off%1=1 exit /b :insKey -set "key=" -call :keys %1 -if "%key%" EQU "" (exit /b) -wmic path %sps% where version='%ver%' call InstallProductKey ProductKey="%key%" %_Nul3% +set "_key=" +call :keys %app% +if "%_key%"=="" (exit /b) +wmic path %sps% where version='%ver%' call InstallProductKey ProductKey="%_key%" %_Nul3% set ERRORCODE=%ERRORLEVEL% if %ERRORCODE% NEQ 0 exit /b +if %sps% EQU SoftwareLicensingService wmic path %sps% where version='%ver%' call RefreshLicenseStatus %_Nul3% :activate -wmic path %spp% where ID='%1' call ClearKeyManagementServiceMachine %_Nul3% -wmic path %spp% where ID='%1' call ClearKeyManagementServicePort %_Nul3% -if %W1nd0ws% EQU 0 if %office% EQU 0 if %sps% EQU SoftwareLicensingService ( -wmic path %spp% where ID='%1' call SetKeyManagementServiceMachine MachineName="127.0.0.2" %_Nul3% -wmic path %spp% where ID='%1' call SetKeyManagementServicePort %KMS_Port% %_Nul3% +if %sps% EQU SoftwareLicensingService ( +if %_officespp% EQU 0 (reg delete "HKLM\%SPPk%\%_wApp%\%app%" /f %_Null%) else (reg delete "HKLM\%SPPk%\%_oApp%\%app%" /f %_Null%) +) else ( +reg delete "HKLM\%OPPk%\%_oA14%\%app%" /f %_Null% +reg delete "HKLM\%OPPk%\%_oApp%\%app%" /f %_Null% +) +if %W1nd0ws% EQU 0 if %_officespp% EQU 0 if %sps% EQU SoftwareLicensingService ( +reg add "HKLM\%SPPk%\%_wApp%\%app%" /f /v KeyManagementServiceName /t REG_SZ /d "127.0.0.2" %_Nul3% +reg add "HKLM\%SPPk%\%_wApp%\%app%" /f /v KeyManagementServicePort /t REG_SZ /d "%KMS_Port%" %_Nul3% +reg add "HKU\S-1-5-20\%SPPk%\%_wApp%\%app%" /f /v DiscoveredKeyManagementServiceIpAddress /t REG_SZ /d "127.0.0.2" %_Nul3% exit /b ) -wmic path %spp% where ID='%1' call Activate %_Nul3% +wmic path %spp% where ID='%app%' call Activate %_Nul3% call set ERRORCODE=%ERRORLEVEL% +if %ERRORCODE% EQU -1073418187 exit /b +if %ERRORCODE% EQU -1073417728 exit /b if %ERRORCODE% NEQ 0 ( if %sps% EQU SoftwareLicensingService (call :StopService sppsvc) else (call :StopService osppsvc) -wmic path %spp% where ID='%1' call Activate %_Nul3% -call set ERRORCODE=!ERRORLEVEL! +wmic path %spp% where ID='%app%' call Activate %_Nul3% +) +exit /b + +:StopService +sc query %1 | find /i "STOPPED" %_Nul1% || net stop %1 /y %_Nul3% +sc query %1 | find /i "STOPPED" %_Nul1% || sc stop %1 %_Nul3% +goto :eof + +:InstallHook +if %winbuild% GEQ 9600 ( + WMIC /NAMESPACE:\\root\Microsoft\Windows\Defender PATH MSFT_MpPreference call Add ExclusionPath=%_Hook% Force=True %_Nul3% +) +for %%# in (SppExtComObjHookAvrf.dll,SppExtComObjHook.dll,SppExtComObjPatcher.dll,SppExtComObjPatcher.exe) do ( + if exist "%SysPath%\%%#" del /f /q "%SysPath%\%%#" %_Nul3% + if exist "%SystemRoot%\SysWOW64\%%#" del /f /q "%SystemRoot%\SysWOW64\%%#" %_Nul3% +) +if not exist "!_work!\bin\%xOS%.dll" exit /b +copy /y "!_work!\bin\%xOS%.dll" %_Hook% %_Nul3% || (del /f /q %_Hook% &exit /b) +if %SSppHook% NEQ 0 call :CreateIFEOEntry %SppVer% +call :CreateIFEOEntry osppsvc.exe +if %OSType% EQU Win7 ( +call :CreateIFEOEntry SppExtComObj.exe +if %SSppHook% NEQ 0 if not exist %w7inf% ( + if not exist "%SystemRoot%\Migration\WTR" md "%SystemRoot%\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 [*]" + )>%w7inf% + ) +) +goto :ReturnHook + +:CreateIFEOEntry +reg delete "%IFEO%\%1" /f /v Debugger %_Null% +reg add "%IFEO%\%1" /f /v VerifierDlls /t REG_SZ /d "SppExtComObjHook.dll" %_Nul3% +reg add "%IFEO%\%1" /f /v VerifierDebug /t REG_DWORD /d 0x00000000 %_Nul3% +reg add "%IFEO%\%1" /f /v VerifierFlags /t REG_DWORD /d 0x80000000 %_Nul3% +reg add "%IFEO%\%1" /f /v GlobalFlag /t REG_DWORD /d 0x00000100 %_Nul3% +reg add "%IFEO%\%1" /f /v KMS_Emulation /t REG_DWORD /d %KMS_Emulation% %_Nul3% +reg add "%IFEO%\%1" /f /v KMS_ActivationInterval /t REG_DWORD /d %KMS_ActivationInterval% %_Nul3% +reg add "%IFEO%\%1" /f /v KMS_RenewalInterval /t REG_DWORD /d %KMS_RenewalInterval% %_Nul3% +if /i %1 EQU SppExtComObj.exe if %winbuild% GEQ 9600 ( +reg add "%IFEO%\%1" /f /v KMS_HWID /t REG_QWORD /d "%KMS_HWID%" %_Nul3% +) + +:UpdateOSPPEntry +if /i %1 EQU osppsvc.exe ( +reg add "HKLM\%OPPk%" /f /v KeyManagementServiceName /t REG_SZ /d "%KMS_IP%" %_Nul3% +reg add "HKLM\%OPPk%" /f /v KeyManagementServicePort /t REG_SZ /d "%KMS_Port%" %_Nul3% +) +goto :eof + +:CreateTask +schtasks /query /tn "%_TaskEx%" %_Nul3% || ( + schtasks /query /tn "%_TaskOs%" %_Nul3% && ( + schtasks /query /tn "%_TaskOs%" /xml >"!_temp!\SvcTrigger.xml" + schtasks /create /tn "%_TaskEx%" /xml "!_temp!\SvcTrigger.xml" /f %_Nul3% + schtasks /change /tn "%_TaskEx%" /enable %_Nul3% + del /f /q "!_temp!\SvcTrigger.xml" %_Nul3% + ) +) +schtasks /query /tn "%_TaskEx%" %_Nul3% || ( + if exist "!_work!\bin\SvcTrigger.xml" schtasks /create /tn "%_TaskEx%" /xml "!_work!\bin\SvcTrigger.xml" /f %_Nul3% +) +goto :eof + +:C2RR2V +set RunR2V=1 +set "_SLMGR=%SysPath%\slmgr.vbs" +if %_Debug% EQU 0 ( +set "_cscript=cscript //Nologo //B" +) else ( +set "_cscript=cscript //Nologo" +) +set _LTSC=0 +set "_tag="&set "_ons= 2016" +sc query ClickToRunSvc %_Nul3% +set error1=%errorlevel% +sc query OfficeSvc %_Nul3% +set error2=%errorlevel% +if %error1% EQU 1060 if %error2% EQU 1060 ( +goto :%_fC2R% +) +set _Office16=0 +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath" %_Nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" ( + set _Office16=1 +) +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun /v InstallPath" %_Nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" ( + set _Office16=1 +) +set _Office15=0 +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun /v InstallPath" %_Nul6%') do if exist "%%b\root\Licenses\ProPlus*.xrm-ms" ( + set _Office15=1 +) +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\ClickToRun /v InstallPath" %_Nul6%') do if exist "%%b\root\Licenses\ProPlus*.xrm-ms" ( + set _Office15=1 +) +if %_Office16% EQU 0 if %_Office15% EQU 0 ( +goto :%_fC2R% +) + +:Reg16istry +if %_Office16% EQU 0 goto :Reg15istry +set "_InstallRoot=" +set "_ProductIds=" +set "_GUID=" +set "_Config=" +set "_PRIDs=" +set "_LicensesPath=" +set "_Integrator=" +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath" %_Nul6%') do (set "_InstallRoot=%%b\root") +if not "%_InstallRoot%"=="" ( + for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v PackageGUID" %_Nul6%') do (set "_GUID=%%b") + for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds" %_Nul6%') do (set "_ProductIds=%%b") + set "_Config=HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration" + set "_PRIDs=HKLM\SOFTWARE\Microsoft\Office\ClickToRun\ProductReleaseIDs" +) else ( + for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun /v InstallPath" %_Nul6%') do (set "_InstallRoot=%%b\root") + for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun /v PackageGUID" %_Nul6%') do (set "_GUID=%%b") + for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds" %_Nul6%') do (set "_ProductIds=%%b") + set "_Config=HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun\Configuration" + set "_PRIDs=HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun\ProductReleaseIDs" +) +set "_LicensesPath=%_InstallRoot%\Licenses16" +set "_Integrator=%_InstallRoot%\integration\integrator.exe" +for /f "skip=2 tokens=2*" %%a in ('"reg query %_PRIDs% /v ActiveConfiguration" %_Nul6%') do set "_PRIDs=%_PRIDs%\%%b" +if "%_ProductIds%"=="" ( +if %_Office15% EQU 0 (goto :%_fC2R%) else (goto :Reg15istry) +) +if not exist "%_LicensesPath%\ProPlus*.xrm-ms" ( +if %_Office15% EQU 0 (goto :%_fC2R%) else (goto :Reg15istry) +) +if not exist "%_Integrator%" ( +if %_Office15% EQU 0 (goto :%_fC2R%) else (goto :Reg15istry) +) +if exist "%_LicensesPath%\Word2019VL_KMS_Client_AE*.xrm-ms" (set "_tag=2019"&set "_ons= 2019") +if exist "%_LicensesPath%\Word2021VL_KMS_Client_AE*.xrm-ms" (set _LTSC=1) +if %winbuild% LSS 10240 if !_LTSC! EQU 1 (set "_tag=2021"&set "_ons= 2021") +if %_Office15% EQU 0 goto :CheckC2R + +:Reg15istry +set "_Install15Root=" +set "_Product15Ids=" +set "_Con15fig=" +set "_PR15IDs=" +set "_OSPP15Ready=" +set "_Licenses15Path=" +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun /v InstallPath" %_Nul6%') do (set "_Install15Root=%%b\root") +if not "%_Install15Root%"=="" ( + for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\Configuration /v ProductReleaseIds" %_Nul6%') do (set "_Product15Ids=%%b") + set "_Con15fig=HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\Configuration /v ProductReleaseIds" + set "_PR15IDs=HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\ProductReleaseIDs" + set "_OSPP15Ready=HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\Configuration" +) else ( + for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\ClickToRun /v InstallPath" %_Nul6%') do (set "_Install15Root=%%b\root") + for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\ClickToRun\Configuration /v ProductReleaseIds" %_Nul6%') do (set "_Product15Ids=%%b") + set "_Con15fig=HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\ClickToRun\Configuration /v ProductReleaseIds" + set "_PR15IDs=HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\ClickToRun\ProductReleaseIDs" + set "_OSPP15Ready=HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\ClickToRun\Configuration" +) +set "_OSPP15ReadT=REG_SZ" +if "%_Product15Ids%"=="" ( +reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\propertyBag /v productreleaseid %_Nul3% && ( + for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\propertyBag /v productreleaseid" %_Nul6%') do (set "_Product15Ids=%%b") + set "_Con15fig=HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\propertyBag /v productreleaseid" + set "_OSPP15Ready=HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun" + set "_OSPP15ReadT=REG_DWORD" + ) +reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\ClickToRun\propertyBag /v productreleaseid %_Nul3% && ( + for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\ClickToRun\propertyBag /v productreleaseid" %_Nul6%') do (set "_Product15Ids=%%b") + set "_Con15fig=HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\ClickToRun\propertyBag /v productreleaseid" + set "_OSPP15Ready=HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\ClickToRun" + set "_OSPP15ReadT=REG_DWORD" + ) +) +set "_Licenses15Path=%_Install15Root%\Licenses" +if exist "%ProgramFiles%\Microsoft Office\Office15\OSPP.VBS" ( + set "_OSPP15VBS=%ProgramFiles%\Microsoft Office\Office15\OSPP.VBS" +) else if exist "%ProgramW6432%\Microsoft Office\Office15\OSPP.VBS" ( + set "_OSPP15VBS=%ProgramW6432%\Microsoft Office\Office15\OSPP.VBS" +) else if exist "%ProgramFiles(x86)%\Microsoft Office\Office15\OSPP.VBS" ( + set "_OSPP15VBS=%ProgramFiles(x86)%\Microsoft Office\Office15\OSPP.VBS" +) +if "%_Product15Ids%"=="" ( +if %_Office16% EQU 0 (goto :%_fC2R%) else (goto :CheckC2R) +) +if not exist "%_Licenses15Path%\ProPlus*.xrm-ms" ( +if %_Office16% EQU 0 (goto :%_fC2R%) else (goto :CheckC2R) +) +if %winbuild% LSS 9200 if not exist "%_OSPP15VBS%" ( +if %_Office16% EQU 0 (goto :%_fC2R%) else (goto :CheckC2R) +) + +:CheckC2R +set _OMSI=0 +if %_Office16% EQU 0 ( +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\16.0\Common\InstallRoot /v Path" %_Nul6%') do if exist "%%b\OSPP.VBS" set _OMSI=1 +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\16.0\Common\InstallRoot /v Path" %_Nul6%') do if exist "%%b\OSPP.VBS" set _OMSI=1 +) +if %_Office15% EQU 0 ( +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\15.0\Common\InstallRoot /v Path" %_Nul6%') do if exist "%%b\OSPP.VBS" set _OMSI=1 +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Common\InstallRoot /v Path" %_Nul6%') do if exist "%%b\OSPP.VBS" set _OMSI=1 +) +if %winbuild% GEQ 9200 ( +set _spp=SoftwareLicensingProduct +set _sps=SoftwareLicensingService +set "_vbsi=%_SLMGR% /ilc " +) else ( +set _spp=OfficeSoftwareProtectionProduct +set _sps=OfficeSoftwareProtectionService +set _vbsi="!_OSPP15VBS!" /inslic: +) +set "_wmi=" +for /f "tokens=2 delims==" %%# in ('"wmic path %_sps% get version /value" %_Nul6%') do set "_wmi=%%#" +if "%_wmi%"=="" ( +goto :%_fC2R% +) +set _Identity=0 +set _vNext=0 +set sub_O365=0 +set sub_proj=0 +set sub_vis=0 +dir /b /s /a:-d "!_Local!\Microsoft\Office\Licenses\*1*" %_Nul3% && set _Identity=1 +dir /b /s /a:-d "!ProgramData!\Microsoft\Office\Licenses\*1*" %_Nul3% && set _Identity=1 +set kNext=HKCU\SOFTWARE\Microsoft\Office\16.0\Common\Licensing\LicensingNext +if %_Identity% EQU 1 reg query %kNext% /v MigrationToV5Done %_Nul2% | find /i "0x1" %_Nul1% && set _vNext=1 +if %_vNext% EQU 1 ( +reg query %kNext% | findstr /i /r ".*retail" %_Nul2% | findstr /i /v "project visio" %_Nul2% | find /i "0x2" %_Nul1% && (set sub_O365=1) +reg query %kNext% | findstr /i /r ".*retail" %_Nul2% | findstr /i /v "project visio" %_Nul2% | find /i "0x3" %_Nul1% && (set sub_O365=1) +reg query %kNext% | findstr /i /r ".*volume" %_Nul2% | findstr /i /v "project visio" %_Nul2% | find /i "0x2" %_Nul1% && (set sub_O365=1) +reg query %kNext% | findstr /i /r ".*volume" %_Nul2% | findstr /i /v "project visio" %_Nul2% | find /i "0x3" %_Nul1% && (set sub_O365=1) +reg query %kNext% | findstr /i /r "project.*" %_Nul2% | find /i "0x2" %_Nul1% && set sub_proj=1 +reg query %kNext% | findstr /i /r "project.*" %_Nul2% | find /i "0x3" %_Nul1% && set sub_proj=1 +reg query %kNext% | findstr /i /r "visio.*" %_Nul2% | find /i "0x2" %_Nul1% && set sub_vis=1 +reg query %kNext% | findstr /i /r "visio.*" %_Nul2% | find /i "0x3" %_Nul1% && set sub_vis=1 +) +set _Retail=0 +wmic path %_spp% where "ApplicationID='%_oApp%' AND LicenseStatus='1' AND PartialProductKey<>NULL" get Description %_Nul2% |findstr /V /R "^$" >"!_temp!\crvRetail.txt" +find /i "RETAIL channel" "!_temp!\crvRetail.txt" %_Nul1% && set _Retail=1 +find /i "RETAIL(MAK) channel" "!_temp!\crvRetail.txt" %_Nul1% && set _Retail=1 +find /i "TIMEBASED_SUB channel" "!_temp!\crvRetail.txt" %_Nul1% && set _Retail=1 +set "_copp=" +if exist "%SysPath%\msvcr100.dll" ( +set _copp=1 +) else if exist "!_InstallRoot!\vfs\System\msvcr100.dll" ( +set _copp="!_InstallRoot!\vfs\System" +) else if exist "!_Install15Root!\vfs\System\msvcr100.dll" ( +set _copp="!_Install15Root!\vfs\System" +) else if exist "%SystemRoot%\SysWOW64\msvcr100.dll" ( +set _copp=1 +set xBit=x86 +) else if exist "!_InstallRoot!\vfs\SystemX86\msvcr100.dll" ( +set _copp="!_InstallRoot!\vfs\SystemX86" +set xBit=x86 +) else if exist "!_Install15Root!\vfs\SystemX86\msvcr100.dll" ( +set _copp="!_Install15Root!\vfs\SystemX86" +set xBit=x86 +) +if not exist "!_work!\bin\cleanospp%xBit%.exe" ( +set "_copp=" +) +if %_Identity% EQU 0 if %_Retail% EQU 0 if %_OMSI% EQU 0 if defined _copp ( +if "!_copp!"=="1" ( +%_Nul3% "!_work!\bin\cleanospp%xBit%.exe" -Licenses +) else ( +pushd %_copp% +%_Nul3% copy /y "!_work!\bin\cleanospp%xBit%.exe" cleanospp.exe +%_Nul3% cleanospp.exe -Licenses +%_Nul3% del /f /q cleanospp.exe +popd + ) +) +set _O16O365=0 +set _C16Msg=0 +set _C15Msg=0 +if %_Retail% EQU 1 wmic path %_spp% where "ApplicationID='%_oApp%' AND LicenseStatus='1' AND PartialProductKey<>NULL" get LicenseFamily %_Nul2% |findstr /V /R "^$" >"!_temp!\crvRetail.txt" +wmic path %_spp% where "ApplicationID='%_oApp%'" get LicenseFamily %_Nul2% |findstr /V /R "^$" >"!_temp!\crvVolume.txt" 2>&1 + +if %_Office16% EQU 0 goto :R15V + +set _O21Ids=ProPlus2021,ProjectPro2021,VisioPro2021,Standard2021,ProjectStd2021,VisioStd2021,Access2021,SkypeforBusiness2021 +set _O19Ids=ProPlus2019,ProjectPro2019,VisioPro2019,Standard2019,ProjectStd2019,VisioStd2019,Access2019,SkypeforBusiness2019 +set _O16Ids=ProjectPro,VisioPro,Standard,ProjectStd,VisioStd,Access,SkypeforBusiness +set _A21Ids=Excel2021,Outlook2021,PowerPoint2021,Publisher2021,Word2021 +set _A19Ids=Excel2019,Outlook2019,PowerPoint2019,Publisher2019,Word2019 +set _A16Ids=Excel,Outlook,PowerPoint,Publisher,Word +set _V21Ids=%_O21Ids%,%_A21Ids% +set _V19Ids=%_O19Ids%,%_A19Ids% +set _V16Ids=Mondo,%_O16Ids%,%_A16Ids%,OneNote +set _R16Ids=%_V16Ids%,Professional,HomeBusiness,HomeStudent,O365ProPlus,O365Business,O365SmallBusPrem,O365HomePrem,O365EduCloud +set _RetIds=%_V21Ids%,Professional2021,HomeBusiness2021,HomeStudent2021,%_V19Ids%,Professional2019,HomeBusiness2019,HomeStudent2019,%_R16Ids% +set _Suites=Mondo,O365ProPlus,O365Business,O365SmallBusPrem,O365HomePrem,O365EduCloud,ProPlus,Standard,Professional,HomeBusiness,HomeStudent,ProPlus2019,Standard2019,Professional2019,HomeBusiness2019,HomeStudent2019,ProPlus2021,Standard2021,Professional2021,HomeBusiness2021,HomeStudent2021 +set _PrjSKU=ProjectPro,ProjectStd,ProjectPro2019,ProjectStd2019,ProjectPro2021,ProjectStd2021 +set _VisSKU=VisioPro,VisioStd,VisioPro2019,VisioStd2019,VisioPro2021,VisioStd2021 + +echo %_ProductIds%>"!_temp!\crvProductIds.txt" +for %%a in (%_RetIds%,ProPlus) do ( +set _%%a=0 +) +for %%a in (%_RetIds%) do ( +findstr /I /C:"%%aRetail" "!_temp!\crvProductIds.txt" %_Nul1% && set _%%a=1 +) +if !_LTSC! EQU 0 for %%a in (%_V21Ids%) do ( +set _%%a=0 +) +if !_LTSC! EQU 1 for %%a in (%_V21Ids%) do ( +findstr /I /C:"%%aVolume" "!_temp!\crvProductIds.txt" %_Nul1% && ( + find /i "Office21%%aVL_KMS_Client" "!_temp!\crvVolume.txt" %_Nul1% && (set _%%a=0) || (set _%%a=1) + ) +) +for %%a in (%_V19Ids%) do ( +findstr /I /C:"%%aVolume" "!_temp!\crvProductIds.txt" %_Nul1% && ( + find /i "Office19%%aVL_KMS_Client" "!_temp!\crvVolume.txt" %_Nul1% && (set _%%a=0) || (set _%%a=1) + ) +) +for %%a in (%_V16Ids%) do ( +findstr /I /C:"%%aVolume" "!_temp!\crvProductIds.txt" %_Nul1% && ( + find /i "Office16%%aVL_KMS_Client" "!_temp!\crvVolume.txt" %_Nul1% && (set _%%a=0) || (set _%%a=1) + ) +) +reg query %_PRIDs%\ProPlusRetail.16 %_Nul3% && ( + find /i "Office16ProPlusVL_KMS_Client" "!_temp!\crvVolume.txt" %_Nul1% && (set _ProPlus=0) || (set _ProPlus=1) +) +reg query %_PRIDs%\ProPlusVolume.16 %_Nul3% && ( + find /i "Office16ProPlusVL_KMS_Client" "!_temp!\crvVolume.txt" %_Nul1% && (set _ProPlus=0) || (set _ProPlus=1) +) +if %_Retail% EQU 1 for %%a in (%_RetIds%) do ( +findstr /I /C:"%%aRetail" "!_temp!\crvProductIds.txt" %_Nul1% && ( + find /i "Office16%%aR_Retail" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office16%%aR_OEM" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office16%%aR_Sub" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office16%%aR_PIN" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office16%%aE5R_" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office16%%aEDUR_" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office16%%aMSDNR_" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office16%%aO365R_" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office16%%aCO365R_" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office16%%aVL_MAK" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office16%%aXC2RVL_MAKC2R" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office19%%aR_Retail" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R19=1) + find /i "Office19%%aR_OEM" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R19=1) + find /i "Office19%%aMSDNR_" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R19=1) + find /i "Office19%%aVL_MAK" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R19=1) + find /i "Office21%%aR_Retail" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R21=1) + find /i "Office21%%aR_OEM" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R21=1) + find /i "Office21%%aMSDNR_" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R21=1) + find /i "Office21%%aVL_MAK" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R21=1) + ) +) +if %_Retail% EQU 1 reg query %_PRIDs%\ProPlusRetail.16 %_Nul3% && ( + find /i "Office16ProPlusR_Retail" "!_temp!\crvRetail.txt" %_Nul1% && (set _ProPlus=0 & set aC2R16=1) + find /i "Office16ProPlusR_OEM" "!_temp!\crvRetail.txt" %_Nul1% && (set _ProPlus=0 & set aC2R16=1) + find /i "Office16ProPlusMSDNR_" "!_temp!\crvRetail.txt" %_Nul1% && (set _ProPlus=0 & set aC2R16=1) + find /i "Office16ProPlusVL_MAK" "!_temp!\crvRetail.txt" %_Nul1% && (set _ProPlus=0 & set aC2R16=1) +) +find /i "Office16MondoVL_KMS_Client" "!_temp!\crvVolume.txt" %_Nul1% && ( +wmic path %spp% where 'ApplicationID="%_oApp%" AND LicenseFamily like "Office16O365%%"' get LicenseFamily /value %_Nul2% | find /i "O365" %_Nul1% && ( + for %%a in (O365ProPlus,O365Business,O365SmallBusPrem,O365HomePrem,O365EduCloud) do set _%%a=0 + ) +) +if %sub_O365% EQU 1 ( + for %%a in (%_Suites%) do set _%%a=0 +rem echo. +rem echo Microsoft 365 product is activated with a subscription. +) +if %sub_proj% EQU 1 ( + for %%a in (%_PrjSKU%) do set _%%a=0 +rem echo. +rem echo Microsoft Project is activated with a subscription. +) +if %sub_vis% EQU 1 ( + for %%a in (%_VisSKU%) do set _%%a=0 +rem echo. +rem echo Microsoft Visio is activated with a subscription. +) + +for %%a in (%_RetIds%,ProPlus) do if !_%%a! EQU 1 ( +set _C16Msg=1 +) +rem if %_C16Msg% EQU 1 ( +rem echo. +rem echo Converting Office C2R Retail-to-Volume: +rem ) +if %_C16Msg% EQU 0 (if %_Office15% EQU 1 (goto :R15V) else (goto :GVLKC2R)) + +if !_Mondo! EQU 1 ( +call :InsLic Mondo +) +if !_O365ProPlus! EQU 1 ( +rem echo O365ProPlus 2016 Suite ^<-^> Mondo 2016 Licenses +call :InsLic O365ProPlus DRNV7-VGMM2-B3G9T-4BF84-VMFTK +if !_Mondo! EQU 0 call :InsLic Mondo +) +if !_O365Business! EQU 1 if !_O365ProPlus! EQU 0 ( +set _O365ProPlus=1 +rem echo O365Business 2016 Suite ^<-^> Mondo 2016 Licenses +call :InsLic O365Business NCHRJ-3VPGW-X73DM-6B36K-3RQ6B +if !_Mondo! EQU 0 call :InsLic Mondo +) +if !_O365SmallBusPrem! EQU 1 if !_O365Business! EQU 0 if !_O365ProPlus! EQU 0 ( +set _O365ProPlus=1 +rem echo O365SmallBusPrem 2016 Suite ^<-^> Mondo 2016 Licenses +call :InsLic O365SmallBusPrem 3FBRX-NFP7C-6JWVK-F2YGK-H499R +if !_Mondo! EQU 0 call :InsLic Mondo +) +if !_O365HomePrem! EQU 1 if !_O365SmallBusPrem! EQU 0 if !_O365Business! EQU 0 if !_O365ProPlus! EQU 0 ( +set _O365ProPlus=1 +rem echo O365HomePrem 2016 Suite ^<-^> Mondo 2016 Licenses +call :InsLic O365HomePrem 9FNY8-PWWTY-8RY4F-GJMTV-KHGM9 +if !_Mondo! EQU 0 call :InsLic Mondo +) +if !_O365EduCloud! EQU 1 if !_O365HomePrem! EQU 0 if !_O365SmallBusPrem! EQU 0 if !_O365Business! EQU 0 if !_O365ProPlus! EQU 0 ( +set _O365ProPlus=1 +rem echo O365EduCloud 2016 Suite ^<-^> Mondo 2016 Licenses +call :InsLic O365EduCloud 8843N-BCXXD-Q84H8-R4Q37-T3CPT +if !_Mondo! EQU 0 call :InsLic Mondo +) +if !_O365ProPlus! EQU 1 set _O16O365=1 +if !_Mondo! EQU 1 if !_O365ProPlus! EQU 0 ( +rem echo Mondo 2016 Suite +call :InsLic O365ProPlus DRNV7-VGMM2-B3G9T-4BF84-VMFTK +if %_Office15% EQU 1 (goto :R15V) else (goto :GVLKC2R) +) +if !_ProPlus2021! EQU 1 if !_O365ProPlus! EQU 0 ( +rem echo ProPlus 2021 Suite +call :InsLic ProPlus2021 +) +if !_ProPlus2019! EQU 1 if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 ( +rem echo ProPlus 2019 Suite -^> ProPlus%_ons% Licenses +call :InsLic ProPlus%_tag% +) +if !_ProPlus! EQU 1 if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 ( +rem echo ProPlus 2016 Suite -^> ProPlus%_ons% Licenses +call :InsLic ProPlus%_tag% +) +if !_Professional2021! EQU 1 if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 ( +rem echo Professional 2021 Suite -^> ProPlus 2021 Licenses +call :InsLic ProPlus2021 +) +if !_Professional2019! EQU 1 if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 ( +rem echo Professional 2019 Suite -^> ProPlus%_ons% Licenses +call :InsLic ProPlus%_tag% +) +if !_Professional! EQU 1 if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 ( +rem echo Professional 2016 Suite -^> ProPlus%_ons% Licenses +call :InsLic ProPlus%_tag% +) +if !_Standard2021! EQU 1 if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 ( +rem echo Standard 2021 Suite +call :InsLic Standard2021 +) +if !_Standard2019! EQU 1 if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 if !_Standard2021! EQU 0 ( +rem echo Standard 2019 Suite -^> Standard%_ons% Licenses +call :InsLic Standard%_tag% +) +if !_Standard! EQU 1 if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 if !_Standard2021! EQU 0 if !_Standard2019! EQU 0 ( +rem echo Standard 2016 Suite -^> Standard%_ons% Licenses +call :InsLic Standard%_tag% +) +for %%a in (ProjectPro,VisioPro,ProjectStd,VisioStd) do if !_%%a2021! EQU 1 ( + rem echo %%a 2021 SKU + call :InsLic %%a2021 +) +for %%a in (ProjectPro,VisioPro,ProjectStd,VisioStd) do if !_%%a2019! EQU 1 ( +if !_%%a2021! EQU 0 ( + rem echo %%a 2019 SKU -^> %%a%_ons% Licenses + call :InsLic %%a%_tag% + ) +) +for %%a in (ProjectPro,VisioPro,ProjectStd,VisioStd) do if !_%%a! EQU 1 ( +if !_%%a2021! EQU 0 if !_%%a2019! EQU 0 ( + rem echo %%a 2016 SKU -^> %%a%_ons% Licenses + call :InsLic %%a%_tag% + ) +) +for %%a in (HomeBusiness,HomeStudent) do if !_%%a2021! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 if !_Standard2021! EQU 0 if !_Standard2019! EQU 0 if !_Standard! EQU 0 ( + set _Standard2021=1 + rem echo %%a 2021 Suite -^> Standard 2021 Licenses + call :InsLic Standard2021 + ) +) +for %%a in (HomeBusiness,HomeStudent) do if !_%%a2019! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 if !_Standard2021! EQU 0 if !_Standard2019! EQU 0 if !_Standard! EQU 0 if !_%%a2021! EQU 0 ( + set _Standard2019=1 + rem echo %%a 2019 Suite -^> Standard%_ons% Licenses + call :InsLic Standard%_tag% + ) +) +for %%a in (HomeBusiness,HomeStudent) do if !_%%a! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 if !_Standard2021! EQU 0 if !_Standard2019! EQU 0 if !_Standard! EQU 0 if !_%%a2021! EQU 0 if !_%%a2019! EQU 0 ( + set _Standard=1 + rem echo %%a 2016 Suite -^> Standard%_ons% Licenses + call :InsLic Standard%_tag% + ) +) +for %%a in (%_A21Ids%,OneNote) do if !_%%a! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 if !_Standard2021! EQU 0 if !_Standard2019! EQU 0 if !_Standard! EQU 0 ( + rem echo %%a App + call :InsLic %%a + ) +) +for %%a in (%_A16Ids%) do if !_%%a2019! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 if !_Standard2021! EQU 0 if !_Standard2019! EQU 0 if !_Standard! EQU 0 if !_%%a2021! EQU 0 ( + rem echo %%a 2019 App -^> %%a%_ons% Licenses + call :InsLic %%a%_tag% + ) +) +for %%a in (%_A16Ids%) do if !_%%a! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 if !_Standard2021! EQU 0 if !_Standard2019! EQU 0 if !_Standard! EQU 0 if !_%%a2021! EQU 0 if !_%%a2019! EQU 0 ( + rem echo %%a 2016 App -^> %%a%_ons% Licenses + call :InsLic %%a%_tag% + ) +) +for %%a in (Access) do if !_%%a2021! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 ( + rem echo %%a 2021 App + call :InsLic %%a2021 + ) +) +for %%a in (Access) do if !_%%a2019! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 if !_%%a2021! EQU 0 ( + rem echo %%a 2019 App -^> %%a%_ons% Licenses + call :InsLic %%a%_tag% + ) +) +for %%a in (Access) do if !_%%a! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 if !_%%a2021! EQU 0 if !_%%a2019! EQU 0 ( + rem echo %%a 2016 App -^> %%a%_ons% Licenses + call :InsLic %%a%_tag% + ) +) +for %%a in (SkypeforBusiness) do if !_%%a2021! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 ( + rem echo %%a 2021 App + call :InsLic %%a2021 + ) +) +for %%a in (SkypeforBusiness) do if !_%%a2019! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_%%a2021! EQU 0 ( + rem echo %%a 2019 App -^> %%a%_ons% Licenses + call :InsLic %%a%_tag% + ) +) +for %%a in (SkypeforBusiness) do if !_%%a! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_%%a2021! EQU 0 if !_%%a2019! EQU 0 ( + rem echo %%a 2016 App -^> %%a%_ons% Licenses + call :InsLic %%a%_tag% + ) +) +if %_Office15% EQU 1 (goto :R15V) else (goto :GVLKC2R) + +:R15V +for %%# in ("!_Licenses15Path!\client-issuance-*.xrm-ms") do ( +%_cscript% %_vbsi%"!_Licenses15Path!\%%~nx#" +) +%_cscript% %_vbsi%"!_Licenses15Path!\pkeyconfig-office.xrm-ms" + +set _O15Ids=Standard,ProjectPro,VisioPro,ProjectStd,VisioStd,Access,Lync +set _A15Ids=Excel,Groove,InfoPath,OneNote,Outlook,PowerPoint,Publisher,Word +set _R15Ids=SPD,Mondo,%_O15Ids%,%_A15Ids%,Professional,HomeBusiness,HomeStudent,O365ProPlus,O365Business,O365SmallBusPrem,O365HomePrem +set _V15Ids=Mondo,%_O15Ids%,%_A15Ids% + +echo %_Product15Ids%>"!_temp!\crvProduct15s.txt" +for %%a in (%_R15Ids%,ProPlus) do ( +set _%%a=0 +) +for %%a in (%_R15Ids%) do ( +findstr /I /C:"%%aRetail" "!_temp!\crvProduct15s.txt" %_Nul1% && set _%%a=1 +) +for %%a in (%_V15Ids%) do ( +findstr /I /C:"%%aVolume" "!_temp!\crvProduct15s.txt" %_Nul1% && ( + find /i "Office%%aVL_KMS_Client" "!_temp!\crvVolume.txt" %_Nul1% && (set _%%a=0) || (set _%%a=1) + ) +) +reg query %_PR15IDs%\Active\ProPlusRetail\x-none %_Nul3% && ( + find /i "OfficeProPlusVL_KMS_Client" "!_temp!\crvVolume.txt" %_Nul1% && (set _ProPlus=0) || (set _ProPlus=1) +) +reg query %_PR15IDs%\Active\ProPlusVolume\x-none %_Nul3% && ( + find /i "OfficeProPlusVL_KMS_Client" "!_temp!\crvVolume.txt" %_Nul1% && (set _ProPlus=0) || (set _ProPlus=1) +) +if %_Retail% EQU 1 for %%a in (%_R15Ids%) do ( +findstr /I /C:"%%aRetail" "!_temp!\crvProduct15s.txt" %_Nul1% && ( + find /i "Office%%aR_Retail" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R15=1) + find /i "Office%%aR_OEM" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R15=1) + find /i "Office%%aR_Sub" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R15=1) + find /i "Office%%aR_PIN" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R15=1) + find /i "Office%%aMSDNR_" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R15=1) + find /i "Office%%aO365R_" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R15=1) + find /i "Office%%aCO365R_" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R15=1) + find /i "Office%%aVL_MAK" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R15=1) + ) +) +if %_Retail% EQU 1 reg query %_PR15IDs%\Active\ProPlusRetail\x-none %_Nul3% && ( + find /i "OfficeProPlusR_Retail" "!_temp!\crvRetail.txt" %_Nul1% && (set _ProPlus=0 & set aC2R15=1) + find /i "OfficeProPlusR_OEM" "!_temp!\crvRetail.txt" %_Nul1% && (set _ProPlus=0 & set aC2R15=1) + find /i "OfficeProPlusMSDNR_" "!_temp!\crvRetail.txt" %_Nul1% && (set _ProPlus=0 & set aC2R15=1) + find /i "OfficeProPlusVL_MAK" "!_temp!\crvRetail.txt" %_Nul1% && (set _ProPlus=0 & set aC2R15=1) +) +find /i "OfficeMondoVL_KMS_Client" "!_temp!\crvVolume.txt" %_Nul1% && ( +wmic path %spp% where 'ApplicationID="%_oApp%" AND LicenseFamily like "OfficeO365%%"' get LicenseFamily /value %_Nul2% | find /i "O365" %_Nul1% && ( + for %%a in (O365ProPlus,O365Business,O365SmallBusPrem,O365HomePrem) do set _%%a=0 + ) +) + +for %%a in (%_R15Ids%,ProPlus) do if !_%%a! EQU 1 ( +set _C15Msg=1 +) +rem if %_C15Msg% EQU 1 if %_C16Msg% EQU 0 ( +rem echo. +rem echo Converting Office C2R Retail-to-Volume: +rem ) +if %_C15Msg% EQU 0 goto :GVLKC2R + +if !_Mondo! EQU 1 ( +call :Ins15Lic Mondo +) +if !_O365ProPlus! EQU 1 if !_O16O365! EQU 0 ( +rem echo O365ProPlus 2013 Suite ^<-^> Mondo 2013 Licenses +call :Ins15Lic O365ProPlus DRNV7-VGMM2-B3G9T-4BF84-VMFTK +if !_Mondo! EQU 0 call :Ins15Lic Mondo +) +if !_O365SmallBusPrem! EQU 1 if !_O365ProPlus! EQU 0 if !_O16O365! EQU 0 ( +set _O365ProPlus=1 +rem echo O365SmallBusPrem 2013 Suite ^<-^> Mondo 2013 Licenses +call :Ins15Lic O365SmallBusPrem 3FBRX-NFP7C-6JWVK-F2YGK-H499R +if !_Mondo! EQU 0 call :Ins15Lic Mondo +) +if !_O365HomePrem! EQU 1 if !_O365SmallBusPrem! EQU 0 if !_O365ProPlus! EQU 0 if !_O16O365! EQU 0 ( +set _O365ProPlus=1 +rem echo O365HomePrem 2013 Suite ^<-^> Mondo 2013 Licenses +call :Ins15Lic O365HomePrem 9FNY8-PWWTY-8RY4F-GJMTV-KHGM9 +if !_Mondo! EQU 0 call :Ins15Lic Mondo +) +if !_O365Business! EQU 1 if !_O365HomePrem! EQU 0 if !_O365SmallBusPrem! EQU 0 if !_O365ProPlus! EQU 0 if !_O16O365! EQU 0 ( +set _O365ProPlus=1 +rem echo O365Business 2013 Suite ^<-^> Mondo 2013 Licenses +call :Ins15Lic O365Business MCPBN-CPY7X-3PK9R-P6GTT-H8P8Y +if !_Mondo! EQU 0 call :Ins15Lic Mondo +) +if !_Mondo! EQU 1 if !_O365ProPlus! EQU 0 if !_O16O365! EQU 0 ( +rem echo Mondo 2013 Suite +call :Ins15Lic O365ProPlus DRNV7-VGMM2-B3G9T-4BF84-VMFTK +goto :GVLKC2R +) +if !_SPD! EQU 1 if !_Mondo! EQU 0 if !_O365ProPlus! EQU 0 ( +rem echo SharePoint Designer 2013 App -^> Mondo 2013 Licenses +call :Ins15Lic Mondo +goto :GVLKC2R +) +if !_ProPlus! EQU 1 if !_O365ProPlus! EQU 0 ( +rem echo ProPlus 2013 Suite +call :Ins15Lic ProPlus +) +if !_Professional! EQU 1 if !_O365ProPlus! EQU 0 if !_ProPlus! EQU 0 ( +rem echo Professional 2013 Suite -^> ProPlus 2013 Licenses +call :Ins15Lic ProPlus +) +if !_Standard! EQU 1 if !_O365ProPlus! EQU 0 if !_ProPlus! EQU 0 if !_Professional! EQU 0 ( +rem echo Standard 2013 Suite +call :Ins15Lic Standard +) +for %%a in (ProjectPro,VisioPro,ProjectStd,VisioStd) do if !_%%a! EQU 1 ( +rem echo %%a 2013 SKU +call :Ins15Lic %%a +) +for %%a in (HomeBusiness,HomeStudent) do if !_%%a! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus! EQU 0 if !_Professional! EQU 0 if !_Standard! EQU 0 ( + set _Standard=1 + rem echo %%a 2013 Suite -^> Standard 2013 Licenses + call :Ins15Lic Standard + ) +) +for %%a in (%_A15Ids%) do if !_%%a! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus! EQU 0 if !_Professional! EQU 0 if !_Standard! EQU 0 ( + rem echo %%a 2013 App + call :Ins15Lic %%a + ) +) +for %%a in (Access) do if !_%%a! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus! EQU 0 if !_Professional! EQU 0 ( + rem echo %%a 2013 App + call :Ins15Lic %%a + ) +) +for %%a in (Lync) do if !_%%a! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus! EQU 0 ( + rem echo SkypeforBusiness 2015 App + call :Ins15Lic %%a + ) +) +goto :GVLKC2R + +:InsLic +set "_ID=%1Volume" +set "_pkey=" +if not "%2"=="" ( +set "_ID=%1Retail" +set "_pkey=PidKey=%2" +) +reg delete %_Config% /f /v %_ID%.OSPPReady %_Nul3% +"!_Integrator!" /I /License PRIDName=%_ID%.16 %_pkey% PackageGUID="%_GUID%" PackageRoot="!_InstallRoot!" %_Nul1% +reg add %_Config% /f /v %_ID%.OSPPReady /t REG_SZ /d 1 %_Nul1% +reg query %_Config% /v ProductReleaseIds | findstr /I "%_ID%" %_Nul1% +if %errorlevel% NEQ 0 ( +for /f "skip=2 tokens=2*" %%a in ('reg query %_Config% /v ProductReleaseIds') do reg add %_Config% /v ProductReleaseIds /t REG_SZ /d "%%b,%_ID%" /f %_Nul1% +) +exit /b + +:Ins15Lic +set "_ID=%1Volume" +set "_patt=%1VL_" +set "_pkey=" +if not "%2"=="" ( +set "_ID=%1Retail" +set "_patt=%1R_" +set "_pkey=%2" +) +reg delete %_OSPP15Ready% /f /v %_ID%.OSPPReady %_Nul3% +for %%# in ("!_Licenses15Path!\%_patt%*.xrm-ms") do ( +%_cscript% %_vbsi%"!_Licenses15Path!\%%~nx#" +) +if defined _pkey wmic path %_sps% where version='%_wmi%' call InstallProductKey ProductKey="%_pkey%" %_Nul3% +reg add %_OSPP15Ready% /f /v %_ID%.OSPPReady /t %_OSPP15ReadT% /d 1 %_Nul1% +reg query %_Con15fig% %_Nul2% | findstr /I "%_ID%" %_Nul1% +if %errorlevel% NEQ 0 ( +for /f "skip=2 tokens=2*" %%a in ('reg query %_Con15fig% %_Nul6%') do reg add %_Con15fig% /t REG_SZ /d "%%b,%_ID%" /f %_Nul1% ) -if %sps% EQU SoftwareLicensingService wmic path %sps% where version='%ver%' call RefreshLicenseStatus %_Nul3% exit /b +:GVLKC2R +if %_Office16% EQU 1 ( +for %%a in (%_RetIds%,ProPlus) do set "_%%a=" +) +if %_Office15% EQU 1 ( +for %%a in (%_R15Ids%,ProPlus) do set "_%%a=" +) +if %winbuild% GEQ 9200 wmic path %_sps% where version='%_wmi%' call RefreshLicenseStatus %_Nul3% +if exist "%SysPath%\spp\store_test\2.0\tokens.dat" if defined _copp ( +%_cscript% %_SLMGR% /rilc +) +goto :%_sC2R% + :keys if "%~1"=="" exit /b -goto :%1 %_Nul2% || exit /b +goto :%1 %_Nul2% + +:: Windows 11 [Co] +:ca7df2e3-5ea0-47b8-9ac1-b1be4d8edd69 +set "_key=37D7F-N49CB-WQR8W-TBJ73-FM8RX" &:: SE {Cloud} +exit /b + +:d30136fc-cb4b-416e-a23d-87207abc44a9 +set "_key=6XN7V-PCBDC-BDBRH-8DQY7-G6R44" &:: SE N {Cloud N} +exit /b :: Windows 10 [RS5] :32d2fab3-e4a8-42c2-923b-4bf4fd13e6ee -set "key=M7XTQ-FN8P6-TTKYV-9D4CC-J462D" &:: Enterprise LTSC 2019 +set "_key=M7XTQ-FN8P6-TTKYV-9D4CC-J462D" &:: Enterprise LTSC 2019 exit /b :7103a333-b8c8-49cc-93ce-d37c09687f92 -set "key=92NFX-8DJQP-P6BBQ-THF9C-7CG2H" &:: Enterprise LTSC 2019 N +set "_key=92NFX-8DJQP-P6BBQ-THF9C-7CG2H" &:: Enterprise LTSC 2019 N exit /b :ec868e65-fadf-4759-b23e-93fe37f2cc29 -set "key=CPWHC-NT2C7-VYW78-DHDB2-PG3GK" &:: Enterprise for Virtual Desktops +set "_key=CPWHC-NT2C7-VYW78-DHDB2-PG3GK" &:: Enterprise for Virtual Desktops exit /b :0df4f814-3f57-4b8b-9a9d-fddadcd69fac -set "key=NBTWJ-3DR69-3C4V8-C26MC-GQ9M6" &:: Lean +set "_key=NBTWJ-3DR69-3C4V8-C26MC-GQ9M6" &:: Lean exit /b :: Windows 10 [RS3] :82bbc092-bc50-4e16-8e18-b74fc486aec3 -set "key=NRG8B-VKK3Q-CXVCJ-9G2XF-6Q84J" &:: Pro Workstation +set "_key=NRG8B-VKK3Q-CXVCJ-9G2XF-6Q84J" &:: Pro Workstation exit /b :4b1571d3-bafb-4b40-8087-a961be2caf65 -set "key=9FNHH-K3HBT-3W4TD-6383H-6XYWF" &:: Pro Workstation N +set "_key=9FNHH-K3HBT-3W4TD-6383H-6XYWF" &:: Pro Workstation N exit /b :e4db50ea-bda1-4566-b047-0ca50abc6f07 -set "key=7NBT4-WGBQX-MP4H7-QXFF8-YP3KX" &:: Enterprise Remote Server +set "_key=7NBT4-WGBQX-MP4H7-QXFF8-YP3KX" &:: Enterprise Remote Server exit /b :: Windows 10 [RS2] :e0b2d383-d112-413f-8a80-97f373a5820c -set "key=YYVX9-NTFWV-6MDM3-9PT4T-4M68B" &:: Enterprise G +set "_key=YYVX9-NTFWV-6MDM3-9PT4T-4M68B" &:: Enterprise G exit /b :e38454fb-41a4-4f59-a5dc-25080e354730 -set "key=44RPN-FTY23-9VTTB-MP9BX-T84FV" &:: Enterprise G N +set "_key=44RPN-FTY23-9VTTB-MP9BX-T84FV" &:: Enterprise G N exit /b :: Windows 10 [RS1] :2d5a5a60-3040-48bf-beb0-fcd770c20ce0 -set "key=DCPHK-NFMTC-H88MJ-PFHPY-QJ4BJ" &:: Enterprise 2016 LTSB +set "_key=DCPHK-NFMTC-H88MJ-PFHPY-QJ4BJ" &:: Enterprise 2016 LTSB exit /b :9f776d83-7156-45b2-8a5c-359b9c9f22a3 -set "key=QFFDN-GRT3P-VKWWX-X7T3R-8B639" &:: Enterprise 2016 LTSB N +set "_key=QFFDN-GRT3P-VKWWX-X7T3R-8B639" &:: Enterprise 2016 LTSB N exit /b :3f1afc82-f8ac-4f6c-8005-1d233e606eee -set "key=6TP4R-GNPTD-KYYHQ-7B7DP-J447Y" &:: Pro Education +set "_key=6TP4R-GNPTD-KYYHQ-7B7DP-J447Y" &:: Pro Education exit /b :5300b18c-2e33-4dc2-8291-47ffcec746dd -set "key=YVWGF-BXNMC-HTQYQ-CPQ99-66QFC" &:: Pro Education N +set "_key=YVWGF-BXNMC-HTQYQ-CPQ99-66QFC" &:: Pro Education N exit /b :: Windows 10 [TH] :58e97c99-f377-4ef1-81d5-4ad5522b5fd8 -set "key=TX9XD-98N7V-6WMQ6-BX7FG-H8Q99" &:: Home +set "_key=TX9XD-98N7V-6WMQ6-BX7FG-H8Q99" &:: Home exit /b :7b9e1751-a8da-4f75-9560-5fadfe3d8e38 -set "key=3KHY7-WNT83-DGQKR-F7HPR-844BM" &:: Home N +set "_key=3KHY7-WNT83-DGQKR-F7HPR-844BM" &:: Home N exit /b :cd918a57-a41b-4c82-8dce-1a538e221a83 -set "key=7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH" &:: Home Single Language +set "_key=7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH" &:: Home Single Language exit /b :a9107544-f4a0-4053-a96a-1479abdef912 -set "key=PVMJN-6DFY6-9CCP6-7BKTT-D3WVR" &:: Home China +set "_key=PVMJN-6DFY6-9CCP6-7BKTT-D3WVR" &:: Home China exit /b :2de67392-b7a7-462a-b1ca-108dd189f588 -set "key=W269N-WFGWX-YVC9B-4J6C9-T83GX" &:: Pro +set "_key=W269N-WFGWX-YVC9B-4J6C9-T83GX" &:: Pro exit /b :a80b5abf-76ad-428b-b05d-a47d2dffeebf -set "key=MH37W-N47XK-V7XM9-C7227-GCQG9" &:: Pro N +set "_key=MH37W-N47XK-V7XM9-C7227-GCQG9" &:: Pro N exit /b :e0c42288-980c-4788-a014-c080d2e1926e -set "key=NW6C2-QMPVW-D7KKK-3GKT6-VCFB2" &:: Education +set "_key=NW6C2-QMPVW-D7KKK-3GKT6-VCFB2" &:: Education exit /b :3c102355-d027-42c6-ad23-2e7ef8a02585 -set "key=2WH4N-8QGBV-H22JP-CT43Q-MDWWJ" &:: Education N +set "_key=2WH4N-8QGBV-H22JP-CT43Q-MDWWJ" &:: Education N exit /b :73111121-5638-40f6-bc11-f1d7b0d64300 -set "key=NPPR9-FWDCX-D2C8J-H872K-2YT43" &:: Enterprise +set "_key=NPPR9-FWDCX-D2C8J-H872K-2YT43" &:: Enterprise exit /b :e272e3e2-732f-4c65-a8f0-484747d0d947 -set "key=DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4" &:: Enterprise N +set "_key=DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4" &:: Enterprise N exit /b :7b51a46c-0c04-4e8f-9af4-8496cca90d5e -set "key=WNMTR-4C88C-JK8YV-HQ7T2-76DF9" &:: Enterprise 2015 LTSB +set "_key=WNMTR-4C88C-JK8YV-HQ7T2-76DF9" &:: Enterprise 2015 LTSB exit /b :87b838b7-41b6-4590-8318-5797951d8529 -set "key=2F77B-TNFGY-69QQF-B8YKP-D69TJ" &:: Enterprise 2015 LTSB N +set "_key=2F77B-TNFGY-69QQF-B8YKP-D69TJ" &:: Enterprise 2015 LTSB N +exit /b + +:: Windows Server 2022 [Fe] +:9bd77860-9b31-4b7b-96ad-2564017315bf +set "_key=VDYBN-27WPP-V4HQT-9VMD4-VMK7H" &:: Standard +exit /b + +:ef6cfc9f-8c5d-44ac-9aad-de6a2ea0ae03 +set "_key=WX4NM-KYWYW-QJJR4-XV3QB-6VM33" &:: Datacenter +exit /b + +:8c8f0ad3-9a43-4e05-b840-93b8d1475cbc +set "_key=6N379-GGTMK-23C6M-XVVTC-CKFRQ" &:: Azure Core +exit /b + +:f5e9429c-f50b-4b98-b15c-ef92eb5cff39 +set "_key=67KN8-4FYJW-2487Q-MQ2J7-4C4RG" &:: Standard ACor +exit /b + +:39e69c41-42b4-4a0a-abad-8e3c10a797cc +set "_key=QFND9-D3Y9C-J3KKY-6RPVP-2DPYV" &:: Datacenter ACor exit /b :: Windows Server 2019 [RS5] :de32eafd-aaee-4662-9444-c1befb41bde2 -set "key=N69G4-B89J2-4G8F4-WWYCC-J464C" &:: Standard +set "_key=N69G4-B89J2-4G8F4-WWYCC-J464C" &:: Standard exit /b :34e1ae55-27f8-4950-8877-7a03be5fb181 -set "key=WMDGN-G9PQG-XVVXX-R3X43-63DFG" &:: Datacenter +set "_key=WMDGN-G9PQG-XVVXX-R3X43-63DFG" &:: Datacenter exit /b :034d3cbb-5d4b-4245-b3f8-f84571314078 -set "key=WVDHN-86M7X-466P6-VHXV7-YY726" &:: Essentials +set "_key=WVDHN-86M7X-466P6-VHXV7-YY726" &:: Essentials exit /b :a99cc1f0-7719-4306-9645-294102fbff95 -set "key=FDNH6-VW9RW-BXPJ7-4XTYG-239TB" &:: Azure Core +set "_key=FDNH6-VW9RW-BXPJ7-4XTYG-239TB" &:: Azure Core exit /b :73e3957c-fc0c-400d-9184-5f7b6f2eb409 -set "key=N2KJX-J94YW-TQVFB-DG9YT-724CC" &:: Standard ACor +set "_key=N2KJX-J94YW-TQVFB-DG9YT-724CC" &:: Standard ACor exit /b :90c362e5-0da1-4bfd-b53b-b87d309ade43 -set "key=6NMRW-2C8FM-D24W7-TQWMY-CWH2D" &:: Datacenter ACor +set "_key=6NMRW-2C8FM-D24W7-TQWMY-CWH2D" &:: Datacenter ACor exit /b :8de8eb62-bbe0-40ac-ac17-f75595071ea3 -set "key=GRFBW-QNDC4-6QBHG-CCK3B-2PR88" &:: ServerARM64 +set "_key=GRFBW-QNDC4-6QBHG-CCK3B-2PR88" &:: ServerARM64 +exit /b + +:19b5e0fb-4431-46bc-bac1-2f1873e4ae73 +set "_key=NTBV8-9K7Q8-V27C6-M2BTV-KHMXV" &:: Azure Datacenter - ServerTurbine exit /b :: Windows Server 2016 [RS4] :43d9af6e-5e86-4be8-a797-d072a046896c -set "key=K9FYF-G6NCK-73M32-XMVPY-F9DRR" &:: ServerARM64 +set "_key=K9FYF-G6NCK-73M32-XMVPY-F9DRR" &:: ServerARM64 exit /b :: Windows Server 2016 [RS3] :61c5ef22-f14f-4553-a824-c4b31e84b100 -set "key=PTXN8-JFHJM-4WC78-MPCBR-9W4KR" &:: Standard ACor +set "_key=PTXN8-JFHJM-4WC78-MPCBR-9W4KR" &:: Standard ACor exit /b :e49c08e7-da82-42f8-bde2-b570fbcae76c -set "key=2HXDN-KRXHB-GPYC7-YCKFJ-7FVDG" &:: Datacenter ACor +set "_key=2HXDN-KRXHB-GPYC7-YCKFJ-7FVDG" &:: Datacenter ACor exit /b :: Windows Server 2016 [RS1] :8c1c5410-9f39-4805-8c9d-63a07706358f -set "key=WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY" &:: Standard +set "_key=WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY" &:: Standard exit /b :21c56779-b449-4d20-adfc-eece0e1ad74b -set "key=CB7KF-BWN84-R7R2Y-793K2-8XDDG" &:: Datacenter +set "_key=CB7KF-BWN84-R7R2Y-793K2-8XDDG" &:: Datacenter exit /b :2b5a1b0f-a5ab-4c54-ac2f-a6d94824a283 -set "key=JCKRF-N37P4-C2D82-9YXRT-4M63B" &:: Essentials +set "_key=JCKRF-N37P4-C2D82-9YXRT-4M63B" &:: Essentials exit /b :7b4433f4-b1e7-4788-895a-c45378d38253 -set "key=QN4C6-GBJD2-FB422-GHWJK-GJG2R" &:: Cloud Storage +set "_key=QN4C6-GBJD2-FB422-GHWJK-GJG2R" &:: Cloud Storage exit /b :3dbf341b-5f6c-4fa7-b936-699dce9e263f -set "key=VP34G-4NPPG-79JTQ-864T4-R3MQX" &:: Azure Core +set "_key=VP34G-4NPPG-79JTQ-864T4-R3MQX" &:: Azure Core exit /b :: Windows 8.1 :fe1c3238-432a-43a1-8e25-97e7d1ef10f3 -set "key=M9Q9P-WNJJT-6PXPY-DWX8H-6XWKK" &:: Core +set "_key=M9Q9P-WNJJT-6PXPY-DWX8H-6XWKK" &:: Core exit /b :78558a64-dc19-43fe-a0d0-8075b2a370a3 -set "key=7B9N3-D94CG-YTVHR-QBPX3-RJP64" &:: Core N +set "_key=7B9N3-D94CG-YTVHR-QBPX3-RJP64" &:: Core N exit /b :c72c6a1d-f252-4e7e-bdd1-3fca342acb35 -set "key=BB6NG-PQ82V-VRDPW-8XVD2-V8P66" &:: Core Single Language +set "_key=BB6NG-PQ82V-VRDPW-8XVD2-V8P66" &:: Core Single Language exit /b :db78b74f-ef1c-4892-abfe-1e66b8231df6 -set "key=NCTT7-2RGK8-WMHRF-RY7YQ-JTXG3" &:: Core China +set "_key=NCTT7-2RGK8-WMHRF-RY7YQ-JTXG3" &:: Core China exit /b :ffee456a-cd87-4390-8e07-16146c672fd0 -set "key=XYTND-K6QKT-K2MRH-66RTM-43JKP" &:: Core ARM +set "_key=XYTND-K6QKT-K2MRH-66RTM-43JKP" &:: Core ARM exit /b :c06b6981-d7fd-4a35-b7b4-054742b7af67 -set "key=GCRJD-8NW9H-F2CDX-CCM8D-9D6T9" &:: Pro +set "_key=GCRJD-8NW9H-F2CDX-CCM8D-9D6T9" &:: Pro exit /b :7476d79f-8e48-49b4-ab63-4d0b813a16e4 -set "key=HMCNV-VVBFX-7HMBH-CTY9B-B4FXY" &:: Pro N +set "_key=HMCNV-VVBFX-7HMBH-CTY9B-B4FXY" &:: Pro N exit /b :096ce63d-4fac-48a9-82a9-61ae9e800e5f -set "key=789NJ-TQK6T-6XTH8-J39CJ-J8D3P" &:: Pro with Media Center +set "_key=789NJ-TQK6T-6XTH8-J39CJ-J8D3P" &:: Pro with Media Center exit /b :81671aaf-79d1-4eb1-b004-8cbbe173afea -set "key=MHF9N-XY6XB-WVXMC-BTDCT-MKKG7" &:: Enterprise +set "_key=MHF9N-XY6XB-WVXMC-BTDCT-MKKG7" &:: Enterprise exit /b :113e705c-fa49-48a4-beea-7dd879b46b14 -set "key=TT4HM-HN7YT-62K67-RGRQJ-JFFXW" &:: Enterprise N +set "_key=TT4HM-HN7YT-62K67-RGRQJ-JFFXW" &:: Enterprise N exit /b :0ab82d54-47f4-4acb-818c-cc5bf0ecb649 -set "key=NMMPB-38DD4-R2823-62W8D-VXKJB" &:: Embedded Industry Pro +set "_key=NMMPB-38DD4-R2823-62W8D-VXKJB" &:: Embedded Industry Pro exit /b :cd4e2d9f-5059-4a50-a92d-05d5bb1267c7 -set "key=FNFKF-PWTVT-9RC8H-32HB2-JB34X" &:: Embedded Industry Enterprise +set "_key=FNFKF-PWTVT-9RC8H-32HB2-JB34X" &:: Embedded Industry Enterprise exit /b :f7e88590-dfc7-4c78-bccb-6f3865b99d1a -set "key=VHXM3-NR6FT-RY6RT-CK882-KW2CJ" &:: Embedded Industry Automotive +set "_key=VHXM3-NR6FT-RY6RT-CK882-KW2CJ" &:: Embedded Industry Automotive exit /b :e9942b32-2e55-4197-b0bd-5ff58cba8860 -set "key=3PY8R-QHNP9-W7XQD-G6DPH-3J2C9" &:: with Bing +set "_key=3PY8R-QHNP9-W7XQD-G6DPH-3J2C9" &:: with Bing exit /b :c6ddecd6-2354-4c19-909b-306a3058484e -set "key=Q6HTR-N24GM-PMJFP-69CD8-2GXKR" &:: with Bing N +set "_key=Q6HTR-N24GM-PMJFP-69CD8-2GXKR" &:: with Bing N exit /b :b8f5e3a3-ed33-4608-81e1-37d6c9dcfd9c -set "key=KF37N-VDV38-GRRTV-XH8X6-6F3BB" &:: with Bing Single Language +set "_key=KF37N-VDV38-GRRTV-XH8X6-6F3BB" &:: with Bing Single Language exit /b :ba998212-460a-44db-bfb5-71bf09d1c68b -set "key=R962J-37N87-9VVK2-WJ74P-XTMHR" &:: with Bing China +set "_key=R962J-37N87-9VVK2-WJ74P-XTMHR" &:: with Bing China exit /b :e58d87b5-8126-4580-80fb-861b22f79296 -set "key=MX3RK-9HNGX-K3QKC-6PJ3F-W8D7B" &:: Pro for Students +set "_key=MX3RK-9HNGX-K3QKC-6PJ3F-W8D7B" &:: Pro for Students exit /b :cab491c7-a918-4f60-b502-dab75e334f40 -set "key=TNFGH-2R6PB-8XM3K-QYHX2-J4296" &:: Pro for Students N +set "_key=TNFGH-2R6PB-8XM3K-QYHX2-J4296" &:: Pro for Students N exit /b :: Windows Server 2012 R2 :b3ca044e-a358-4d68-9883-aaa2941aca99 -set "key=D2N9P-3P6X9-2R39C-7RTCD-MDVJX" &:: Standard +set "_key=D2N9P-3P6X9-2R39C-7RTCD-MDVJX" &:: Standard exit /b :00091344-1ea4-4f37-b789-01750ba6988c -set "key=W3GGN-FT8W3-Y4M27-J84CP-Q3VJ9" &:: Datacenter +set "_key=W3GGN-FT8W3-Y4M27-J84CP-Q3VJ9" &:: Datacenter exit /b :21db6ba4-9a7b-4a14-9e29-64a60c59301d -set "key=KNC87-3J2TX-XB4WP-VCPJV-M4FWM" &:: Essentials +set "_key=KNC87-3J2TX-XB4WP-VCPJV-M4FWM" &:: Essentials exit /b :b743a2be-68d4-4dd3-af32-92425b7bb623 -set "key=3NPTF-33KPT-GGBPR-YX76B-39KDD" &:: Cloud Storage +set "_key=3NPTF-33KPT-GGBPR-YX76B-39KDD" &:: Cloud Storage exit /b :: Windows 8 :c04ed6bf-55c8-4b47-9f8e-5a1f31ceee60 -set "key=BN3D2-R7TKB-3YPBD-8DRP2-27GG4" &:: Core +set "_key=BN3D2-R7TKB-3YPBD-8DRP2-27GG4" &:: Core exit /b :197390a0-65f6-4a95-bdc4-55d58a3b0253 -set "key=8N2M2-HWPGY-7PGT9-HGDD8-GVGGY" &:: Core N +set "_key=8N2M2-HWPGY-7PGT9-HGDD8-GVGGY" &:: Core N exit /b :8860fcd4-a77b-4a20-9045-a150ff11d609 -set "key=2WN2H-YGCQR-KFX6K-CD6TF-84YXQ" &:: Core Single Language +set "_key=2WN2H-YGCQR-KFX6K-CD6TF-84YXQ" &:: Core Single Language exit /b :9d5584a2-2d85-419a-982c-a00888bb9ddf -set "key=4K36P-JN4VD-GDC6V-KDT89-DYFKP" &:: Core China +set "_key=4K36P-JN4VD-GDC6V-KDT89-DYFKP" &:: Core China exit /b :af35d7b7-5035-4b63-8972-f0b747b9f4dc -set "key=DXHJF-N9KQX-MFPVR-GHGQK-Y7RKV" &:: Core ARM +set "_key=DXHJF-N9KQX-MFPVR-GHGQK-Y7RKV" &:: Core ARM exit /b :a98bcd6d-5343-4603-8afe-5908e4611112 -set "key=NG4HW-VH26C-733KW-K6F98-J8CK4" &:: Pro +set "_key=NG4HW-VH26C-733KW-K6F98-J8CK4" &:: Pro exit /b :ebf245c1-29a8-4daf-9cb1-38dfc608a8c8 -set "key=XCVCF-2NXM9-723PB-MHCB7-2RYQQ" &:: Pro N +set "_key=XCVCF-2NXM9-723PB-MHCB7-2RYQQ" &:: Pro N exit /b :a00018a3-f20f-4632-bf7c-8daa5351c914 -set "key=GNBB8-YVD74-QJHX6-27H4K-8QHDG" &:: Pro with Media Center +set "_key=GNBB8-YVD74-QJHX6-27H4K-8QHDG" &:: Pro with Media Center exit /b :458e1bec-837a-45f6-b9d5-925ed5d299de -set "key=32JNW-9KQ84-P47T8-D8GGY-CWCK7" &:: Enterprise +set "_key=32JNW-9KQ84-P47T8-D8GGY-CWCK7" &:: Enterprise exit /b :e14997e7-800a-4cf7-ad10-de4b45b578db -set "key=JMNMF-RHW7P-DMY6X-RF3DR-X2BQT" &:: Enterprise N +set "_key=JMNMF-RHW7P-DMY6X-RF3DR-X2BQT" &:: Enterprise N exit /b :10018baf-ce21-4060-80bd-47fe74ed4dab -set "key=RYXVT-BNQG7-VD29F-DBMRY-HT73M" &:: Embedded Industry Pro +set "_key=RYXVT-BNQG7-VD29F-DBMRY-HT73M" &:: Embedded Industry Pro exit /b :18db1848-12e0-4167-b9d7-da7fcda507db -set "key=NKB3R-R2F8T-3XCDP-7Q2KW-XWYQ2" &:: Embedded Industry Enterprise +set "_key=NKB3R-R2F8T-3XCDP-7Q2KW-XWYQ2" &:: Embedded Industry Enterprise exit /b :: Windows Server 2012 :f0f5ec41-0d55-4732-af02-440a44a3cf0f -set "key=XC9B7-NBPP2-83J2H-RHMBY-92BT4" &:: Standard +set "_key=XC9B7-NBPP2-83J2H-RHMBY-92BT4" &:: Standard exit /b :d3643d60-0c42-412d-a7d6-52e6635327f6 -set "key=48HP8-DN98B-MYWDG-T2DCC-8W83P" &:: Datacenter +set "_key=48HP8-DN98B-MYWDG-T2DCC-8W83P" &:: Datacenter exit /b :7d5486c7-e120-4771-b7f1-7b56c6d3170c -set "key=HM7DN-YVMH3-46JC3-XYTG7-CYQJJ" &:: MultiPoint Standard +set "_key=HM7DN-YVMH3-46JC3-XYTG7-CYQJJ" &:: MultiPoint Standard exit /b :95fd1c83-7df5-494a-be8b-1300e1c9d1cd -set "key=XNH6W-2V9GX-RGJ4K-Y8X6F-QGJ2G" &:: MultiPoint Premium +set "_key=XNH6W-2V9GX-RGJ4K-Y8X6F-QGJ2G" &:: MultiPoint Premium exit /b :: Windows 7 :b92e9980-b9d5-4821-9c94-140f632f6312 -set "key=FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4" &:: Professional +set "_key=FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4" &:: Professional exit /b :54a09a0d-d57b-4c10-8b69-a842d6590ad5 -set "key=MRPKT-YTG23-K7D7T-X2JMM-QY7MG" &:: Professional N +set "_key=MRPKT-YTG23-K7D7T-X2JMM-QY7MG" &:: Professional N exit /b :5a041529-fef8-4d07-b06f-b59b573b32d2 -set "key=W82YF-2Q76Y-63HXB-FGJG9-GF7QX" &:: Professional E +set "_key=W82YF-2Q76Y-63HXB-FGJG9-GF7QX" &:: Professional E exit /b :ae2ee509-1b34-41c0-acb7-6d4650168915 -set "key=33PXH-7Y6KF-2VJC9-XBBR8-HVTHH" &:: Enterprise +set "_key=33PXH-7Y6KF-2VJC9-XBBR8-HVTHH" &:: Enterprise exit /b :1cb6d605-11b3-4e14-bb30-da91c8e3983a -set "key=YDRBP-3D83W-TY26F-D46B2-XCKRJ" &:: Enterprise N +set "_key=YDRBP-3D83W-TY26F-D46B2-XCKRJ" &:: Enterprise N exit /b :46bbed08-9c7b-48fc-a614-95250573f4ea -set "key=C29WB-22CC8-VJ326-GHFJW-H9DH4" &:: Enterprise E +set "_key=C29WB-22CC8-VJ326-GHFJW-H9DH4" &:: Enterprise E exit /b :db537896-376f-48ae-a492-53d0547773d0 -set "key=YBYF6-BHCR3-JPKRB-CDW7B-F9BK4" &:: Embedded POSReady 7 +set "_key=YBYF6-BHCR3-JPKRB-CDW7B-F9BK4" &:: Embedded POSReady 7 exit /b :e1a8296a-db37-44d1-8cce-7bc961d59c54 -set "key=XGY72-BRBBT-FF8MH-2GG8H-W7KCW" &:: Embedded Standard +set "_key=XGY72-BRBBT-FF8MH-2GG8H-W7KCW" &:: Embedded Standard exit /b :aa6dd3aa-c2b4-40e2-a544-a6bbb3f5c395 -set "key=73KQT-CD9G6-K7TQG-66MRP-CQ22C" &:: Embedded ThinPC +set "_key=73KQT-CD9G6-K7TQG-66MRP-CQ22C" &:: Embedded ThinPC exit /b :: Windows Server 2008 R2 :a78b8bd9-8017-4df5-b86a-09f756affa7c -set "key=6TPJF-RBVHG-WBW2R-86QPH-6RTM4" &:: Web +set "_key=6TPJF-RBVHG-WBW2R-86QPH-6RTM4" &:: Web exit /b :cda18cf3-c196-46ad-b289-60c072869994 -set "key=TT8MH-CG224-D3D7Q-498W2-9QCTX" &:: HPC +set "_key=TT8MH-CG224-D3D7Q-498W2-9QCTX" &:: HPC exit /b :68531fb9-5511-4989-97be-d11a0f55633f -set "key=YC6KT-GKW9T-YTKYR-T4X34-R7VHC" &:: Standard +set "_key=YC6KT-GKW9T-YTKYR-T4X34-R7VHC" &:: Standard exit /b :7482e61b-c589-4b7f-8ecc-46d455ac3b87 -set "key=74YFP-3QFB3-KQT8W-PMXWJ-7M648" &:: Datacenter +set "_key=74YFP-3QFB3-KQT8W-PMXWJ-7M648" &:: Datacenter exit /b :620e2b3d-09e7-42fd-802a-17a13652fe7a -set "key=489J6-VHDMP-X63PK-3K798-CPX3Y" &:: Enterprise +set "_key=489J6-VHDMP-X63PK-3K798-CPX3Y" &:: Enterprise exit /b :8a26851c-1c7e-48d3-a687-fbca9b9ac16b -set "key=GT63C-RJFQ3-4GMB6-BRFB9-CB83V" &:: Itanium +set "_key=GT63C-RJFQ3-4GMB6-BRFB9-CB83V" &:: Itanium exit /b :f772515c-0e87-48d5-a676-e6962c3e1195 -set "key=736RG-XDKJK-V34PF-BHK87-J6X3K" &:: MultiPoint Server +set "_key=736RG-XDKJK-V34PF-BHK87-J6X3K" &:: MultiPoint Server - ServerEmbeddedSolution exit /b -:: Office 2019 -:0bc88885-718c-491d-921f-6f214349e79c -set "key=VQ9DP-NVHPH-T9HJC-J9PDT-KTQRG" &:: Professional Plus C2R-P +:: Office 2021 +:fbdb3e18-a8ef-4fb3-9183-dffd60bd0984 +set "_key=FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH" &:: Professional Plus exit /b -:fc7c4d0c-2e85-4bb9-afd4-01ed1476b5e9 -set "key=XM2V9-DN9HH-QB449-XDGKC-W2RMW" &:: Project Professional C2R-P +:080a45c5-9f9f-49eb-b4b0-c3c610a5ebd3 +set "_key=KDX7X-BNVR8-TXXGX-4Q7Y8-78VT3" &:: Standard exit /b -:500f6619-ef93-4b75-bcb4-82819998a3ca -set "key=N2CG9-YD3YK-936X4-3WR82-Q3X4H" &:: Visio Professional C2R-P +:76881159-155c-43e0-9db7-2d70a9a3a4ca +set "_key=FTNWT-C6WBT-8HMGF-K9PRX-QV9H8" &:: Project Professional +exit /b + +:6dd72704-f752-4b71-94c7-11cec6bfc355 +set "_key=J2JDC-NJCYY-9RGQ4-YXWMH-T3D4T" &:: Project Standard +exit /b + +:fb61ac9a-1688-45d2-8f6b-0674dbffa33c +set "_key=KNH8D-FGHT4-T8RK3-CTDYJ-K2HT4" &:: Visio Professional +exit /b + +:72fce797-1884-48dd-a860-b2f6a5efd3ca +set "_key=MJVNY-BYWPY-CWV6J-2RKRT-4M8QG" &:: Visio Standard +exit /b + +:1fe429d8-3fa7-4a39-b6f0-03dded42fe14 +set "_key=WM8YG-YNGDD-4JHDC-PG3F4-FC4T4" &:: Access +exit /b + +:ea71effc-69f1-4925-9991-2f5e319bbc24 +set "_key=NWG3X-87C9K-TC7YY-BC2G7-G6RVC" &:: Excel +exit /b + +:a5799e4c-f83c-4c6e-9516-dfe9b696150b +set "_key=C9FM6-3N72F-HFJXB-TM3V9-T86R9" &:: Outlook exit /b +:6e166cc3-495d-438a-89e7-d7c9e6fd4dea +set "_key=TY7XF-NFRBR-KJ44C-G83KF-GX27K" &:: PowerPoint +exit /b + +:aa66521f-2370-4ad8-a2bb-c095e3e4338f +set "_key=2MW9D-N4BXM-9VBPG-Q7W6M-KFBGQ" &:: Publisher +exit /b + +:1f32a9af-1274-48bd-ba1e-1ab7508a23e8 +set "_key=HWCXN-K3WBT-WJBKY-R8BD9-XK29P" &:: Skype for Business +exit /b + +:abe28aea-625a-43b1-8e30-225eb8fbd9e5 +set "_key=TN8H9-M34D3-Y64V9-TR72V-X79KV" &:: Word +exit /b + +:: Office 2019 :85dd8b5f-eaa4-4af3-a628-cce9e77c9a03 -set "key=NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP" &:: Professional Plus +set "_key=NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP" &:: Professional Plus exit /b :6912a74b-a5fb-401a-bfdb-2e3ab46f4b02 -set "key=6NWWJ-YQWMR-QKGCB-6TMB3-9D9HK" &:: Standard +set "_key=6NWWJ-YQWMR-QKGCB-6TMB3-9D9HK" &:: Standard exit /b :2ca2bf3f-949e-446a-82c7-e25a15ec78c4 -set "key=B4NPR-3FKK7-T2MBV-FRQ4W-PKD2B" &:: Project Professional +set "_key=B4NPR-3FKK7-T2MBV-FRQ4W-PKD2B" &:: Project Professional exit /b :1777f0e3-7392-4198-97ea-8ae4de6f6381 -set "key=C4F7P-NCP8C-6CQPT-MQHV9-JXD2M" &:: Project Standard +set "_key=C4F7P-NCP8C-6CQPT-MQHV9-JXD2M" &:: Project Standard exit /b :5b5cf08f-b81a-431d-b080-3450d8620565 -set "key=9BGNQ-K37YR-RQHF2-38RQ3-7VCBB" &:: Visio Professional +set "_key=9BGNQ-K37YR-RQHF2-38RQ3-7VCBB" &:: Visio Professional exit /b :e06d7df3-aad0-419d-8dfb-0ac37e2bdf39 -set "key=7TQNQ-K3YQQ-3PFH7-CCPPM-X4VQ2" &:: Visio Standard +set "_key=7TQNQ-K3YQQ-3PFH7-CCPPM-X4VQ2" &:: Visio Standard exit /b :9e9bceeb-e736-4f26-88de-763f87dcc485 -set "key=9N9PT-27V4Y-VJ2PD-YXFMF-YTFQT" &:: Access +set "_key=9N9PT-27V4Y-VJ2PD-YXFMF-YTFQT" &:: Access exit /b :237854e9-79fc-4497-a0c1-a70969691c6b -set "key=TMJWT-YYNMB-3BKTF-644FC-RVXBD" &:: Excel +set "_key=TMJWT-YYNMB-3BKTF-644FC-RVXBD" &:: Excel exit /b :c8f8a301-19f5-4132-96ce-2de9d4adbd33 -set "key=7HD7K-N4PVK-BHBCQ-YWQRW-XW4VK" &:: Outlook +set "_key=7HD7K-N4PVK-BHBCQ-YWQRW-XW4VK" &:: Outlook exit /b :3131fd61-5e4f-4308-8d6d-62be1987c92c -set "key=RRNCX-C64HY-W2MM7-MCH9G-TJHMQ" &:: PowerPoint +set "_key=RRNCX-C64HY-W2MM7-MCH9G-TJHMQ" &:: PowerPoint exit /b :9d3e4cca-e172-46f1-a2f4-1d2107051444 -set "key=G2KWX-3NW6P-PY93R-JXK2T-C9Y9V" &:: Publisher +set "_key=G2KWX-3NW6P-PY93R-JXK2T-C9Y9V" &:: Publisher exit /b :734c6c6e-b0ba-4298-a891-671772b2bd1b -set "key=NCJ33-JHBBY-HTK98-MYCV8-HMKHJ" &:: Skype for Business +set "_key=NCJ33-JHBBY-HTK98-MYCV8-HMKHJ" &:: Skype for Business exit /b :059834fe-a8ea-4bff-b67b-4d006b5447d3 -set "key=PBX3G-NWMT6-Q7XBW-PYJGG-WXD33" &:: Word +set "_key=PBX3G-NWMT6-Q7XBW-PYJGG-WXD33" &:: Word +exit /b + +:0bc88885-718c-491d-921f-6f214349e79c +set "_key=VQ9DP-NVHPH-T9HJC-J9PDT-KTQRG" &:: Pro Plus 2019 Preview +exit /b + +:fc7c4d0c-2e85-4bb9-afd4-01ed1476b5e9 +set "_key=XM2V9-DN9HH-QB449-XDGKC-W2RMW" &:: Project Pro 2019 Preview +exit /b + +:500f6619-ef93-4b75-bcb4-82819998a3ca +set "_key=N2CG9-YD3YK-936X4-3WR82-Q3X4H" &:: Visio Pro 2019 Preview +exit /b + +:f3fb2d68-83dd-4c8b-8f09-08e0d950ac3b +set "_key=HFPBN-RYGG8-HQWCW-26CH6-PDPVF" &:: Pro Plus 2021 Preview +exit /b + +:76093b1b-7057-49d7-b970-638ebcbfd873 +set "_key=WDNBY-PCYFY-9WP6G-BXVXM-92HDV" &:: Project Pro 2021 Preview +exit /b + +:a3b44174-2451-4cd6-b25f-66638bfb9046 +set "_key=2XYX7-NXXBK-9CK7W-K2TKW-JFJ7G" &:: Visio Pro 2021 Preview exit /b :: Office 2016 :829b8110-0e6f-4349-bca4-42803577788d -set "key=WGT24-HCNMF-FQ7XH-6M8K7-DRTW9" &:: Project Professional C2R-P +set "_key=WGT24-HCNMF-FQ7XH-6M8K7-DRTW9" &:: Project Professional C2R-P exit /b :cbbaca45-556a-4416-ad03-bda598eaa7c8 -set "key=D8NRQ-JTYM3-7J2DX-646CT-6836M" &:: Project Standard C2R-P +set "_key=D8NRQ-JTYM3-7J2DX-646CT-6836M" &:: Project Standard C2R-P exit /b :b234abe3-0857-4f9c-b05a-4dc314f85557 -set "key=69WXN-MBYV6-22PQG-3WGHK-RM6XC" &:: Visio Professional C2R-P +set "_key=69WXN-MBYV6-22PQG-3WGHK-RM6XC" &:: Visio Professional C2R-P exit /b :361fe620-64f4-41b5-ba77-84f8e079b1f7 -set "key=NY48V-PPYYH-3F4PX-XJRKJ-W4423" &:: Visio Standard C2R-P +set "_key=NY48V-PPYYH-3F4PX-XJRKJ-W4423" &:: Visio Standard C2R-P exit /b :e914ea6e-a5fa-4439-a394-a9bb3293ca09 -set "key=DMTCJ-KNRKX-26982-JYCKT-P7KB6" &:: MondoR +set "_key=DMTCJ-KNRKX-26982-JYCKT-P7KB6" &:: MondoR exit /b :9caabccb-61b1-4b4b-8bec-d10a3c3ac2ce -set "key=HFTND-W9MK4-8B7MJ-B6C4G-XQBR2" &:: Mondo +set "_key=HFTND-W9MK4-8B7MJ-B6C4G-XQBR2" &:: Mondo exit /b :d450596f-894d-49e0-966a-fd39ed4c4c64 -set "key=XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99" &:: Professional Plus +set "_key=XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99" &:: Professional Plus exit /b :dedfa23d-6ed1-45a6-85dc-63cae0546de6 -set "key=JNRGM-WHDWX-FJJG3-K47QV-DRTFM" &:: Standard +set "_key=JNRGM-WHDWX-FJJG3-K47QV-DRTFM" &:: Standard exit /b :4f414197-0fc2-4c01-b68a-86cbb9ac254c -set "key=YG9NW-3K39V-2T3HJ-93F3Q-G83KT" &:: Project Professional +set "_key=YG9NW-3K39V-2T3HJ-93F3Q-G83KT" &:: Project Professional exit /b :da7ddabc-3fbe-4447-9e01-6ab7440b4cd4 -set "key=GNFHQ-F6YQM-KQDGJ-327XX-KQBVC" &:: Project Standard +set "_key=GNFHQ-F6YQM-KQDGJ-327XX-KQBVC" &:: Project Standard exit /b :6bf301c1-b94a-43e9-ba31-d494598c47fb -set "key=PD3PC-RHNGV-FXJ29-8JK7D-RJRJK" &:: Visio Professional +set "_key=PD3PC-RHNGV-FXJ29-8JK7D-RJRJK" &:: Visio Professional exit /b :aa2a7821-1827-4c2c-8f1d-4513a34dda97 -set "key=7WHWN-4T7MP-G96JF-G33KR-W8GF4" &:: Visio Standard +set "_key=7WHWN-4T7MP-G96JF-G33KR-W8GF4" &:: Visio Standard exit /b :67c0fc0c-deba-401b-bf8b-9c8ad8395804 -set "key=GNH9Y-D2J4T-FJHGG-QRVH7-QPFDW" &:: Access +set "_key=GNH9Y-D2J4T-FJHGG-QRVH7-QPFDW" &:: Access exit /b :c3e65d36-141f-4d2f-a303-a842ee756a29 -set "key=9C2PK-NWTVB-JMPW8-BFT28-7FTBF" &:: Excel +set "_key=9C2PK-NWTVB-JMPW8-BFT28-7FTBF" &:: Excel exit /b :d8cace59-33d2-4ac7-9b1b-9b72339c51c8 -set "key=DR92N-9HTF2-97XKM-XW2WJ-XW3J6" &:: OneNote +set "_key=DR92N-9HTF2-97XKM-XW2WJ-XW3J6" &:: OneNote exit /b :ec9d9265-9d1e-4ed0-838a-cdc20f2551a1 -set "key=R69KK-NTPKF-7M3Q4-QYBHW-6MT9B" &:: Outlook +set "_key=R69KK-NTPKF-7M3Q4-QYBHW-6MT9B" &:: Outlook exit /b :d70b1bba-b893-4544-96e2-b7a318091c33 -set "key=J7MQP-HNJ4Y-WJ7YM-PFYGF-BY6C6" &:: Powerpoint +set "_key=J7MQP-HNJ4Y-WJ7YM-PFYGF-BY6C6" &:: Powerpoint exit /b :041a06cb-c5b8-4772-809f-416d03d16654 -set "key=F47MM-N3XJP-TQXJ9-BP99D-8K837" &:: Publisher +set "_key=F47MM-N3XJP-TQXJ9-BP99D-8K837" &:: Publisher exit /b :83e04ee1-fa8d-436d-8994-d31a862cab77 -set "key=869NQ-FJ69K-466HW-QYCP2-DDBV6" &:: Skype for Business +set "_key=869NQ-FJ69K-466HW-QYCP2-DDBV6" &:: Skype for Business exit /b :bb11badf-d8aa-470e-9311-20eaf80fe5cc -set "key=WXY84-JN2Q9-RBCCQ-3Q3J3-3PFJ6" &:: Word +set "_key=WXY84-JN2Q9-RBCCQ-3Q3J3-3PFJ6" &:: Word exit /b :: Office 2013 :dc981c6b-fc8e-420f-aa43-f8f33e5c0923 -set "key=42QTK-RN8M7-J3C4G-BBGYM-88CYV" &:: Mondo +set "_key=42QTK-RN8M7-J3C4G-BBGYM-88CYV" &:: Mondo exit /b :b322da9c-a2e2-4058-9e4e-f59a6970bd69 -set "key=YC7DK-G2NP3-2QQC3-J6H88-GVGXT" &:: Professional Plus +set "_key=YC7DK-G2NP3-2QQC3-J6H88-GVGXT" &:: Professional Plus exit /b :b13afb38-cd79-4ae5-9f7f-eed058d750ca -set "key=KBKQT-2NMXY-JJWGP-M62JB-92CD4" &:: Standard +set "_key=KBKQT-2NMXY-JJWGP-M62JB-92CD4" &:: Standard exit /b :4a5d124a-e620-44ba-b6ff-658961b33b9a -set "key=FN8TT-7WMH6-2D4X9-M337T-2342K" &:: Project Professional +set "_key=FN8TT-7WMH6-2D4X9-M337T-2342K" &:: Project Professional exit /b :427a28d1-d17c-4abf-b717-32c780ba6f07 -set "key=6NTH3-CW976-3G3Y2-JK3TX-8QHTT" &:: Project Standard +set "_key=6NTH3-CW976-3G3Y2-JK3TX-8QHTT" &:: Project Standard exit /b :e13ac10e-75d0-4aff-a0cd-764982cf541c -set "key=C2FG9-N6J68-H8BTJ-BW3QX-RM3B3" &:: Visio Professional +set "_key=C2FG9-N6J68-H8BTJ-BW3QX-RM3B3" &:: Visio Professional exit /b :ac4efaf0-f81f-4f61-bdf7-ea32b02ab117 -set "key=J484Y-4NKBF-W2HMG-DBMJC-PGWR7" &:: Visio Standard +set "_key=J484Y-4NKBF-W2HMG-DBMJC-PGWR7" &:: Visio Standard exit /b :6ee7622c-18d8-4005-9fb7-92db644a279b -set "key=NG2JY-H4JBT-HQXYP-78QH9-4JM2D" &:: Access +set "_key=NG2JY-H4JBT-HQXYP-78QH9-4JM2D" &:: Access exit /b :f7461d52-7c2b-43b2-8744-ea958e0bd09a -set "key=VGPNG-Y7HQW-9RHP7-TKPV3-BG7GB" &:: Excel +set "_key=VGPNG-Y7HQW-9RHP7-TKPV3-BG7GB" &:: Excel exit /b :fb4875ec-0c6b-450f-b82b-ab57d8d1677f -set "key=H7R7V-WPNXQ-WCYYC-76BGV-VT7GH" &:: Groove +set "_key=H7R7V-WPNXQ-WCYYC-76BGV-VT7GH" &:: Groove exit /b :a30b8040-d68a-423f-b0b5-9ce292ea5a8f -set "key=DKT8B-N7VXH-D963P-Q4PHY-F8894" &:: InfoPath +set "_key=DKT8B-N7VXH-D963P-Q4PHY-F8894" &:: InfoPath exit /b :1b9f11e3-c85c-4e1b-bb29-879ad2c909e3 -set "key=2MG3G-3BNTT-3MFW9-KDQW3-TCK7R" &:: Lync +set "_key=2MG3G-3BNTT-3MFW9-KDQW3-TCK7R" &:: Lync exit /b :efe1f3e6-aea2-4144-a208-32aa872b6545 -set "key=TGN6P-8MMBC-37P2F-XHXXK-P34VW" &:: OneNote +set "_key=TGN6P-8MMBC-37P2F-XHXXK-P34VW" &:: OneNote exit /b :771c3afa-50c5-443f-b151-ff2546d863a0 -set "key=QPN8Q-BJBTJ-334K3-93TGY-2PMBT" &:: Outlook +set "_key=QPN8Q-BJBTJ-334K3-93TGY-2PMBT" &:: Outlook exit /b :8c762649-97d1-4953-ad27-b7e2c25b972e -set "key=4NT99-8RJFH-Q2VDH-KYG2C-4RD4F" &:: Powerpoint +set "_key=4NT99-8RJFH-Q2VDH-KYG2C-4RD4F" &:: Powerpoint exit /b :00c79ff1-6850-443d-bf61-71cde0de305f -set "key=PN2WF-29XG2-T9HJ7-JQPJR-FCXK4" &:: Publisher +set "_key=PN2WF-29XG2-T9HJ7-JQPJR-FCXK4" &:: Publisher exit /b :d9f5b1c6-5386-495a-88f9-9ad6b41ac9b3 -set "key=6Q7VD-NX8JD-WJ2VH-88V73-4GBJ7" &:: Word +set "_key=6Q7VD-NX8JD-WJ2VH-88V73-4GBJ7" &:: Word exit /b :: Office 2010 :09ed9640-f020-400a-acd8-d7d867dfd9c2 -set "key=YBJTT-JG6MD-V9Q7P-DBKXJ-38W9R" &:: Mondo +set "_key=YBJTT-JG6MD-V9Q7P-DBKXJ-38W9R" &:: Mondo exit /b :ef3d4e49-a53d-4d81-a2b1-2ca6c2556b2c -set "key=7TC2V-WXF6P-TD7RT-BQRXR-B8K32" &:: Mondo2 +set "_key=7TC2V-WXF6P-TD7RT-BQRXR-B8K32" &:: Mondo2 exit /b :6f327760-8c5c-417c-9b61-836a98287e0c -set "key=VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB" &:: Professional Plus +set "_key=VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB" &:: Professional Plus exit /b :9da2a678-fb6b-4e67-ab84-60dd6a9c819a -set "key=V7QKV-4XVVR-XYV4D-F7DFM-8R6BM" &:: Standard +set "_key=V7QKV-4XVVR-XYV4D-F7DFM-8R6BM" &:: Standard exit /b :df133ff7-bf14-4f95-afe3-7b48e7e331ef -set "key=YGX6F-PGV49-PGW3J-9BTGG-VHKC6" &:: Project Professional +set "_key=YGX6F-PGV49-PGW3J-9BTGG-VHKC6" &:: Project Professional exit /b :5dc7bf61-5ec9-4996-9ccb-df806a2d0efe -set "key=4HP3K-88W3F-W2K3D-6677X-F9PGB" &:: Project Standard +set "_key=4HP3K-88W3F-W2K3D-6677X-F9PGB" &:: Project Standard exit /b :92236105-bb67-494f-94c7-7f7a607929bd -set "key=D9DWC-HPYVV-JGF4P-BTWQB-WX8BJ" &:: Visio Premium +set "_key=D9DWC-HPYVV-JGF4P-BTWQB-WX8BJ" &:: Visio Premium exit /b :e558389c-83c3-4b29-adfe-5e4d7f46c358 -set "key=7MCW8-VRQVK-G677T-PDJCM-Q8TCP" &:: Visio Professional +set "_key=7MCW8-VRQVK-G677T-PDJCM-Q8TCP" &:: Visio Professional exit /b :9ed833ff-4f92-4f36-b370-8683a4f13275 -set "key=767HD-QGMWX-8QTDB-9G3R2-KHFGJ" &:: Visio Standard +set "_key=767HD-QGMWX-8QTDB-9G3R2-KHFGJ" &:: Visio Standard exit /b :8ce7e872-188c-4b98-9d90-f8f90b7aad02 -set "key=V7Y44-9T38C-R2VJK-666HK-T7DDX" &:: Access +set "_key=V7Y44-9T38C-R2VJK-666HK-T7DDX" &:: Access exit /b :cee5d470-6e3b-4fcc-8c2b-d17428568a9f -set "key=H62QG-HXVKF-PP4HP-66KMR-CW9BM" &:: Excel +set "_key=H62QG-HXVKF-PP4HP-66KMR-CW9BM" &:: Excel exit /b :8947d0b8-c33b-43e1-8c56-9b674c052832 -set "key=QYYW6-QP4CB-MBV6G-HYMCJ-4T3J4" &:: Groove (SharePoint Workspace) +set "_key=QYYW6-QP4CB-MBV6G-HYMCJ-4T3J4" &:: Groove - SharePoint Workspace exit /b :ca6b6639-4ad6-40ae-a575-14dee07f6430 -set "key=K96W8-67RPQ-62T9Y-J8FQJ-BT37T" &:: InfoPath +set "_key=K96W8-67RPQ-62T9Y-J8FQJ-BT37T" &:: InfoPath exit /b :ab586f5c-5256-4632-962f-fefd8b49e6f4 -set "key=Q4Y4M-RHWJM-PY37F-MTKWH-D3XHX" &:: OneNote +set "_key=Q4Y4M-RHWJM-PY37F-MTKWH-D3XHX" &:: OneNote exit /b :ecb7c192-73ab-4ded-acf4-2399b095d0cc -set "key=7YDC2-CWM8M-RRTJC-8MDVC-X3DWQ" &:: Outlook +set "_key=7YDC2-CWM8M-RRTJC-8MDVC-X3DWQ" &:: Outlook exit /b :45593b1d-dfb1-4e91-bbfb-2d5d0ce2227a -set "key=RC8FX-88JRY-3PF7C-X8P67-P4VTT" &:: Powerpoint +set "_key=RC8FX-88JRY-3PF7C-X8P67-P4VTT" &:: Powerpoint exit /b :b50c4f75-599b-43e8-8dcd-1081a7967241 -set "key=BFK7F-9MYHM-V68C7-DRQ66-83YTP" &:: Publisher +set "_key=BFK7F-9MYHM-V68C7-DRQ66-83YTP" &:: Publisher exit /b :2d0882e7-a4e7-423b-8ccc-70d91e0158b1 -set "key=HVHB3-C6FV7-KQX9W-YQG79-CRY7T" &:: Word +set "_key=HVHB3-C6FV7-KQX9W-YQG79-CRY7T" &:: Word exit /b :ea509e87-07a1-4a45-9edc-eba5a39f36af -set "key=D6QFG-VBYP2-XQHM7-J97RH-VVRCK" &:: Home and Business +set "_key=D6QFG-VBYP2-XQHM7-J97RH-VVRCK" &:: Small Business Basics exit /b \ No newline at end of file diff --git a/Activate.cmd b/Activate.cmd index ff33f54..518c47f 100644 --- a/Activate.cmd +++ b/Activate.cmd @@ -1,20 +1,30 @@ +@setlocal DisableDelayedExpansion +@set uivr=v44 @echo off :: change to 1 to enable debug mode set _Debug=0 :: change External to 1 and set KMS_IP address to activate via external KMS server set External=0 -set KMS_IP=172.16.0.2 +set KMS_IP=0.0.0.0 -:: change to 0 to turn OFF Windows or Office activation via the script -:: note: this not effective if Windows and/or Office installation is already Volume (GVLK installed) +:: change to 0 to turn OFF Windows or Office activation processing via the script set ActWindows=1 set ActOffice=1 -:: change to 0 to revert Windows 10 KMS38 to normal KMS +:: change to 0 to turn OFF auto conversion for Office C2R Retail to Volume +set AutoR2V=1 + +:: change to 0 to revert Windows 10/11 KMS38 to normal KMS set SkipKMS38=1 -:: ### Advanced Options ### +:: change to 1 to suppress any output +set Silent=0 + +:: change to 1 to redirect output to a text file, works only with Silent=1 +set Logger=0 + +:: ### Advanced KMS Options ### :: change KMS auto renewal schedule, range in minutes: from 15 to 43200 :: example: 10080 = weekly, 1440 = daily, 43200 = monthly @@ -23,49 +33,116 @@ set KMS_RenewalInterval=10080 :: change KMS reattempt schedule for failed activation or unactivated, range in minutes: from 15 to 43200 set KMS_ActivationInterval=120 -:: change Hardware Hash for local KMS emulator server (only affect Windows 8.1 and 10) +:: change Hardware Hash for KMS emulator server (only affect Windows 8.1 and 10) set KMS_HWID=0x3A1C049600B60076 :: change KMS TCP port set KMS_Port=1688 -:: ################################################################## -:: # NORMALY THERE IS NO NEED TO CHANGE ANYTHING BELOW THIS COMMENT # -:: ################################################################## +:: Notice for advanced users on Windows 64-bit (x64 / ARM64): +:: when you bundle KMS_VL_ALL script(s) inside self-extracting program or run it from another command script +:: if the exe pack or the caller script is running as 32-bit (x86) process +:: KMS_VL_ALL script(s) will close then relaunch itself using 64-bit (x64 / ARM64) cmd.exe +:: in that case, be advised not to proceed your pack or caller script depending on KMS_VL_ALL script(s) closure +:: instead, make sure the exe pack or the other caller script are already 64-bit (x64 / ARM64) process + +:: ################################################################### +:: # NORMALLY THERE IS NO NEED TO CHANGE ANYTHING BELOW THIS COMMENT # +:: ################################################################### set KMS_Emulation=1 set Unattend=0 -set Silent=0 -set Logger=0 - -set "SysPath=%Windir%\System32" -if exist "%Windir%\Sysnative\reg.exe" (set "SysPath=%Windir%\Sysnative") -set "Path=%SysPath%;%Windir%;%SysPath%\Wbem;%SysPath%\WindowsPowerShell\v1.0\" -set "_err===== ERROR ====" -set _args=%1 +set _uIP=0.0.0.0 -fsutil dirty query %SystemDrive% >nul 2>&1 || goto :E_Admin +set "_Null=1>nul 2>nul" -if defined _args ( -if /i "%~1"=="/u" set Unattend=1 -if /i "%~1"=="/s" set Silent=1 -if /i "%~1"=="/d" set _Debug=1 -if /i "%~2"=="/d" set _Debug=1 -if /i "%~2"=="/l" set Logger=1 +set "_cmdf=%~f0" +if exist "%SystemRoot%\Sysnative\cmd.exe" ( +setlocal EnableDelayedExpansion +start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %*" +exit /b ) -if %Silent% EQU 1 ( -set Unattend=1 +if exist "%SystemRoot%\SysArm32\cmd.exe" if /i %PROCESSOR_ARCHITECTURE%==AMD64 ( +setlocal EnableDelayedExpansion +start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %*" +exit /b ) -set "_run=nul" -if %Logger% EQU 1 ( -set _run="%~dp0Activate.log" + +set "_args=%*" +if not defined _args goto :NoProgArgs +if "%~1"=="" set "_args="&goto :NoProgArgs + +set _args=%_args:"=% +for %%A in (%_args%) do ( +if /i "%%A"=="/d" (set _Debug=1 +) else if /i "%%A"=="/u" (set Unattend=1 +) else if /i "%%A"=="/s" (set Silent=1 +) else if /i "%%A"=="/l" (set Logger=1 +) else if /i "%%A"=="/e" (set External=1 +) else if /i "%%A"=="/o" (set ActOffice=1&set ActWindows=0 +) else if /i "%%A"=="/w" (set ActOffice=0&set ActWindows=1 +) else if /i "%%A"=="/c" (set AutoR2V=0 +) else if /i "%%A"=="/x" (set SkipKMS38=0 +) else (set "KMS_IP=%%A") ) +:NoProgArgs +if %External% EQU 1 if "%KMS_IP%"=="%_uIP%" set External=0 +if %Silent% EQU 1 set Unattend=1 +set "_run=nul" +if %Logger% EQU 1 set _run="%~dpn0_Silent.log" + +set "SysPath=%SystemRoot%\System32" +if exist "%SystemRoot%\Sysnative\reg.exe" (set "SysPath=%SystemRoot%\Sysnative") +set "Path=%SysPath%;%SystemRoot%;%SysPath%\Wbem;%SysPath%\WindowsPowerShell\v1.0\" +set "_err===== ERROR ====" +set "o_x64=684103f5c312ae956e66a02b965d9aad59710745" +set "o_x86=da8f931c7f3bc6643e20063e075cd8fa044b53ae" +set "o_arm=1139ae6243934ca621e6d4ed2e2f34cc130ef88a" +set "_bit=64" +set "_wow=1" +if /i "%PROCESSOR_ARCHITECTURE%"=="amd64" set "xBit=x64"&set "xOS=x64"&set "_orig=%o_x64%" +if /i "%PROCESSOR_ARCHITECTURE%"=="arm64" set "xBit=x86"&set "xOS=A64"&set "_orig=%o_arm%" +if /i "%PROCESSOR_ARCHITECTURE%"=="x86" if "%PROCESSOR_ARCHITEW6432%"=="" set "xBit=x86"&set "xOS=x86"&set "_orig=%o_x86%"&set "_wow=0"&set "_bit=32" +if /i "%PROCESSOR_ARCHITEW6432%"=="amd64" set "xBit=x64"&set "xOS=x64"&set "_orig=%o_x64%" +if /i "%PROCESSOR_ARCHITEW6432%"=="arm64" set "xBit=x86"&set "xOS=A64"&set "_orig=%o_arm%" + +set _invpth=0 +set "param=%~f0" +cmd /v:on /c echo(^^!param^^!| findstr /R "[| ` ~ ! @ %% \^ & ( ) \[ \] { } + = ; ' , |]*^" 1>nul 2>nul +if %errorlevel% EQU 0 set _invpth=1 +reg query HKU\S-1-5-19 1>nul 2>nul || goto :E_Admin + +set "_Local=%LocalAppData%" set "_temp=%SystemRoot%\Temp" set "_log=%~dpn0" set "_work=%~dp0" if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%" -setlocal EnableExtensions EnableDelayedExpansion +set _UNC=0 +if "%_work:~0,2%"=="\\" set _UNC=1 +for /f "skip=2 tokens=2*" %%a in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Desktop') do call set "_dsk=%%b" +if exist "%PUBLIC%\Desktop\desktop.ini" set "_dsk=%PUBLIC%\Desktop" +set "_mO21a=Detected Office 2021 C2R Retail is activated" +set "_mO19a=Detected Office 2019 C2R Retail is activated" +set "_mO16a=Detected Office 2016 C2R Retail is activated" +set "_mO15a=Detected Office 2013 C2R Retail is activated" +set "_mO21c=Detected Office 2021 C2R Retail could not be converted to Volume" +set "_mO19c=Detected Office 2019 C2R Retail could not be converted to Volume" +set "_mO16c=Detected Office 2016 C2R Retail could not be converted to Volume" +set "_mO15c=Detected Office 2013 C2R Retail could not be converted to Volume" +set "_mO14c=Detected Office 2010 C2R Retail is not supported by KMS_VL_ALL" +set "_mO14m=Detected Office 2010 MSI Retail is not supported by KMS_VL_ALL" +set "_mO15m=Detected Office 2013 MSI Retail is not supported by KMS_VL_ALL" +set "_mO16m=Detected Office 2016 MSI Retail is not supported by KMS_VL_ALL" +set "_mOuwp=Detected Office 365/2016 UWP is not supported by KMS_VL_ALL" +set DO16Ids=ProPlus,ProjectPro,VisioPro,Standard,ProjectStd,VisioStd,Access,SkypeforBusiness,Excel,Outlook,PowerPoint,Publisher,Word +set LV16Ids=Mondo,ProPlus,ProjectPro,VisioPro,Standard,ProjectStd,VisioStd,Access,SkypeforBusiness,OneNote,Excel,Outlook,PowerPoint,Publisher,Word +set LR16Ids=%LV16Ids%,Professional,HomeBusiness,HomeStudent,O365Business,O365SmallBusPrem,O365HomePrem,O365EduCloud +set "ESUEditions=Enterprise,EnterpriseE,EnterpriseN,Professional,ProfessionalE,ProfessionalN,Ultimate,UltimateE,UltimateN" +if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" ( +set "ESUEditions=ServerDatacenter,ServerDatacenterCore,ServerDatacenterV,ServerDatacenterVCore,ServerStandard,ServerStandardCore,ServerStandardV,ServerStandardVCore,ServerEnterprise,ServerEnterpriseCore,ServerEnterpriseV,ServerEnterpriseVCore" +) +setlocal EnableDelayedExpansion if %_Debug% EQU 0 ( set "_Nul1=1>nul" @@ -81,67 +158,132 @@ if %_Debug% EQU 0 ( set "_Nul6=" set "_Nul3=" set "_Pause=" + copy /y nul "!_work!\#.rw" 1>nul 2>nul && (if exist "!_work!\#.rw" del /f /q "!_work!\#.rw") || (set "_log=!_dsk!\%~n0") if %Silent% EQU 0 ( echo. echo Running in Debug Mode... - echo The window will be closed when finished + if not defined _args (echo The window will be closed when finished) else (echo please wait...) + echo. + echo writing debug log to: + echo "!_log!_Debug.log" ) - copy /y nul "!_work!\#.rw" 1>nul 2>nul && (if exist "!_work!\#.rw" del /f /q "!_work!\#.rw") || (set "_log=!_temp!\%~n0") @echo on @prompt $G - @call :Begin >"!_log!.tmp" 2>&1 &cmd /u /c type "!_log!.tmp">"!_log!_Debug.log"&del "!_log!.tmp" + @call :Begin >"!_log!_tmp.log" 2>&1 &cmd /u /c type "!_log!_tmp.log">"!_log!_Debug.log"&del "!_log!_tmp.log" ) +@color 07 +@title %ComSpec% +@echo off @exit /b :Begin -if %ActWindows% EQU 0 if %ActOffice% EQU 0 (echo.&echo Both Windows and Office activations are OFF...&goto :END) -set AUR=0 -if exist "%SystemRoot%\system32\SppExtComObj*.dll" ( -dir /b /al "%SystemRoot%\system32\SppExtComObjHook.dll" %_Nul3% || set AUR=1 +if %_Debug% EQU 1 ( +if defined _args echo %_args% +) +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="%SysPath%\SppExtComObjHook.dll" +set "_TaskEx=\Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger" +for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G +set SSppHook=0 +for /f %%A in ('dir /b /ad %SysPath%\spp\tokens\skus') do ( + if %winbuild% GEQ 9200 if exist "%SysPath%\spp\tokens\skus\%%A\*GVLK*.xrm-ms" set SSppHook=1 + if %winbuild% LSS 9200 if exist "%SysPath%\spp\tokens\skus\%%A\*VLKMS*.xrm-ms" set SSppHook=1 + if %winbuild% LSS 9200 if exist "%SysPath%\spp\tokens\skus\%%A\*VL-BYPASS*.xrm-ms" set SSppHook=1 ) +set OsppHook=1 +sc query osppsvc %_Nul3% +if %errorlevel% EQU 1060 set OsppHook=0 + +set ESU_KMS=0 +if %winbuild% LSS 9200 for /f %%A in ('dir /b /ad %SysPath%\spp\tokens\channels') do ( + if exist "%SysPath%\spp\tokens\channels\%%A\*VL-BYPASS*.xrm-ms" set ESU_KMS=1 +) +if %ESU_KMS% 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 %ESU_KMS% EQU 1 for %%A in (%ESUEditions%) do ( + if exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%%A\*.xrm-ms" set ESU_EDT=1 +) +if %ESU_EDT% EQU 1 set SSppHook=1 +set ESU_ADD=0 + +if %winbuild% GEQ 9200 ( + set OSType=Win8 + set SppVer=SppExtComObj.exe +) else if %winbuild% GEQ 7600 ( + set OSType=Win7 + set SppVer=sppsvc.exe +) else ( + goto :UnsupportedVersion +) +if %OSType% EQU Win8 reg query "%IFEO%\sppsvc.exe" %_Nul3% && ( +reg delete "%IFEO%\sppsvc.exe" /f %_Nul3% +call :StopService sppsvc +) +set _uRI=%KMS_RenewalInterval% +set _uAI=%KMS_ActivationInterval% +if %ActWindows% EQU 0 if %ActOffice% EQU 0 set ActWindows=1 +set _AUR=0 +if exist %_Hook% dir /b /al %_Hook% %_Nul3% || ( + reg query "%IFEO%\%SppVer%" /v VerifierFlags %_Nul3% && set _AUR=1 + if %SSppHook% EQU 0 reg query "%IFEO%\osppsvc.exe" /v VerifierFlags %_Nul3% && set _AUR=1 +) + if %External% EQU 1 ( -set AUR=1 +set _AUR=1 ) if %External% EQU 0 ( -set KMS_IP=172.16.0.2 +set KMS_IP=%_uIP% ) -if %AUR% EQU 0 ( -set KMS_ActivationInterval=43200 +if %_AUR% EQU 0 ( set KMS_RenewalInterval=43200 +set KMS_ActivationInterval=43200 +) else ( +set KMS_RenewalInterval=%_uRI% +set KMS_ActivationInterval=%_uAI% ) if %External% EQU 1 ( color 8F&set "mode=External ^(%KMS_IP%^)" ) else ( -if %AUR% EQU 0 (color 1F&set "mode=Manual") else (color 07&set "mode=Auto Renewal") +if %_AUR% EQU 0 (color 1F&set "mode=Manual") else (color 07&set "mode=Auto Renewal") ) if %Unattend% EQU 0 ( -if %_Debug% EQU 0 (title KMS_VL_ALL) else (title KMS_VL_ALL %mode%) -) -set xOS=x64 -if /i "%PROCESSOR_ARCHITECTURE%"=="x86" (if not defined PROCESSOR_ARCHITEW6432 set xOS=Win32) -set "IFEO=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options" -set "OSPP=SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" -set "SPPk=SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" -wmic path SoftwareLicensingProduct where (Description like '%%KMSCLIENT%%') get Name %_Nul2% | findstr /i Windows %_Nul1% && (set SppHook=1) || (set SppHook=0) -wmic path OfficeSoftwareProtectionService get Version %_Nul3% && (set OsppHook=1) || (set OsppHook=0) - -for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G -if %winbuild% GEQ 9200 ( - set OSType=Win8 -) else if %winbuild% GEQ 7600 ( - set OSType=Win7 +if %_Debug% EQU 0 (title KMS_VL_ALL %uivr%) else (title KMS_VL_ALL %uivr% : %mode%) ) else ( - goto :UnsupportedVersion +echo. +echo Running KMS_VL_ALL %uivr% ) if %winbuild% GEQ 9600 ( -reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" /f /v NoGenTicket /t REG_DWORD /d 1 %_Nul3% + reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" /v NoGenTicket /t REG_DWORD /d 1 /f %_Nul3% + if %winbuild% EQU 14393 reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" /v NoAcquireGT /t REG_DWORD /d 1 /f %_Nul3% +) +echo. +echo Activation Mode: %mode% +if %External% EQU 0 if not exist "!_work!\bin\%xOS%.dll" goto :E_DLL +call :StopService sppsvc +if %OsppHook% NEQ 0 call :StopService osppsvc +if %External% EQU 0 goto :InstallHook + +:ReturnHook +if %External% EQU 0 if %_AUR% EQU 1 ( +call :UpdateIFEOEntry %SppVer% +call :UpdateIFEOEntry osppsvc.exe +) +if %External% EQU 1 if %_AUR% EQU 1 ( +call :UpdateOSPPEntry osppsvc.exe ) -SET Win10Gov=0 -IF %winbuild% LSS 14393 GOTO :Main +SET Win10Gov=0 +SET "EditionWMI=" +SET "EditionID=" +IF %winbuild% LSS 14393 if %SSppHook% NEQ 0 GOTO :Main SET "RegKey=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages" SET "Pattern=Microsoft-Windows-*Edition~31bf3856ad364e35" -SET "EditionPKG=NUL" +SET "EditionPKG=FFFFFFFF" FOR /F "TOKENS=8 DELIMS=\" %%A IN ('REG QUERY "%RegKey%" /f "%Pattern%" /k %_Nul6% ^| FIND /I "CurrentVersion"') DO ( REG QUERY "%RegKey%\%%A" /v "CurrentState" %_Nul2% | FIND /I "0x70" %_Nul1% && ( FOR /F "TOKENS=3 DELIMS=-~" %%B IN ('ECHO %%A') DO SET "EditionPKG=%%B" @@ -152,127 +294,251 @@ SET "EditionID=%EditionPKG:~0,-7%" ) ELSE ( FOR /F "TOKENS=3 DELIMS=: " %%A IN ('DISM /English /Online /Get-CurrentEdition %_Nul6% ^| FIND /I "Current Edition :"') DO SET "EditionID=%%A" ) -FOR /F "TOKENS=2 DELIMS==" %%A IN ('"WMIC PATH SoftwareLicensingProduct WHERE (Name LIKE 'Windows%%' AND PartialProductKey is not NULL) GET LicenseFamily /VALUE" %_Nul6%') DO IF NOT ERRORLEVEL 1 SET "EditionWMI=%%A" -IF NOT DEFINED EditionWMI ( -IF %winbuild% GEQ 17063 FOR /F "SKIP=2 TOKENS=3 DELIMS= " %%A IN ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionId') DO SET "EditionID=%%A" -GOTO :Main +net start sppsvc /y %_Nul3% +FOR /F "TOKENS=2 DELIMS==" %%A IN ('"WMIC PATH SoftwareLicensingProduct WHERE (ApplicationID='%_wApp%' %adoff% AND PartialProductKey is not NULL) GET LicenseFamily /VALUE" %_Nul6%') DO SET "EditionWMI=%%A" +IF "%EditionWMI%"=="" ( +IF %winbuild% 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 %winbuild% 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 "%EditionWMI%"=="%%A" GOTO :Main) -SET EditionID=%EditionWMI% -FOR %%A IN (EnterpriseG,EnterpriseGN) DO (IF /I "%EditionID%"=="%%A" SET Win10Gov=1) +IF NOT "%EditionWMI%"=="" SET "EditionID=%EditionWMI%" +IF /I "%EditionID%"=="IoTEnterprise" SET "EditionID=Enterprise" +IF /I "%EditionID%"=="IoTEnterpriseS" SET "EditionID=EnterpriseS" +IF /I "%EditionID%"=="ProfessionalSingleLanguage" SET "EditionID=Professional" +IF /I "%EditionID%"=="ProfessionalCountrySpecific" SET "EditionID=Professional" +IF /I "%EditionID%"=="EnterpriseG" SET Win10Gov=1 +IF /I "%EditionID%"=="EnterpriseGN" SET Win10Gov=1 :Main -echo. -echo Activation Mode: %mode% -if %AUR% EQU 0 if not exist "!_work!\bin\!xOS!.dll" goto :E_DLL -call :StopService sppsvc -if %OsppHook% NEQ 0 call :StopService osppsvc -if %AUR% EQU 0 call :InstallHook - -reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds %_Nul3% && set "_C2R=HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration" -if not defined _C2R reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds %_Nul3% && set "_C2R=HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun\Configuration" -for %%A in (14,15,16,19) do call :officeLoc %%A - -if %AUR% EQU 1 if %External% EQU 0 ( -if %winbuild% GEQ 9200 call :UpdateIFEOEntry SppExtComObj.exe -if %winbuild% LSS 9200 call :UpdateIFEOEntry sppsvc.exe -call :UpdateIFEOEntry osppsvc.exe -) -if %AUR% EQU 1 if %External% EQU 1 ( -call :UpdateOSPPEntry osppsvc.exe -) - -call :SPP -if %ActOffice% NEQ 0 call :OSPP +if defined EditionID (set "_winos=Windows %EditionID% edition") else (set "_winos=Detected Windows") +for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName %_Nul6%') do if not errorlevel 1 set "_winos=%%b" +set "nKMS=does not support KMS activation..." +set "nEval=Evaluation Editions cannot be activated. Please install full Windows OS." +if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*EvalEdition~*.mum" set _eval=1 +if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*EvalEdition~*.mum" set "nEval=Server Evaluation cannot be activated. Please convert to full Server OS." +if exist "%SystemRoot%\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 %_Nul3% && for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath" %_Nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" ( +reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds %_Nul3% && set "_C16R=HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration" +) +if not defined _C16R reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun /v InstallPath %_Nul3% && for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun /v InstallPath" %_Nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" ( +reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds %_Nul3% && set "_C16R=HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun\Configuration" +) +set "_C15R=" +reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun /v InstallPath %_Nul3% && for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun /v InstallPath" %_Nul6%') do if exist "%%b\root\Licenses\ProPlus*.xrm-ms" ( +reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\Configuration /v ProductReleaseIds %_Nul3% && 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 %_Nul3% && call set "_C15R=HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\propertyBag" +) +set "_C14R=" +if %_wow%==0 (reg query HKLM\SOFTWARE\Microsoft\Office\14.0\CVH /f Click2run /k %_Nul3% && set "_C14R=1") else (reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\CVH /f Click2run /k %_Nul3% && set "_C14R=1") +for %%A in (14,15,16,19,21) do call :officeLoc %%A +if %_O14MSI% EQU 1 set "_C14R=" + +set S_OK=1 +call :RunSPP +if %ActOffice% NEQ 0 call :RunOSPP if %ActOffice% EQU 0 (echo.&echo Office activation is OFF...) +if %S_OK% EQU 0 if %External% EQU 0 call :CheckFR +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 if %OsppHook% NEQ 0 call :StopService osppsvc -if %AUR% EQU 0 call :UninstallHook +if %_AUR% EQU 0 call :RemoveHook sc start sppsvc trigger=timer;sessionid=0 %_Nul3% echo. -goto :END +goto :TheEnd -:SPP +:RunSPP set spp=SoftwareLicensingProduct set sps=SoftwareLicensingService set W1nd0ws=1 set WinPerm=0 set WinVL=0 set Off1ce=0 -if %winbuild% GEQ 9200 if %ActOffice% NEQ 0 ( -call :sppoff -if !Off1ce! EQU 0 (echo.&echo !aword! Office 2013/2016/2019 Product Detected...) +set RunR2V=0 +set aC2R21=0 +set aC2R19=0 +set aC2R16=0 +set aC2R15=0 +if %winbuild% GEQ 9200 if %ActOffice% NEQ 0 call :sppoff +wmic path %spp% where (Description like '%%KMSCLIENT%%') get Name /value %_Nul2% | findstr /i Windows %_Nul1% && (set WinVL=1) +if %WinVL% EQU 0 ( +if %ActWindows% EQU 0 ( + echo.&echo Windows activation is OFF... + ) else ( + if %SSppHook% EQU 0 ( + echo.&echo %_winos% %nKMS% + if defined _eval echo %nEval% + ) 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 + ) + ) ) -wmic path %spp% where (Description like '%%KMSCLIENT%%') get Name %_Nul2% | findstr /i Windows %_Nul1% && (set WinVL=1) || (echo.&echo No Supported KMS Client Windows Detected...) -if %Off1ce% EQU 0 if %WinVL% EQU 0 exit /b -if %AUR% EQU 0 ( -reg delete "HKLM\%SPPk%\55c92734-d682-4d71-983e-d6ec3f16059f" /f %_Nul3% -reg delete "HKLM\%SPPk%\0ff1ce15-a989-479d-af46-f275c6370663" /f %_Nul3% +if %WinVL% EQU 0 if %Off1ce% EQU 0 exit /b +if %_AUR% EQU 0 ( +reg delete "HKLM\%SPPk%\%_wApp%" /f %_Null% +rem reg delete "HKLM\%SPPk%\%_oApp%" /f %_Null% +reg delete "HKU\S-1-5-20\%SPPk%\%_wApp%" /f %_Null% +reg delete "HKU\S-1-5-20\%SPPk%\%_oApp%" /f %_Null% ) -wmic path %spp% where (Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL) get Name %_Nul2% | findstr /i Windows %_Nul1% && (set gvlk=1) || (set gvlk=0) +set _gvlk=0 +if %winbuild% GEQ 10240 wmic path %spp% where (ApplicationID='%_wApp%' and Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL) get Name /value %_Nul2% | findstr /i Windows %_Nul1% && (set _gvlk=1) set gpr=0 -if %winbuild% GEQ 10240 if %SkipKMS38% NEQ 0 if %gvlk% EQU 1 for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (Description like '%%KMSCLIENT%%' and Name like 'Windows%%' and PartialProductKey is not NULL) get GracePeriodRemaining /VALUE" %_Nul6%') do set "gpr=%%A" +if %winbuild% GEQ 10240 if %SkipKMS38% NEQ 0 if %_gvlk% EQU 1 for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (ApplicationID='%_wApp%' and Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL) get GracePeriodRemaining /VALUE" %_Nul6%') do set "gpr=%%A" if %gpr% NEQ 0 if %gpr% GTR 259200 ( set W1nd0ws=0 -wmic path %spp% where "Description like '%%KMSCLIENT%%' and Name like 'Windows%%' and PartialProductKey is not NULL" get LicenseFamily %_Nul2% | findstr /i EnterpriseG %_Nul1% && (call set W1nd0ws=1) +wmic path %spp% where "ApplicationID='%_wApp%' and Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL" get LicenseFamily /value %_Nul2% | findstr /i EnterpriseG %_Nul1% && (call set W1nd0ws=1) ) for /f "tokens=2 delims==" %%A in ('"wmic path %sps% get Version /VALUE"') do set ver=%%A -wmic path %sps% where version='%ver%' call SetKeyManagementServiceMachine MachineName="%KMS_IP%" %_Nul3% -wmic path %sps% where version='%ver%' call SetKeyManagementServicePort %KMS_Port% %_Nul3% -if %W1nd0ws% EQU 0 for /f "tokens=2 delims==" %%G in ('"wmic path %spp% where (Description like '%%KMSCLIENT%%' and Name like 'Windows%%') get ID /VALUE"') do (set app=%%G&call :sppchkwin) -if %W1nd0ws% EQU 1 if %ActWindows% NEQ 0 for /f "tokens=2 delims==" %%G in ('"wmic path %spp% where (Description like '%%KMSCLIENT%%' and Name like 'Windows%%') get ID /VALUE"') do (set app=%%G&call :sppchkwin) +reg add "HKLM\%SPPk%" /f /v KeyManagementServiceName /t REG_SZ /d "%KMS_IP%" %_Nul3% +reg add "HKLM\%SPPk%" /f /v KeyManagementServicePort /t REG_SZ /d "%KMS_Port%" %_Nul3% +if %winbuild% GEQ 9200 ( +if not %xOS%==x86 ( +reg add "HKLM\%SPPk%" /f /v KeyManagementServiceName /t REG_SZ /d "%KMS_IP%" /reg:32 %_Nul3% +reg add "HKLM\%SPPk%" /f /v KeyManagementServicePort /t REG_SZ /d "%KMS_Port%" /reg:32 %_Nul3% +reg delete "HKLM\%SPPk%\%_oApp%" /f /reg:32 %_Null% +reg add "HKLM\%SPPk%\%_oApp%" /f /v KeyManagementServiceName /t REG_SZ /d "%KMS_IP%" /reg:32 %_Nul3% +reg add "HKLM\%SPPk%\%_oApp%" /f /v KeyManagementServicePort /t REG_SZ /d "%KMS_Port%" /reg:32 %_Nul3% +) +reg delete "HKLM\%SPPk%\%_oApp%" /f %_Null% +reg add "HKLM\%SPPk%\%_oApp%" /f /v KeyManagementServiceName /t REG_SZ /d "%KMS_IP%" %_Nul3% +reg add "HKLM\%SPPk%\%_oApp%" /f /v KeyManagementServicePort /t REG_SZ /d "%KMS_Port%" %_Nul3% +) +if %W1nd0ws% EQU 0 for /f "tokens=2 delims==" %%G in ('"wmic path %spp% where (ApplicationID='%_wApp%' and Description like '%%KMSCLIENT%%') get ID /VALUE"') do (set app=%%G&call :sppchkwin) +if %W1nd0ws% EQU 1 if %ActWindows% NEQ 0 for /f "tokens=2 delims==" %%G in ('"wmic path %spp% where (ApplicationID='%_wApp%' and Description like '%%KMSCLIENT%%' %adoff%) get ID /VALUE"') do (set app=%%G&call :sppchkwin) +rem if %ESU_EDT% EQU 1 if %ActWindows% NEQ 0 for /f "tokens=2 delims==" %%G in ('"wmic path %spp% where (ApplicationID='%_wApp%' and Description like '%%KMSCLIENT%%' %addon%) get ID /VALUE"') do (set app=%%G&call :esuchk) if %W1nd0ws% EQU 1 if %ActWindows% EQU 0 (echo.&echo Windows activation is OFF...) -if %Off1ce% EQU 1 if %ActOffice% NEQ 0 for /f "tokens=2 delims==" %%G in ('"wmic path %spp% where (Description like '%%KMSCLIENT%%' and Name like 'Office%%') get ID /VALUE"') do (set app=%%G&call :sppchkoff) -if %AUR% EQU 0 ( -call :cKMS %_Nul3% +if %Off1ce% EQU 1 if %ActOffice% NEQ 0 for /f "tokens=2 delims==" %%G in ('"wmic path %spp% where (ApplicationID='%_oApp%' and Description like '%%KMSCLIENT%%') get ID /VALUE"') do (set app=%%G&call :sppchkoff) +if %_AUR% EQU 0 ( call :cREG %_Nul3% ) else ( -wmic path %sps% where version='%ver%' call DisableKeyManagementServiceDnsPublishing 0 %_Nul3% -wmic path %sps% where version='%ver%' call DisableKeyManagementServiceHostCaching 0 %_Nul3% +reg delete "HKLM\%SPPk%" /f /v DisableDnsPublishing %_Null% +reg delete "HKLM\%SPPk%" /f /v DisableKeyManagementServiceHostCaching %_Null% ) exit /b :sppoff -set spp_off15=0&set spp_off16=0&set spp_off19=0 -wmic path %spp% where (Description like '%%KMSCLIENT%%') get Name > "!_temp!\sppchk.txt" 2>&1 -find /i "Office 15" "!_temp!\sppchk.txt" %_Nul1% && (set spp_off15=1) -find /i "Office 16" "!_temp!\sppchk.txt" %_Nul1% && (set spp_off16=1) -find /i "Office 19" "!_temp!\sppchk.txt" %_Nul1% && (set spp_off19=1) -for %%A in (15,16,19) do if !loc_off%%A! EQU 0 set spp_off%%A=0 -set loc_offgl=1 -if %loc_off15% EQU 0 if %loc_off16% EQU 0 if %loc_off19% EQU 0 (set loc_offgl=0) -if %loc_offgl% EQU 1 set Off1ce=1 -set spp_offgl=1 -if %spp_off15% EQU 0 if %spp_off16% EQU 0 if %spp_off19% EQU 0 (set spp_offgl=0) -if %spp_offgl% EQU 0 ( +set OffUWP=0 +if %winbuild% GEQ 10240 reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\msoxmled.exe" %_Nul3% && ( +dir /b "%ProgramFiles%\WindowsApps\Microsoft.Office.Desktop*" %_Nul3% && set OffUWP=1 +if not %xOS%==x86 dir /b "%ProgramW6432%\WindowsApps\Microsoft.Office.Desktop*" %_Nul3% && set OffUWP=1 +) +rem nothing installed +if %loc_off21% EQU 0 if %loc_off19% EQU 0 if %loc_off16% EQU 0 if %loc_off15% EQU 0 ( +if %OffUWP% EQU 0 (echo.&echo No Installed Office 2013-2021 Product Detected...) else (echo.&echo %_mOuwp%) +exit /b +) +set Off1ce=1 +set _sC2R=sppoff +set _fC2R=ReturnSPP +set vol_off15=0&set vol_off16=0&set vol_off19=0&set vol_off21=0 +wmic path %spp% where (Description like '%%KMSCLIENT%%' AND NOT Name like '%%MondoR_KMS_Automation%%') get Name /value > "!_temp!\sppchk.txt" 2>&1 +find /i "Office 21" "!_temp!\sppchk.txt" %_Nul1% && (set vol_off21=1) +find /i "Office 19" "!_temp!\sppchk.txt" %_Nul1% && (set vol_off19=1) +find /i "Office 16" "!_temp!\sppchk.txt" %_Nul1% && (set vol_off16=1) +find /i "Office 15" "!_temp!\sppchk.txt" %_Nul1% && (set vol_off15=1) +for %%A in (15,16,19,21) do if !loc_off%%A! EQU 0 set vol_off%%A=0 +if %vol_off16% EQU 1 find /i "Office16MondoVL_KMS_Client" "!_temp!\sppchk.txt" %_Nul1% && ( +wmic path %spp% where 'ApplicationID="%_oApp%" AND LicenseFamily like "Office16O365%%"' get LicenseFamily /value %_Nul2% | find /i "O365" %_Nul1% || (set vol_off16=0) +) +if %vol_off15% EQU 1 find /i "OfficeMondoVL_KMS_Client" "!_temp!\sppchk.txt" %_Nul1% && ( +wmic path %spp% where 'ApplicationID="%_oApp%" AND LicenseFamily like "OfficeO365%%"' get LicenseFamily /value %_Nul2% | find /i "O365" %_Nul1% || (set vol_off15=0) +) +set ret_off15=0&set ret_off16=0&set ret_off19=0&set ret_off21=0 +wmic path %spp% where (ApplicationID='%_oApp%' AND NOT Name like '%%O365%%') get Name /value > "!_temp!\sppchk.txt" 2>&1 +find /i "R_Retail" "!_temp!\sppchk.txt" %_Nul2% | find /i "Office 21" %_Nul1% && (set ret_off21=1) +find /i "R_Retail" "!_temp!\sppchk.txt" %_Nul2% | find /i "Office 19" %_Nul1% && (set ret_off19=1) +find /i "R_Retail" "!_temp!\sppchk.txt" %_Nul2% | find /i "Office 16" %_Nul1% && (set ret_off16=1) +find /i "R_Retail" "!_temp!\sppchk.txt" %_Nul2% | find /i "Office 15" %_Nul1% && (set ret_off15=1) +if %ret_off21% EQU 1 if %_O16MSI% EQU 0 set vol_off21=0 +if %ret_off19% EQU 1 if %_O16MSI% EQU 0 set vol_off19=0 +if %ret_off16% EQU 1 if %_O16MSI% EQU 0 set vol_off16=0 +if %ret_off15% EQU 1 if %_O15MSI% EQU 0 set vol_off15=0 +set run_off16=0 +if defined _C16R if %loc_off16% EQU 1 if %vol_off16% EQU 0 if %ret_off16% EQU 1 ( +for %%a in (%DO16Ids%) do find /i "Office16%%aR" "!_temp!\sppchk.txt" %_Nul1% && ( + if %vol_off21% EQU 1 find /i "Office21%%a2021VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + if %vol_off19% EQU 1 find /i "Office19%%a2019VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + ) +for %%a in (Professional) do find /i "Office16%%aR" "!_temp!\sppchk.txt" %_Nul1% && ( + if %vol_off21% EQU 1 find /i "Office21ProPlus2021VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + if %vol_off19% EQU 1 find /i "Office19ProPlus2019VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + ) +for %%a in (HomeBusiness,HomeStudent) do find /i "Office16%%aR" "!_temp!\sppchk.txt" %_Nul1% && ( + if %vol_off21% EQU 1 find /i "Office21Standard2021VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + if %vol_off19% EQU 1 find /i "Office19Standard2019VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + ) +) +if defined _C16R if %loc_off16% EQU 1 if %run_off16% EQU 0 wmic path %spp% where (ApplicationID='%_oApp%' AND LicenseFamily like 'Office16O365%%') get LicenseFamily /value %_Nul2% | find /i "O365" %_Nul1% && ( +find /i "Office16MondoVL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 +) +set vol_offgl=1 +if %vol_off21% EQU 0 if %vol_off19% EQU 0 if %vol_off16% EQU 0 if %vol_off15% EQU 0 set vol_offgl=0 +rem mixed Volume + Retail +if %loc_off21% EQU 1 if %vol_off21% EQU 0 if %RunR2V% EQU 0 if %AutoR2V% EQU 1 goto :C2RR2V +if %loc_off19% EQU 1 if %vol_off19% EQU 0 if %RunR2V% EQU 0 if %AutoR2V% EQU 1 goto :C2RR2V +if defined _C16R if %loc_off16% EQU 1 if %vol_off16% EQU 0 if %RunR2V% EQU 0 if %AutoR2V% EQU 1 if %run_off16% EQU 1 goto :C2RR2V +if defined _C15R if %loc_off15% EQU 1 if %vol_off15% EQU 0 if %RunR2V% EQU 0 if %AutoR2V% EQU 1 goto :C2RR2V +if %loc_off16% EQU 0 if %ret_off16% EQU 1 if %_O16MSI% EQU 0 if %OffUWP% EQU 1 (echo.&echo %_mOuwp%) +rem all supported Volume + message for unsupported +if %vol_offgl% EQU 1 ( +if %ret_off16% EQU 1 if %_O16MSI% EQU 1 (echo.&echo %_mO16m%) +if %ret_off15% EQU 1 if %_O15MSI% EQU 1 (echo.&echo %_mO15m%) +exit /b +) set Off1ce=0 -if %loc_offgl% EQU 0 set "aword=No Installed" -if %loc_offgl% EQU 1 set "aword=No Supported KMS Client" +rem Retail C2R +if %RunR2V% EQU 0 if %AutoR2V% EQU 1 goto :C2RR2V +:ReturnSPP +rem Retail MSI/C2R or failed C2R-R2V +if %loc_off21% EQU 1 if %vol_off21% EQU 0 ( +if %aC2R21% EQU 1 (echo.&echo %_mO21a%) else (echo.&echo %_mO21c%) +) +if %loc_off19% EQU 1 if %vol_off19% EQU 0 ( +if %aC2R19% EQU 1 (echo.&echo %_mO19a%) else (echo.&echo %_mO19c%) +) +if %loc_off16% EQU 1 if %vol_off16% EQU 0 ( +if defined _C16R (if %aC2R16% EQU 1 (echo.&echo %_mO16a%) else (echo.&echo %_mO16c%)) else if %_O16MSI% EQU 1 (if %ret_off16% EQU 1 echo.&echo %_mO16m%) +) +if %loc_off15% EQU 1 if %vol_off15% EQU 0 ( +if defined _C15R (if %aC2R15% EQU 1 (echo.&echo %_mO15a%) else (echo.&echo %_mO15c%)) else if %_O15MSI% EQU 1 (if %ret_off15% EQU 1 echo.&echo %_mO15m%) ) exit /b :sppchkoff -wmic path %spp% where ID='%app%' get Name > "!_temp!\sppchk.txt" +wmic path %spp% where ID='%app%' get Name /value > "!_temp!\sppchk.txt" find /i "Office 15" "!_temp!\sppchk.txt" %_Nul1% && (if %loc_off15% EQU 0 exit /b) find /i "Office 16" "!_temp!\sppchk.txt" %_Nul1% && (if %loc_off16% EQU 0 exit /b) find /i "Office 19" "!_temp!\sppchk.txt" %_Nul1% && (if %loc_off19% EQU 0 exit /b) -set office=1 -wmic path %spp% where (PartialProductKey is not NULL) get ID %_Nul2% | findstr /i "%app%" %_Nul1% && (echo.&call :activate %app%&exit /b) +find /i "Office 21" "!_temp!\sppchk.txt" %_Nul1% && (if %loc_off21% EQU 0 exit /b) +if /i '%app%' EQU 'f3fb2d68-83dd-4c8b-8f09-08e0d950ac3b' ( +wmic path %spp% get ID | findstr /i "fbdb3e18-a8ef-4fb3-9183-dffd60bd0984" %_Nul3% && (exit /b) +) +if /i '%app%' EQU '76093b1b-7057-49d7-b970-638ebcbfd873' ( +wmic path %spp% get ID | findstr /i "76881159-155c-43e0-9db7-2d70a9a3a4ca" %_Nul3% && (exit /b) +) +if /i '%app%' EQU 'a3b44174-2451-4cd6-b25f-66638bfb9046' ( +wmic path %spp% get ID | findstr /i "fb61ac9a-1688-45d2-8f6b-0674dbffa33c" %_Nul3% && (exit /b) +) +set _officespp=1 +wmic path %spp% where (PartialProductKey is not NULL) get ID /value %_Nul2% | findstr /i "%app%" %_Nul1% && (echo.&call :activate&exit /b) for /f "tokens=3 delims==, " %%G in ('"wmic path %spp% where ID='%app%' get Name /value"') do set OffVer=%%G call :offchk%OffVer% exit /b :sppchkwin -set office=0 -if %winbuild% GEQ 14393 if %gvlk% EQU 0 wmic path %spp% where (Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL) get Name %_Nul2% | findstr /i Windows %_Nul1% && (set gvlk=1) -wmic path %spp% where ID='%app%' get LicenseStatus %_Nul2% | findstr "1" %_Nul1% && (echo.&call :activate %app%&exit /b) -wmic path %spp% where (PartialProductKey is not NULL) get ID %_Nul2% | findstr /i "%app%" %_Nul1% && (echo.&call :activate %app%&exit /b) -if %gvlk% EQU 1 exit /b +set _officespp=0 +if %winbuild% GEQ 14393 if %WinPerm% EQU 0 if %_gvlk% EQU 0 wmic path %spp% where (ApplicationID='%_wApp%' and Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL) get Name /value %_Nul2% | findstr /i Windows %_Nul1% && (set _gvlk=1) +wmic path %spp% where ID='%app%' get LicenseStatus /value %_Nul2% | findstr "1" %_Nul1% && (echo.&call :activate&exit /b) +wmic path %spp% where (PartialProductKey is not NULL) get ID /value %_Nul2% | findstr /i "%app%" %_Nul1% && (echo.&call :activate&exit /b) +if %winbuild% GEQ 14393 if %_gvlk% EQU 1 exit /b if %WinPerm% EQU 1 exit /b if %winbuild% LSS 10240 (call :winchk&exit /b) for %%A in ( @@ -285,6 +551,9 @@ b71515d9-89a2-4c60-88c8-656fbcca7f3a,af43f7f0-3b1e-4266-a123-1fdb53f4323b,075aca if /i '%app%' EQU '%%A' exit /b ) if not defined EditionID (call :winchk&exit /b) +if %winbuild% LSS 14393 (call :winchk&exit /b) +if /i '%app%' EQU 'ca7df2e3-5ea0-47b8-9ac1-b1be4d8edd69' if /i %EditionID% NEQ CloudEdition exit /b +if /i '%app%' EQU 'd30136fc-cb4b-416e-a23d-87207abc44a9' if /i %EditionID% NEQ CloudEditionN exit /b if /i '%app%' EQU '0df4f814-3f57-4b8b-9a9d-fddadcd69fac' if /i %EditionID% NEQ CloudE exit /b if /i '%app%' EQU 'e0c42288-980c-4788-a014-c080d2e1926e' if /i %EditionID% NEQ Education exit /b if /i '%app%' EQU '73111121-5638-40f6-bc11-f1d7b0d64300' if /i %EditionID% NEQ Enterprise exit /b @@ -301,68 +570,220 @@ if /i '%app%' EQU 'cd918a57-a41b-4c82-8dce-1a538e221a83' if /i %EditionID% NEQ C if /i '%app%' EQU 'ec868e65-fadf-4759-b23e-93fe37f2cc29' if /i %EditionID% NEQ ServerRdsh exit /b if /i '%app%' EQU 'e4db50ea-bda1-4566-b047-0ca50abc6f07' if /i %EditionID% NEQ ServerRdsh exit /b if /i '%app%' EQU 'e4db50ea-bda1-4566-b047-0ca50abc6f07' ( -wmic path %spp% where 'Description like "%%KMSCLIENT%%"' get ID | findstr /i "ec868e65-fadf-4759-b23e-93fe37f2cc29" %_Nul3% && (exit /b) +wmic path %spp% where 'Description like "%%KMSCLIENT%%"' get ID /value | findstr /i "ec868e65-fadf-4759-b23e-93fe37f2cc29" %_Nul3% && (exit /b) ) call :winchk exit /b :winchk if not defined tok (if %winbuild% GEQ 9200 (set "tok=4") else (set "tok=7")) -if not defined wApp set wApp=55c92734-d682-4d71-983e-d6ec3f16059f -wmic path %spp% where (LicenseStatus='1' and Description like '%%KMSCLIENT%%') get Name %_Nul2% | findstr /i "Windows" %_Nul3% && (exit /b) +wmic path %spp% where (LicenseStatus='1' and Description like '%%KMSCLIENT%%' %adoff%) get Name /value %_Nul2% | findstr /i "Windows" %_Nul3% && (exit /b) echo. -wmic path %spp% where (LicenseStatus='1' and GracePeriodRemaining='0' and PartialProductKey is not NULL) get Name %_Nul2% | findstr /i "Windows" %_Nul3% && ( +wmic path %spp% where (LicenseStatus='1' and GracePeriodRemaining='0' %adoff% and PartialProductKey is not NULL) get Name /value %_Nul2% | findstr /i "Windows" %_Nul3% && ( set WinPerm=1 ) if %WinPerm% EQU 0 ( -wmic path %spp% where "ApplicationID='%wApp%' and LicenseStatus='1'" get Name %_Nul2% | findstr /i "Windows" %_Nul3% && ( -for /f "tokens=%tok% delims=, " %%G in ('"wmic path %spp% where (ApplicationID='%wApp%' and LicenseStatus='1') get Description /VALUE"') do set "channel=%%G" +wmic path %spp% where "ApplicationID='%_wApp%' and LicenseStatus='1' %adoff%" get Name /value %_Nul2% | findstr /i "Windows" %_Nul3% && ( +for /f "tokens=%tok% delims=, " %%G in ('"wmic path %spp% where (ApplicationID='%_wApp%' and LicenseStatus='1' %adoff%) get Description /VALUE"') do set "channel=%%G" for %%A in (VOLUME_MAK, RETAIL, OEM_DM, OEM_SLP, OEM_COA, OEM_COA_SLP, OEM_COA_NSLP, OEM_NONSLP, OEM) do if /i "%%A"=="!channel!" set WinPerm=1 ) ) if %WinPerm% EQU 0 ( -copy /y %Windir%\System32\slmgr.vbs "!_temp!\slmgr.vbs" %_Nul3% +copy /y %SysPath%\slmgr.vbs "!_temp!\slmgr.vbs" %_Nul3% cscript //nologo "!_temp!\slmgr.vbs" /xpr %_Nul2% | findstr /i "permanently" %_Nul3% && set WinPerm=1 ) if %WinPerm% EQU 1 ( -for /f "tokens=2 delims==" %%x in ('"wmic path %spp% where (ApplicationID='%wApp%' and LicenseStatus='1') get Name /VALUE"') do echo Checking: %%x +for /f "tokens=2 delims==" %%x in ('"wmic path %spp% where (ApplicationID='%_wApp%' and LicenseStatus='1' %adoff%) get Name /VALUE"') do echo Checking: %%x echo Product is Permanently Activated. exit /b ) -call :insKey %app% +call :insKey exit /b -:OSPP +:esuchk +set _officespp=0 +set ESU_ADD=1 +wmic path %spp% where ID='%app%' get LicenseStatus /value %_Nul2% | findstr "1" %_Nul1% && (echo.&call :activate&exit /b) +if /i '%app%' EQU '3fcc2df2-f625-428d-909a-1f76efc849b6' ( +wmic path %spp% where ID="77db037b-95c3-48d7-a3ab-a9c6d41093e0" get LicenseStatus /value %_Nul2% | findstr "1" %_Nul1% && (exit /b) +) +if /i '%app%' EQU 'dadfcd24-6e37-47be-8f7f-4ceda614cece' ( +wmic path %spp% where ID="0e00c25d-8795-4fb7-9572-3803d91b6880" get LicenseStatus /value %_Nul2% | findstr "1" %_Nul1% && (exit /b) +) +if /i '%app%' EQU '0c29c85e-12d7-4af8-8e4d-ca1e424c480c' ( +wmic path %spp% where ID="4220f546-f522-46df-8202-4d07afd26454" get LicenseStatus /value %_Nul2% | findstr "1" %_Nul1% && (exit /b) +) +if /i '%app%' EQU 'f2b21bfc-a6b0-4413-b4bb-9f06b55f2812' ( +wmic path %spp% where ID="553673ed-6ddf-419c-a153-b760283472fd" get LicenseStatus /value %_Nul2% | findstr "1" %_Nul1% && (exit /b) +) +if /i '%app%' EQU 'bfc078d0-8c7f-475c-8519-accc46773113' ( +wmic path %spp% where ID="04fa0286-fa74-401e-bbe9-fbfbb158010d" get LicenseStatus /value %_Nul2% | findstr "1" %_Nul1% && (exit /b) +) +if /i '%app%' EQU '23c6188f-c9d8-457e-81b6-adb6dacb8779' ( +wmic path %spp% where ID="16c08c85-0c8b-4009-9b2b-f1f7319e45f9" get LicenseStatus /value %_Nul2% | findstr "1" %_Nul1% && (exit /b) +) +if /i '%app%' EQU 'e7cce015-33d6-41c1-9831-022ba63fe1da' ( +wmic path %spp% where ID="8e7bfb1e-acc1-4f56-abae-b80fce56cd4b" get LicenseStatus /value %_Nul2% | findstr "1" %_Nul1% && (exit /b) +) +wmic path %spp% where (PartialProductKey is not NULL) get ID /value %_Nul2% | findstr /i "%app%" %_Nul1% && (echo.&call :activate&exit /b) +call :insKey +exit /b + +:RunOSPP set spp=OfficeSoftwareProtectionProduct set sps=OfficeSoftwareProtectionService -if %winbuild% LSS 9200 (set "aword=2010/2013/2016/2019") else (set "aword=2010") -if %OsppHook% NEQ 1 (echo.&echo No Installed Office %aword% Product Detected...&exit /b) -wmic path %spp% where (Description like '%%KMSCLIENT%%') get Name /VALUE %_Nul3% || (echo.&echo No Supported KMS Client Office %aword% Product Detected...&exit /b) -if %AUR% EQU 0 ( -reg delete "HKLM\%OSPP%\59a52881-a989-479d-af46-f275c6370663" /f %_Nul3% -reg delete "HKLM\%OSPP%\0ff1ce15-a989-479d-af46-f275c6370663" /f %_Nul3% +set Off1ce=0 +set RunR2V=0 +set aC2R21=0 +set aC2R19=0 +set aC2R16=0 +set aC2R15=0 +if %winbuild% LSS 9200 (set "aword=2010-2021") else (set "aword=2010") +if %OsppHook% EQU 0 (echo.&echo No Installed Office %aword% Product Detected...&exit /b) +if %winbuild% GEQ 9200 if %loc_off14% EQU 0 (echo.&echo No Installed Office %aword% Product Detected...&exit /b) +set err_offsvc=0 +net start osppsvc /y %_Nul3% || ( +sc start osppsvc %_Nul3% +if !errorlevel! EQU 1053 set err_offsvc=1 +) +if %err_offsvc% EQU 1 (echo.&echo Error: osppsvc service is not running...&exit /b) +if %winbuild% GEQ 9200 call :win8off +if %winbuild% LSS 9200 call :win7off +if %Off1ce% EQU 0 exit /b +if %_AUR% EQU 0 ( +reg delete "HKLM\%OPPk%\%_oA14%" /f %_Null% +reg delete "HKLM\%OPPk%\%_oApp%" /f %_Null% +) +set "vPrem="&set "vProf=" +if %loc_off14% EQU 1 ( +for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (LicenseFamily='OfficeVisioPrem-MAK') get LicenseStatus /VALUE" %_Nul6%') do set vPrem=%%A +for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (LicenseFamily='OfficeVisioPro-MAK') get LicenseStatus /VALUE" %_Nul6%') do set vProf=%%A ) for /f "tokens=2 delims==" %%A in ('"wmic path %sps% get Version /VALUE" %_Nul6%') do set ver=%%A -wmic path %sps% where version='%ver%' call SetKeyManagementServiceMachine MachineName="%KMS_IP%" %_Nul3% -wmic path %sps% where version='%ver%' call SetKeyManagementServicePort %KMS_Port% %_Nul3% +reg add "HKLM\%OPPk%" /f /v KeyManagementServiceName /t REG_SZ /d "%KMS_IP%" %_Nul3% +reg add "HKLM\%OPPk%" /f /v KeyManagementServicePort /t REG_SZ /d "%KMS_Port%" %_Nul3% for /f "tokens=2 delims==" %%G in ('"wmic path %spp% where (Description like '%%KMSCLIENT%%') get ID /VALUE"') do (set app=%%G&call :osppchk) -if %AUR% EQU 0 ( -call :cKMS %_Nul3% +if %_AUR% EQU 0 ( call :cREG %_Nul3% ) else ( -wmic path %sps% where version='%ver%' call DisableKeyManagementServiceDnsPublishing 0 %_Nul3% -wmic path %sps% where version='%ver%' call DisableKeyManagementServiceHostCaching 0 %_Nul3% +reg delete "HKLM\%OPPk%" /f /v DisableDnsPublishing %_Null% +reg delete "HKLM\%OPPk%" /f /v DisableKeyManagementServiceHostCaching %_Null% +) +exit /b + +:win8off +wmic path %spp% get Description /value %_Nul2% | findstr /i KMSCLIENT %_Nul1% && ( +set Off1ce=1 +exit /b +) +set ret_off14=0 +wmic path %spp% get Description /value %_Nul2% | findstr /i channel %_Nul1% && (set ret_off14=1) +if defined _C14R (echo.&echo %_mO14c%) else if %_O14MSI% EQU 1 (if %ret_off14% EQU 1 echo.&echo %_mO14m%) +exit /b + +:win7off +rem nothing installed +if %loc_off21% EQU 0 if %loc_off19% EQU 0 if %loc_off16% EQU 0 if %loc_off15% EQU 0 if %loc_off14% EQU 0 (echo.&echo No Installed Office %aword% Product Detected...&exit /b) +set Off1ce=1 +set _sC2R=win7off +set _fC2R=ReturnOSPP +set vol_off14=0&set vol_off15=0&set vol_off16=0&set vol_off19=0&set vol_off21=0 +wmic path %spp% where (Description like '%%KMSCLIENT%%' AND NOT Name like '%%MondoR_KMS_Automation%%') get Name /value > "!_temp!\sppchk.txt" 2>&1 +find /i "Office 21" "!_temp!\sppchk.txt" %_Nul1% && (set vol_off21=1) +find /i "Office 19" "!_temp!\sppchk.txt" %_Nul1% && (set vol_off19=1) +find /i "Office 16" "!_temp!\sppchk.txt" %_Nul1% && (set vol_off16=1) +find /i "Office 15" "!_temp!\sppchk.txt" %_Nul1% && (set vol_off15=1) +find /i "Office 14" "!_temp!\sppchk.txt" %_Nul1% && (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 %vol_off16% EQU 1 find /i "Office16MondoVL_KMS_Client" "!_temp!\sppchk.txt" %_Nul1% && ( +wmic path %spp% where 'ApplicationID="%_oApp%" AND LicenseFamily like "Office16O365%%"' get LicenseFamily /value %_Nul2% | find /i "O365" %_Nul1% || (set vol_off16=0) +) +if %vol_off15% EQU 1 find /i "OfficeMondoVL_KMS_Client" "!_temp!\sppchk.txt" %_Nul1% && ( +wmic path %spp% where 'ApplicationID="%_oApp%" AND LicenseFamily like "OfficeO365%%"' get LicenseFamily /value %_Nul2% | find /i "O365" %_Nul1% || (set vol_off15=0) +) +set ret_off14=0&set ret_off15=0&set ret_off16=0&set ret_off19=0&set ret_off21=0 +wmic path %spp% where (ApplicationID='%_oApp%' AND NOT Name like '%%O365%%') get Name /value > "!_temp!\sppchk.txt" 2>&1 +find /i "R_Retail" "!_temp!\sppchk.txt" %_Nul2% | find /i "Office 21" %_Nul1% && (set ret_off21=1) +find /i "R_Retail" "!_temp!\sppchk.txt" %_Nul2% | find /i "Office 19" %_Nul1% && (set ret_off19=1) +find /i "R_Retail" "!_temp!\sppchk.txt" %_Nul2% | find /i "Office 16" %_Nul1% && (set ret_off16=1) +find /i "R_Retail" "!_temp!\sppchk.txt" %_Nul2% | find /i "Office 15" %_Nul1% && (set ret_off15=1) +if %ret_off21% EQU 1 if %_O16MSI% EQU 0 set vol_off21=0 +if %ret_off19% EQU 1 if %_O16MSI% EQU 0 set vol_off19=0 +if %ret_off16% EQU 1 if %_O16MSI% EQU 0 set vol_off16=0 +if %ret_off15% EQU 1 if %_O15MSI% EQU 0 set vol_off15=0 +if %vol_off14% EQU 0 wmic path %spp% where ApplicationID='%_oA14%' get Description /value %_Nul2% | findstr /i channel %_Nul1% && (set ret_off14=1) +set run_off16=0 +if defined _C16R if %loc_off16% EQU 1 if %vol_off16% EQU 0 if %ret_off16% EQU 1 ( +for %%a in (%DO16Ids%) do find /i "Office16%%aR" "!_temp!\sppchk.txt" %_Nul1% && ( + if %vol_off21% EQU 1 find /i "Office21%%a2021VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + if %vol_off19% EQU 1 find /i "Office19%%a2019VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + ) +for %%a in (Professional) do find /i "Office16%%aR" "!_temp!\sppchk.txt" %_Nul1% && ( + if %vol_off21% EQU 1 find /i "Office21ProPlus2021VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + if %vol_off19% EQU 1 find /i "Office19ProPlus2019VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + ) +for %%a in (HomeBusiness,HomeStudent) do find /i "Office16%%aR" "!_temp!\sppchk.txt" %_Nul1% && ( + if %vol_off21% EQU 1 find /i "Office21Standard2021VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + if %vol_off19% EQU 1 find /i "Office19Standard2019VL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 + ) +) +if defined _C16R if %loc_off16% EQU 1 if %run_off16% EQU 0 wmic path %spp% where (ApplicationID='%_oApp%' AND LicenseFamily like 'Office16O365%%') get LicenseFamily /value %_Nul2% | find /i "O365" %_Nul1% && ( +find /i "Office16MondoVL" "!_temp!\sppchk.txt" %_Nul1% || set run_off16=1 +) +set vol_offgl=1 +if %vol_off21% EQU 0 if %vol_off19% EQU 0 if %vol_off16% EQU 0 if %vol_off15% EQU 0 if %vol_off14% EQU 0 set vol_offgl=0 +rem mixed Volume + Retail +if %loc_off21% EQU 1 if %vol_off21% EQU 0 if %RunR2V% EQU 0 if %AutoR2V% EQU 1 goto :C2RR2V +if %loc_off19% EQU 1 if %vol_off19% EQU 0 if %RunR2V% EQU 0 if %AutoR2V% EQU 1 goto :C2RR2V +if defined _C16R if %loc_off16% EQU 1 if %vol_off16% EQU 0 if %RunR2V% EQU 0 if %AutoR2V% EQU 1 if %run_off16% EQU 1 goto :C2RR2V +if defined _C15R if %loc_off15% EQU 1 if %vol_off15% EQU 0 if %RunR2V% EQU 0 if %AutoR2V% EQU 1 goto :C2RR2V +rem all supported Volume + message for unsupported +if %vol_offgl% EQU 1 ( +if %ret_off16% EQU 1 if %_O16MSI% EQU 1 (echo.&echo %_mO16m%) +if %ret_off15% EQU 1 if %_O15MSI% EQU 1 (echo.&echo %_mO15m%) +if %loc_off14% EQU 1 if %vol_off14% EQU 0 (if defined _C14R (echo.&echo %_mO14c%) else if %_O14MSI% EQU 1 (if %ret_off14% EQU 1 echo.&echo %_mO14m%)) +exit /b +) +set Off1ce=0 +rem Retail C2R +if %RunR2V% EQU 0 if %AutoR2V% EQU 1 goto :C2RR2V +:ReturnOSPP +rem Retail MSI/C2R or failed C2R-R2V +if %loc_off21% EQU 1 if %vol_off21% EQU 0 ( +if %aC2R21% EQU 1 (echo.&echo %_mO21a%) else (echo.&echo %_mO21c%) +) +if %loc_off19% EQU 1 if %vol_off19% EQU 0 ( +if %aC2R19% EQU 1 (echo.&echo %_mO19a%) else (echo.&echo %_mO19c%) +) +if %loc_off16% EQU 1 if %vol_off16% EQU 0 ( +if defined _C16R (if %aC2R16% EQU 1 (echo.&echo %_mO16a%) else (echo.&echo %_mO16c%)) else if %_O16MSI% EQU 1 (if %ret_off16% EQU 1 echo.&echo %_mO16m%) +) +if %loc_off15% EQU 1 if %vol_off15% EQU 0 ( +if defined _C15R (if %aC2R15% EQU 1 (echo.&echo %_mO15a%) else (echo.&echo %_mO15c%)) else if %_O15MSI% EQU 1 (if %ret_off15% EQU 1 echo.&echo %_mO15m%) +) +if %loc_off14% EQU 1 if %vol_off14% EQU 0 ( +if defined _C14R (echo.&echo %_mO14c%) else if %_O14MSI% EQU 1 (if %ret_off14% EQU 1 echo.&echo %_mO14m%) ) exit /b :osppchk -wmic path %spp% where ID='%app%' get Name > "!_temp!\osppchk.txt" -find /i "Office 14" "!_temp!\osppchk.txt" %_Nul1% && (if %loc_off14% EQU 0 exit /b) -find /i "Office 15" "!_temp!\osppchk.txt" %_Nul1% && (if %loc_off15% EQU 0 exit /b) -find /i "Office 16" "!_temp!\osppchk.txt" %_Nul1% && (if %loc_off16% EQU 0 exit /b) -find /i "Office 19" "!_temp!\osppchk.txt" %_Nul1% && (if %loc_off19% EQU 0 exit /b) -set office=0 -wmic path %spp% where (PartialProductKey is not NULL) get ID | findstr /i "%app%" %_Nul3% && (echo.&call :activate %app%&exit /b) +wmic path %spp% where ID='%app%' get Name /value > "!_temp!\sppchk.txt" +find /i "Office 14" "!_temp!\sppchk.txt" %_Nul1% && (if %loc_off14% EQU 0 exit /b) +find /i "Office 15" "!_temp!\sppchk.txt" %_Nul1% && (if %loc_off15% EQU 0 exit /b) +find /i "Office 16" "!_temp!\sppchk.txt" %_Nul1% && (if %loc_off16% EQU 0 exit /b) +find /i "Office 19" "!_temp!\sppchk.txt" %_Nul1% && (if %loc_off19% EQU 0 exit /b) +find /i "Office 21" "!_temp!\sppchk.txt" %_Nul1% && (if %loc_off21% EQU 0 exit /b) +if /i '%app%' EQU 'f3fb2d68-83dd-4c8b-8f09-08e0d950ac3b' ( +wmic path %spp% get ID | findstr /i "fbdb3e18-a8ef-4fb3-9183-dffd60bd0984" %_Nul3% && (exit /b) +) +if /i '%app%' EQU '76093b1b-7057-49d7-b970-638ebcbfd873' ( +wmic path %spp% get ID | findstr /i "76881159-155c-43e0-9db7-2d70a9a3a4ca" %_Nul3% && (exit /b) +) +if /i '%app%' EQU 'a3b44174-2451-4cd6-b25f-66638bfb9046' ( +wmic path %spp% get ID | findstr /i "fb61ac9a-1688-45d2-8f6b-0674dbffa33c" %_Nul3% && (exit /b) +) +set _officespp=0 +wmic path %spp% where (PartialProductKey is not NULL) get ID /value %_Nul2% | findstr /i "%app%" %_Nul1% && (echo.&call :activate&exit /b) for /f "tokens=3 delims==, " %%G in ('"wmic path %spp% where ID='%app%' get Name /value"') do set OffVer=%%G call :offchk%OffVer% exit /b @@ -370,21 +791,57 @@ exit /b :offchk set ls=0 set ls2=0 -for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (Name like '%%Office%~2%%') get LicenseStatus /VALUE" %_Nul6%') do set /a ls=%%A -if "%~4" NEQ "" ( -for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (Name like '%%Office%~4%%') get LicenseStatus /VALUE" %_Nul6%') do set /a ls2=%%A +set ls3=0 +for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (LicenseFamily='Office%~1') get LicenseStatus /VALUE" %_Nul6%') do set /a ls=%%A +if "%~3" NEQ "" for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (LicenseFamily='Office%~3') get LicenseStatus /VALUE" %_Nul6%') do set /a ls2=%%A +if "%~5" NEQ "" for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (LicenseFamily='Office%~5') get LicenseStatus /VALUE" %_Nul6%') do set /a ls3=%%A +if "%ls3%" EQU "1" ( +echo Checking: %~6 +echo Product is Permanently Activated. +exit /b ) if "%ls2%" EQU "1" ( -echo Checking: %~5 +echo Checking: %~4 echo Product is Permanently Activated. exit /b ) if "%ls%" EQU "1" ( -echo Checking: %~3 +echo Checking: %~2 echo Product is Permanently Activated. exit /b ) -call :insKey %app% +call :insKey +exit /b + +:offchk21 +if /i '%app%' EQU 'f3fb2d68-83dd-4c8b-8f09-08e0d950ac3b' exit /b +if /i '%app%' EQU '76093b1b-7057-49d7-b970-638ebcbfd873' exit /b +if /i '%app%' EQU 'a3b44174-2451-4cd6-b25f-66638bfb9046' exit /b +if /i '%app%' EQU 'fbdb3e18-a8ef-4fb3-9183-dffd60bd0984' ( +call :offchk "21ProPlus2021VL_MAK_AE1" "Office ProPlus 2021" "21ProPlus2021VL_MAK_AE2" +exit /b +) +if /i '%app%' EQU '080a45c5-9f9f-49eb-b4b0-c3c610a5ebd3' ( +call :offchk "21Standard2021VL_MAK_AE" "Office Standard 2021" +exit /b +) +if /i '%app%' EQU '76881159-155c-43e0-9db7-2d70a9a3a4ca' ( +call :offchk "21ProjectPro2021VL_MAK_AE1" "Project Pro 2021" "21ProjectPro2021VL_MAK_AE2" +exit /b +) +if /i '%app%' EQU '6dd72704-f752-4b71-94c7-11cec6bfc355' ( +call :offchk "21ProjectStd2021VL_MAK_AE" "Project Standard 2021" +exit /b +) +if /i '%app%' EQU 'fb61ac9a-1688-45d2-8f6b-0674dbffa33c' ( +call :offchk "21VisioPro2021VL_MAK_AE" "Visio Pro 2021" +exit /b +) +if /i '%app%' EQU '72fce797-1884-48dd-a860-b2f6a5efd3ca' ( +call :offchk "21VisioStd2021VL_MAK_AE" "Visio Standard 2021" +exit /b +) +call :insKey exit /b :offchk19 @@ -392,233 +849,267 @@ if /i '%app%' EQU '0bc88885-718c-491d-921f-6f214349e79c' exit /b if /i '%app%' EQU 'fc7c4d0c-2e85-4bb9-afd4-01ed1476b5e9' exit /b if /i '%app%' EQU '500f6619-ef93-4b75-bcb4-82819998a3ca' exit /b if /i '%app%' EQU '85dd8b5f-eaa4-4af3-a628-cce9e77c9a03' ( -wmic path %spp% where 'PartialProductKey is not NULL' get ID | findstr /i "0bc88885-718c-491d-921f-6f214349e79c" %_Nul3% && (exit /b) -) -if /i '%app%' EQU '2ca2bf3f-949e-446a-82c7-e25a15ec78c4' ( -wmic path %spp% where 'PartialProductKey is not NULL' get ID | findstr /i "fc7c4d0c-2e85-4bb9-afd4-01ed1476b5e9" %_Nul3% && (exit /b) -) -if /i '%app%' EQU '5b5cf08f-b81a-431d-b080-3450d8620565' ( -wmic path %spp% where 'PartialProductKey is not NULL' get ID | findstr /i "500f6619-ef93-4b75-bcb4-82819998a3ca" %_Nul3% && (exit /b) -) -if /i '%app%' EQU '85dd8b5f-eaa4-4af3-a628-cce9e77c9a03' ( -call :offchk "%app%" "19ProPlus2019VL_MAK_AE" "Office ProPlus 2019" "19ProPlus2019XC2RVL_MAKC2R" "Office ProPlus 2019 C2R" +call :offchk "19ProPlus2019VL_MAK_AE" "Office ProPlus 2019" exit /b ) if /i '%app%' EQU '6912a74b-a5fb-401a-bfdb-2e3ab46f4b02' ( -call :offchk "%app%" "19Standard2019VL_MAK_AE" "Office Standard 2019" +call :offchk "19Standard2019VL_MAK_AE" "Office Standard 2019" exit /b ) if /i '%app%' EQU '2ca2bf3f-949e-446a-82c7-e25a15ec78c4' ( -call :offchk "%app%" "19ProjectPro2019VL_MAK_AE" "Project Pro 2019" "19ProjectPro2019XC2RVL_MAKC2R" "Project Pro 2019 C2R" +call :offchk "19ProjectPro2019VL_MAK_AE" "Project Pro 2019" exit /b ) if /i '%app%' EQU '1777f0e3-7392-4198-97ea-8ae4de6f6381' ( -call :offchk "%app%" "19ProjectStd2019VL_MAK_AE" "Project Standard 2019" +call :offchk "19ProjectStd2019VL_MAK_AE" "Project Standard 2019" exit /b ) if /i '%app%' EQU '5b5cf08f-b81a-431d-b080-3450d8620565' ( -call :offchk "%app%" "19VisioPro2019VL_MAK_AE" "Visio Pro 2019" "19VisioPro2019XC2RVL_MAKC2R" "Visio Pro 2019 C2R" +call :offchk "19VisioPro2019VL_MAK_AE" "Visio Pro 2019" exit /b ) if /i '%app%' EQU 'e06d7df3-aad0-419d-8dfb-0ac37e2bdf39' ( -call :offchk "%app%" "19VisioStd2019VL_MAK_AE" "Visio Standard 2019" +call :offchk "19VisioStd2019VL_MAK_AE" "Visio Standard 2019" exit /b ) -call :insKey %app% +call :insKey exit /b :offchk16 if /i '%app%' EQU 'd450596f-894d-49e0-966a-fd39ed4c4c64' ( -call :offchk "%app%" "16ProPlusVL_MAK" "Office ProPlus 2016" +call :offchk "16ProPlusVL_MAK" "Office ProPlus 2016" exit /b ) if /i '%app%' EQU 'dedfa23d-6ed1-45a6-85dc-63cae0546de6' ( -call :offchk "%app%" "16StandardVL_MAK" "Office Standard 2016" +call :offchk "16StandardVL_MAK" "Office Standard 2016" exit /b ) if /i '%app%' EQU '4f414197-0fc2-4c01-b68a-86cbb9ac254c' ( -call :offchk "%app%" "16ProjectProVL_MAK" "Project Pro 2016" +call :offchk "16ProjectProVL_MAK" "Project Pro 2016" exit /b ) if /i '%app%' EQU 'da7ddabc-3fbe-4447-9e01-6ab7440b4cd4' ( -call :offchk "%app%" "16ProjectStdVL_MAK" "Project Standard 2016" +call :offchk "16ProjectStdVL_MAK" "Project Standard 2016" exit /b ) if /i '%app%' EQU '6bf301c1-b94a-43e9-ba31-d494598c47fb' ( -call :offchk "%app%" "16VisioProVL_MAK" "Visio Pro 2016" +call :offchk "16VisioProVL_MAK" "Visio Pro 2016" exit /b ) if /i '%app%' EQU 'aa2a7821-1827-4c2c-8f1d-4513a34dda97' ( -call :offchk "%app%" "16VisioStdVL_MAK" "Visio Standard 2016" +call :offchk "16VisioStdVL_MAK" "Visio Standard 2016" exit /b ) if /i '%app%' EQU '829b8110-0e6f-4349-bca4-42803577788d' ( -call :offchk "%app%" "16ProjectProXC2RVL_MAKC2R" "Project Pro 2016 C2R" +call :offchk "16ProjectProXC2RVL_MAKC2R" "Project Pro 2016 C2R" exit /b ) if /i '%app%' EQU 'cbbaca45-556a-4416-ad03-bda598eaa7c8' ( -call :offchk "%app%" "16ProjectStdXC2RVL_MAKC2R" "Project Standard 2016 C2R" +call :offchk "16ProjectStdXC2RVL_MAKC2R" "Project Standard 2016 C2R" exit /b ) if /i '%app%' EQU 'b234abe3-0857-4f9c-b05a-4dc314f85557' ( -call :offchk "%app%" "16VisioProXC2RVL_MAKC2R" "Visio Pro 2016 C2R" +call :offchk "16VisioProXC2RVL_MAKC2R" "Visio Pro 2016 C2R" exit /b ) if /i '%app%' EQU '361fe620-64f4-41b5-ba77-84f8e079b1f7' ( -call :offchk "%app%" "16VisioStdXC2RVL_MAKC2R" "Visio Standard 2016 C2R" +call :offchk "16VisioStdXC2RVL_MAKC2R" "Visio Standard 2016 C2R" exit /b ) -call :insKey %app% +call :insKey exit /b :offchk15 if /i '%app%' EQU 'b322da9c-a2e2-4058-9e4e-f59a6970bd69' ( -call :offchk "%app%" "ProPlusVL_MAK" "Office ProPlus 2013" +call :offchk "ProPlusVL_MAK" "Office ProPlus 2013" exit /b ) if /i '%app%' EQU 'b13afb38-cd79-4ae5-9f7f-eed058d750ca' ( -call :offchk "%app%" "StandardVL_MAK" "Office Standard 2013" +call :offchk "StandardVL_MAK" "Office Standard 2013" exit /b ) if /i '%app%' EQU '4a5d124a-e620-44ba-b6ff-658961b33b9a' ( -call :offchk "%app%" "ProjectProVL_MAK" "Project Pro 2013" +call :offchk "ProjectProVL_MAK" "Project Pro 2013" exit /b ) if /i '%app%' EQU '427a28d1-d17c-4abf-b717-32c780ba6f07' ( -call :offchk "%app%" "ProjectStdVL_MAK" "Project Standard 2013" +call :offchk "ProjectStdVL_MAK" "Project Standard 2013" exit /b ) if /i '%app%' EQU 'e13ac10e-75d0-4aff-a0cd-764982cf541c' ( -call :offchk "%app%" "VisioProVL_MAK" "Visio Pro 2013" +call :offchk "VisioProVL_MAK" "Visio Pro 2013" exit /b ) if /i '%app%' EQU 'ac4efaf0-f81f-4f61-bdf7-ea32b02ab117' ( -call :offchk "%app%" "VisioStdVL_MAK" "Visio Standard 2013" +call :offchk "VisioStdVL_MAK" "Visio Standard 2013" exit /b ) -call :insKey %app% +call :insKey exit /b :offchk14 -set "vPrem="&set "vPro=" -for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (Name like '%%OfficeVisioPrem-MAK%%') get LicenseStatus /VALUE" %_Nul6%') do set vPrem=%%A -for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where (Name like '%%OfficeVisioPro-MAK%%') get LicenseStatus /VALUE" %_Nul6%') do set vPro=%%A if /i '%app%' EQU '6f327760-8c5c-417c-9b61-836a98287e0c' ( -call :offchk "%app%" "ProPlus-MAK" "Office ProPlus 2010" "ProPlusAcad-MAK" "Office Professional Academic 2010" +call :offchk "ProPlus-MAK" "Office ProPlus 2010" "ProPlusAcad-MAK" "Office Professional Academic 2010" exit /b ) if /i '%app%' EQU '9da2a678-fb6b-4e67-ab84-60dd6a9c819a' ( -call :offchk "%app%" "Standard-MAK" "Office Standard 2010" +call :offchk "Standard-MAK" "Office Standard 2010" "StandardAcad-MAK" "Office Standard Academic 2010" exit /b ) if /i '%app%' EQU 'ea509e87-07a1-4a45-9edc-eba5a39f36af' ( -call :offchk "%app%" "SmallBusBasics-MAK" "Office Home and Business 2010" +call :offchk "SmallBusBasics-MAK" "Office Small Business Basics 2010" exit /b ) if /i '%app%' EQU 'df133ff7-bf14-4f95-afe3-7b48e7e331ef' ( -call :offchk "%app%" "ProjectPro-MAK" "Project Pro 2010" +call :offchk "ProjectPro-MAK" "Project Pro 2010" exit /b ) if /i '%app%' EQU '5dc7bf61-5ec9-4996-9ccb-df806a2d0efe' ( -call :offchk "%app%" "ProjectStd-MAK" "Project Standard 2010" +call :offchk "ProjectStd-MAK" "Project Standard 2010" "ProjectStd-MAK2" "Project Standard 2010" exit /b ) if /i '%app%' EQU '92236105-bb67-494f-94c7-7f7a607929bd' ( -call :offchk "%app%" "VisioPrem-MAK" "Visio Premium 2010" "VisioPro-MAK" "Visio Pro 2010" +call :offchk "VisioPrem-MAK" "Visio Premium 2010" "VisioPro-MAK" "Visio Pro 2010" exit /b ) if defined vPrem exit /b if /i '%app%' EQU 'e558389c-83c3-4b29-adfe-5e4d7f46c358' ( -call :offchk "%app%" "VisioPro-MAK" "Visio Pro 2010" "VisioStd-MAK" "Visio Standard 2010" +call :offchk "VisioPro-MAK" "Visio Pro 2010" "VisioStd-MAK" "Visio Standard 2010" exit /b ) -if defined vPro exit /b +if defined vProf exit /b if /i '%app%' EQU '9ed833ff-4f92-4f36-b370-8683a4f13275' ( -call :offchk "%app%" "VisioStd-MAK" "Visio Standard 2010" +call :offchk "VisioStd-MAK" "Visio Standard 2010" exit /b ) -call :insKey %app% +call :insKey exit /b :officeLoc set loc_off%1=0 +set _O%1MSI=0 if %1 EQU 19 ( -if defined _C2R reg query %_C2R% /v ProductReleaseIds %_Nul2% | findstr 2019 %_Nul1% && set loc_off%1=1 +if defined _C16R reg query %_C16R% /v ProductReleaseIds %_Nul2% | findstr 2019 %_Nul1% && set loc_off%1=1 +exit /b +) +if %1 EQU 21 ( +if defined _C16R reg query %_C16R% /v ProductReleaseIds %_Nul2% | findstr 2021 %_Nul1% && set loc_off%1=1 exit /b ) -for /f "tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\%1.0\Common\InstallRoot /v Path" %_Nul6%') do if exist "%%b\OSPP.VBS" set loc_off%1=1 -for /f "tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\%1.0\Common\InstallRoot /v Path" %_Nul6%') do if exist "%%b\OSPP.VBS" set loc_off%1=1 +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\%1.0\Common\InstallRoot /v Path" %_Nul6%') do if exist "%%b\OSPP.VBS" ( +set loc_off%1=1 +set _O%1MSI=1 +) +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\%1.0\Common\InstallRoot /v Path" %_Nul6%') do if exist "%%b\OSPP.VBS" ( +set loc_off%1=1 +set _O%1MSI=1 +) -if %1 EQU 16 if defined _C2R ( -for /f "skip=2 tokens=2*" %%a in ('reg query %_C2R% /v ProductReleaseIds') do echo %%b> "!_temp!\c2rchk.txt" -for %%a in (Mondo,ProPlus,Standard,ProjectProX,ProjectStdX,ProjectPro,ProjectStd,VisioProX,VisioStdX,VisioPro,VisioStd,Access,Excel,OneNote,Outlook,PowerPoint,Publisher,SkypeforBusiness,Word) do ( +if %1 EQU 16 if defined _C16R ( +for /f "skip=2 tokens=2*" %%a in ('reg query %_C16R% /v ProductReleaseIds') do echo %%b> "!_temp!\c2rchk.txt" +for %%a in (%LV16Ids%,ProjectProX,ProjectStdX,VisioProX,VisioStdX) do ( findstr /I /C:"%%aVolume" "!_temp!\c2rchk.txt" %_Nul1% && set loc_off%1=1 + ) +for %%a in (%LR16Ids%) do ( findstr /I /C:"%%aRetail" "!_temp!\c2rchk.txt" %_Nul1% && set loc_off%1=1 ) exit /b ) +if %1 EQU 15 if defined _C15R ( +set loc_off%1=1 +exit /b +) + if exist "%ProgramFiles%\Microsoft Office\Office%1\OSPP.VBS" set loc_off%1=1 -if exist "%ProgramFiles(x86)%\Microsoft Office\Office%1\OSPP.VBS" set loc_off%1=1 +if not %xOS%==x86 if exist "%ProgramW6432%\Microsoft Office\Office%1\OSPP.VBS" set loc_off%1=1 +if not %xOS%==x86 if exist "%ProgramFiles(x86)%\Microsoft Office\Office%1\OSPP.VBS" set loc_off%1=1 exit /b :insKey +set S_OK=1 echo. -set "key=" -for /f "tokens=2 delims==" %%A in ('"wmic path %spp% where ID='%1' get Name /VALUE"') do echo Installing Key for: %%A -call :keys %1 -if "%key%" EQU "" (echo Could not find matching KMS Client key&exit /b) -wmic path %sps% where version='%ver%' call InstallProductKey ProductKey="%key%" %_Nul3% +set "_key=" +if %ESU_ADD% EQU 0 for /f "tokens=2 delims==" %%x in ('"wmic path %spp% where ID='%app%' get Name /VALUE"') do echo Installing Key: %%x +if %ESU_ADD% EQU 1 for /f "tokens=2 delims==f" %%x in ('"wmic path %spp% where ID='%app%' get Name /VALUE"') do echo Installing Key: %%x +set ESU_ADD=0 +call :keys %app% +if "%_key%"=="" (echo No associated KMS Client key found&exit /b) +wmic path %sps% where version='%ver%' call InstallProductKey ProductKey="%_key%" %_Nul3% set ERRORCODE=%ERRORLEVEL% if %ERRORCODE% NEQ 0 ( cmd /c exit /b %ERRORCODE% echo Failed: 0x!=ExitCode! +set S_OK=0 exit /b ) +if %sps% EQU SoftwareLicensingService wmic path %sps% where version='%ver%' call RefreshLicenseStatus %_Nul3% :activate -wmic path %spp% where ID='%1' call ClearKeyManagementServiceMachine %_Nul3% -wmic path %spp% where ID='%1' call ClearKeyManagementServicePort %_Nul3% -if %W1nd0ws% EQU 0 if %office% EQU 0 if %sps% EQU SoftwareLicensingService ( -wmic path %spp% where ID='%1' call SetKeyManagementServiceMachine MachineName="127.0.0.2" %_Nul3% -wmic path %spp% where ID='%1' call SetKeyManagementServicePort %KMS_Port% %_Nul3% -for /f "tokens=2 delims==" %%x in ('"wmic path %spp% where ID='%1' get Name /VALUE"') do echo Checking: %%x +set S_OK=1 +if %sps% EQU SoftwareLicensingService ( +if %_officespp% EQU 0 (reg delete "HKLM\%SPPk%\%_wApp%\%app%" /f %_Null%) else (reg delete "HKLM\%SPPk%\%_oApp%\%app%" /f %_Null%) +) else ( +reg delete "HKLM\%OPPk%\%_oA14%\%app%" /f %_Null% +reg delete "HKLM\%OPPk%\%_oApp%\%app%" /f %_Null% +) +if %W1nd0ws% EQU 0 if %_officespp% EQU 0 if %sps% EQU SoftwareLicensingService ( +reg add "HKLM\%SPPk%\%_wApp%\%app%" /f /v KeyManagementServiceName /t REG_SZ /d "127.0.0.2" %_Nul3% +reg add "HKLM\%SPPk%\%_wApp%\%app%" /f /v KeyManagementServicePort /t REG_SZ /d "%KMS_Port%" %_Nul3% +reg add "HKU\S-1-5-20\%SPPk%\%_wApp%\%app%" /f /v DiscoveredKeyManagementServiceIpAddress /t REG_SZ /d "127.0.0.2" %_Nul3% +for /f "tokens=2 delims==" %%x in ('"wmic path %spp% where ID='%app%' get Name /VALUE"') do echo Checking: %%x echo Product is KMS 2038 Activated. exit /b ) -for /f "tokens=2 delims==" %%x in ('"wmic path %spp% where ID='%1' get Name /VALUE"') do echo Activating: %%x -wmic path %spp% where ID='%1' call Activate %_Nul3% +if %ESU_ADD% EQU 0 for /f "tokens=2 delims==" %%x in ('"wmic path %spp% where ID='%app%' get Name /VALUE"') do echo Activating: %%x +if %ESU_ADD% EQU 1 for /f "tokens=2 delims==f" %%x in ('"wmic path %spp% where ID='%app%' get Name /VALUE"') do echo Activating: %%x +set ESU_ADD=0 +wmic path %spp% where ID='%app%' call Activate %_Nul3% call set ERRORCODE=%ERRORLEVEL% -if %ERRORCODE% NEQ 0 ( -if %sps% EQU SoftwareLicensingService (call :StopService sppsvc) else (call :StopService osppsvc) -wmic path %spp% where ID='%1' call Activate %_Nul3% -call set ERRORCODE=!ERRORLEVEL! -) -if %sps% EQU SoftwareLicensingService wmic path %sps% where version='%ver%' call RefreshLicenseStatus %_Nul3% -for /f "tokens=2 delims==" %%x in ('"wmic path %spp% where ID='%1' get GracePeriodRemaining /VALUE"') do (set gpr=%%x&set /a gpr2=%%x/1440) -if %gpr% EQU 43200 if %office% EQU 0 if %winbuild% GEQ 9200 ( -echo Windows Core/ProfessionalWMC Activation Successful -echo Remaining Period: 30 days ^(%gpr% minutes^) +if %ERRORCODE% EQU -1073418187 ( +echo Product Activation Failed: 0xC004F035 +if %OSType% 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 %gpr% EQU 64800 ( -echo Windows Core/ProfessionalWMC Activation Successful -echo Remaining Period: 45 days ^(%gpr% minutes^) +if %ERRORCODE% EQU -1073417728 ( +echo Product Activation Failed: 0xC004F200 +echo Windows needs to rebuild the activation-related files. +echo See KB2736303 for details. exit /b ) -if %gpr% GTR 259200 if %Win10Gov% EQU 1 ( -echo Windows 10 %EditionID% Activation Successful +if %ERRORCODE% NEQ 0 ( +if %sps% EQU SoftwareLicensingService (call :StopService sppsvc) else (call :StopService osppsvc) +wmic path %spp% where ID='%app%' call Activate %_Nul3% +call set ERRORCODE=!ERRORLEVEL! +) +set gpr=0 +set gpr2=0 +for /f "tokens=2 delims==" %%x in ('"wmic path %spp% where ID='%app%' get GracePeriodRemaining /VALUE"') do (set gpr=%%x&set /a "gpr2=(%%x+1440-1)/1440") +if %ERRORCODE% EQU 0 if %gpr% EQU 0 ( +echo Product Activation succeeded, but Remaining Period failed to increase. +if %OSType% EQU Win7 echo This could be related to the error described in KB4487266 +exit /b +) +set Act_OK=0 +if %gpr% EQU 43200 if %_officespp% EQU 0 if %winbuild% GEQ 9200 set Act_OK=1 +if %gpr% EQU 64800 set Act_OK=1 +if %gpr% GTR 259200 if %Win10Gov% EQU 1 set Act_OK=1 +if %gpr% EQU 259200 set Act_OK=1 +if %ERRORCODE% EQU 0 if %Act_OK% EQU 1 ( +echo Product Activation Successful echo Remaining Period: %gpr2% days ^(%gpr% minutes^) exit /b ) -if %gpr% EQU 259200 ( -echo Product Activation Successful -) else ( cmd /c exit /b %ERRORCODE% +if %ERRORCODE% NEQ 0 ( echo Product Activation Failed: 0x!=ExitCode! +) else ( +echo Product Activation Failed ) echo Remaining Period: %gpr2% days ^(%gpr% minutes^) +set S_OK=0 exit /b :StopService @@ -628,33 +1119,54 @@ goto :eof :InstallHook for %%# in (SppExtComObjHookAvrf.dll,SppExtComObjHook.dll,SppExtComObjPatcher.dll,SppExtComObjPatcher.exe) do ( - if exist "%SystemRoot%\system32\%%#" del /f /q "%SystemRoot%\system32\%%#" %_Nul3% + if exist "%SysPath%\%%#" del /f /q "%SysPath%\%%#" %_Nul3% + if exist "%SystemRoot%\SysWOW64\%%#" del /f /q "%SystemRoot%\SysWOW64\%%#" %_Nul3% ) -mklink "%SystemRoot%\system32\SppExtComObjHook.dll" "!_work!\bin\!xOS!.dll" %_Nul3% +set AclReset=0 +set _cphk=0 +if %_AUR% EQU 1 set _cphk=1 +if %_UNC% EQU 1 set _cphk=1 +if %_cphk% EQU 1 ( +WMIC /NAMESPACE:\\root\Microsoft\Windows\Defender PATH MSFT_MpPreference call Add ExclusionPath=%_Hook% Force=True %_Nul3% +copy /y "!_work!\bin\%xOS%.dll" %_Hook% %_Nul3% +goto :skipsym +) +mklink %_Hook% "!_work!\bin\%xOS%.dll" %_Nul3% set ERRORCODE=%ERRORLEVEL% if %ERRORCODE% NEQ 0 goto :E_SYM -set AclReset=0 -icacls "%SystemRoot%\system32\SppExtComObjHook.dll" /findsid *S-1-5-32-545 %_Nul2% | find /i "SppExtComObjHook.dll" %_Nul1% || ( +icacls %_Hook% /findsid *S-1-5-32-545 %_Nul2% | find /i "SppExtComObjHook.dll" %_Nul1% || ( set AclReset=1 -icacls "%SystemRoot%\system32\SppExtComObjHook.dll" /grant *S-1-5-32-545:RX %_Nul3% +icacls %_Hook% /grant *S-1-5-32-545:RX %_Nul3% ) -if %OSType% EQU Win8 call :CreateIFEOEntry SppExtComObj.exe -if %OSType% EQU Win7 if %SppHook% NEQ 0 call :CreateIFEOEntry sppsvc.exe -if %OsppHook% NEQ 0 call :CreateIFEOEntry osppsvc.exe -goto :eof +:skipsym +if %SSppHook% NEQ 0 call :CreateIFEOEntry %SppVer% +if %_AUR% EQU 1 (call :CreateIFEOEntry osppsvc.exe) else (if %OsppHook% NEQ 0 call :CreateIFEOEntry osppsvc.exe) +if %_AUR% EQU 1 if %OSType% EQU Win7 call :CreateIFEOEntry SppExtComObj.exe +goto :ReturnHook -:UninstallHook -if %AclReset% EQU 1 icacls "%SystemRoot%\system32\SppExtComObjHook.dll" /reset %_Nul3% -if exist "%SystemRoot%\system32\SppExtComObjHook.dll" del /f /q "%SystemRoot%\system32\SppExtComObjHook.dll" %_Nul3% -if %OSType% EQU Win8 call :RemoveIFEOEntry SppExtComObj.exe -if %OSType% EQU Win7 if %SppHook% NEQ 0 call :RemoveIFEOEntry sppsvc.exe -if %OsppHook% NEQ 0 call :RemoveIFEOEntry osppsvc.exe +:RemoveHook +if %AclReset% EQU 1 icacls %_Hook% /reset %_Nul3% +for %%# in (SppExtComObjHookAvrf.dll,SppExtComObjHook.dll,SppExtComObjPatcher.dll,SppExtComObjPatcher.exe) do ( + if exist "%SysPath%\%%#" del /f /q "%SysPath%\%%#" %_Nul3% + if exist "%SystemRoot%\SysWOW64\%%#" del /f /q "%SystemRoot%\SysWOW64\%%#" %_Nul3% +) +for %%# in (SppExtComObj.exe,sppsvc.exe,osppsvc.exe) do reg query "%IFEO%\%%#" %_Nul3% && ( + call :RemoveIFEOEntry %%# +) +if %OSType% EQU Win8 schtasks /query /tn "%_TaskEx%" %_Nul3% && ( +schtasks /delete /f /tn "%_TaskEx%" %_Nul3% +) +if %_UNC% EQU 1 ( +WMIC /NAMESPACE:\\root\Microsoft\Windows\Defender PATH MSFT_MpPreference call Remove ExclusionPath=%_Hook% Force=True %_Nul3% +) goto :eof :CreateIFEOEntry -reg delete "%IFEO%\%1" /f /v Debugger %_Nul3% +reg delete "%IFEO%\%1" /f /v Debugger %_Null% reg add "%IFEO%\%1" /f /v VerifierDlls /t REG_SZ /d "SppExtComObjHook.dll" %_Nul3% -reg add "%IFEO%\%1" /f /v GlobalFlag /t REG_DWORD /d 256 %_Nul3% +reg add "%IFEO%\%1" /f /v VerifierDebug /t REG_DWORD /d 0x00000000 %_Nul3% +reg add "%IFEO%\%1" /f /v VerifierFlags /t REG_DWORD /d 0x80000000 %_Nul3% +reg add "%IFEO%\%1" /f /v GlobalFlag /t REG_DWORD /d 0x00000100 %_Nul3% reg add "%IFEO%\%1" /f /v KMS_Emulation /t REG_DWORD /d %KMS_Emulation% %_Nul3% reg add "%IFEO%\%1" /f /v KMS_ActivationInterval /t REG_DWORD /d %KMS_ActivationInterval% %_Nul3% reg add "%IFEO%\%1" /f /v KMS_RenewalInterval /t REG_DWORD /d %KMS_RenewalInterval% %_Nul3% @@ -665,774 +1177,1644 @@ goto :eof :RemoveIFEOEntry if /i %1 NEQ osppsvc.exe ( -reg delete "%IFEO%\%1" /f %_Nul3% +reg delete "%IFEO%\%1" /f %_Null% goto :eof ) -if %OsppHook% NEQ 1 if /i %1 EQU osppsvc.exe ( -reg delete "%IFEO%\%1" /f %_Nul3% -goto :eof +if %OsppHook% EQU 0 ( +reg delete "%IFEO%\%1" /f %_Null% ) -for %%A in (VerifierDlls,GlobalFlag,Debugger,KMS_Emulation,KMS_ActivationInterval,KMS_RenewalInterval,Office2010,Office2013,Office2016,Office2019) do reg delete "%IFEO%\%1" /v %%A /f %_Nul3% -reg delete "HKLM\%OSPP%" /v KeyManagementServiceName /f %_Nul3% -reg delete "HKLM\%OSPP%" /v KeyManagementServicePort /f %_Nul3% +if %OsppHook% NEQ 0 for %%A in (Debugger,VerifierDlls,VerifierDebug,VerifierFlags,GlobalFlag,KMS_Emulation,KMS_ActivationInterval,KMS_RenewalInterval,Office2010,Office2013,Office2016,Office2019) do reg delete "%IFEO%\%1" /v %%A /f %_Null% +reg add "HKLM\%OPPk%" /f /v KeyManagementServiceName /t REG_SZ /d "0.0.0.0" %_Nul3% +reg add "HKLM\%OPPk%" /f /v KeyManagementServicePort /t REG_SZ /d "1688" %_Nul3% goto :eof :UpdateIFEOEntry -reg query "%IFEO%\%1" /v KMS_Emulation %_Nul3% || goto :eof reg add "%IFEO%\%1" /f /v KMS_ActivationInterval /t REG_DWORD /d %KMS_ActivationInterval% %_Nul3% reg add "%IFEO%\%1" /f /v KMS_RenewalInterval /t REG_DWORD /d %KMS_RenewalInterval% %_Nul3% -if /i %1 EQU SppExtComObj.exe if %winbuild% GEQ 9600 reg add "%IFEO%\%1" /f /v KMS_HWID /t REG_QWORD /d "%KMS_HWID%" %_Nul3% +if /i %1 EQU SppExtComObj.exe if %winbuild% GEQ 9600 ( +reg add "%IFEO%\%1" /f /v KMS_HWID /t REG_QWORD /d "%KMS_HWID%" %_Nul3% +) +if /i %1 EQU sppsvc.exe ( +reg add "%IFEO%\SppExtComObj.exe" /f /v KMS_ActivationInterval /t REG_DWORD /d %KMS_ActivationInterval% %_Nul3% +reg add "%IFEO%\SppExtComObj.exe" /f /v KMS_RenewalInterval /t REG_DWORD /d %KMS_RenewalInterval% %_Nul3% +) :UpdateOSPPEntry if /i %1 EQU osppsvc.exe ( -reg add "HKLM\%OSPP%" /f /v KeyManagementServiceName /t REG_SZ /d %KMS_IP% %_Nul3% -reg add "HKLM\%OSPP%" /f /v KeyManagementServicePort /t REG_SZ /d %KMS_Port% %_Nul3% +reg add "HKLM\%OPPk%" /f /v KeyManagementServiceName /t REG_SZ /d "%KMS_IP%" %_Nul3% +reg add "HKLM\%OPPk%" /f /v KeyManagementServicePort /t REG_SZ /d "%KMS_Port%" %_Nul3% ) goto :eof -:cKMS -wmic path %sps% where version='%ver%' call ClearKeyManagementServiceMachine -wmic path %sps% where version='%ver%' call ClearKeyManagementServicePort -wmic path %sps% where version='%ver%' call DisableKeyManagementServiceDnsPublishing 1 -wmic path %sps% where version='%ver%' call DisableKeyManagementServiceHostCaching 1 +:CheckFR +if not exist %_Hook% ( +echo. +echo %_err% +echo File existence failed. +echo "%SystemRoot%\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 %_Hook% SHA1^|findstr /i /v CertUtil') do set "_hash=%%#" +set "_hash=%_hash: =%" +if /i not "%_hash%"=="%_orig%" ( +echo. +echo === WARNING === +echo SHA1 hash verification mismatch. +echo "%SystemRoot%\System32\SppExtComObjHook.dll" +echo Expected: %_orig% +echo Detected: %_hash% +echo. +echo If you compiled the file yourself, then ignore this message. +) + +set E_REG=0 +if %SSppHook% NEQ 0 for %%A in (VerifierDlls,VerifierDebug,VerifierFlags,GlobalFlag,KMS_Emulation) do ( +reg query "%IFEO%\%SppVer%" /v %%A %_Nul3% || set E_REG=1 +) +if %E_REG% EQU 1 ( +echo. +echo %_err% +echo Some or all required registry values are missing. +echo [%IFEO%\%SppVer%] +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 %OsppHook% NEQ 0 for %%A in (VerifierDlls,VerifierDebug,VerifierFlags,GlobalFlag,KMS_Emulation) do ( +reg query "%IFEO%\osppsvc.exe" /v %%A %_Nul3% || set E_REG=1 +) +if %E_REG% EQU 1 ( +echo. +echo %_err% +echo Some or all required registry values are missing. +echo [%IFEO%\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 %_Nul6%') do if /i %%b equ 0x4 set E_WMI=1 +wmic /locale:ms_409 computersystem get Name /value %_Nul2% | find /i "Name" %_Nul1% +if %errorlevel% NEQ 0 set E_WMI=1 +wmic /locale:ms_409 path SoftwareLicensingService get Version /value %_Nul2% | find /i "Version" %_Nul1% +if %errorlevel% NEQ 0 set E_WMI=1 +if %E_WMI% EQU 1 ( +echo. +echo %_err% +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 :cREG -reg delete "HKLM\%SPPk%\55c92734-d682-4d71-983e-d6ec3f16059f" /f -reg delete "HKLM\%SPPk%\0ff1ce15-a989-479d-af46-f275c6370663" /f -reg delete "HKLM\%SPPk%" /f /v KeyManagementServiceName -reg delete "HKLM\%SPPk%" /f /v KeyManagementServicePort -reg delete "HKU\S-1-5-20\%SPPk%\55c92734-d682-4d71-983e-d6ec3f16059f" /f -reg delete "HKU\S-1-5-20\%SPPk%\0ff1ce15-a989-479d-af46-f275c6370663" /f -reg delete "HKLM\%OSPP%\59a52881-a989-479d-af46-f275c6370663" /f -reg delete "HKLM\%OSPP%\0ff1ce15-a989-479d-af46-f275c6370663" /f -reg delete "HKLM\%OSPP%" /f /v KeyManagementServiceName -reg delete "HKLM\%OSPP%" /f /v KeyManagementServicePort -if %OsppHook% NEQ 1 ( -reg delete "HKLM\%OSPP%" /f -reg delete "HKU\S-1-5-20\%OSPP%" /f +reg add "HKLM\%SPPk%" /f /v KeyManagementServiceName /t REG_SZ /d "0.0.0.0" +reg add "HKLM\%SPPk%" /f /v KeyManagementServicePort /t REG_SZ /d "1688" +reg delete "HKLM\%SPPk%" /f /v DisableDnsPublishing +reg delete "HKLM\%SPPk%" /f /v DisableKeyManagementServiceHostCaching +reg delete "HKLM\%SPPk%\%_wApp%" /f +if %winbuild% GEQ 9200 ( +if not %xOS%==x86 ( +reg add "HKLM\%SPPk%" /f /v KeyManagementServiceName /t REG_SZ /d "0.0.0.0" /reg:32 +reg add "HKLM\%SPPk%" /f /v KeyManagementServicePort /t REG_SZ /d "1688" /reg:32 +reg delete "HKLM\%SPPk%\%_oApp%" /f /reg:32 +reg add "HKLM\%SPPk%\%_oApp%" /f /v KeyManagementServiceName /t REG_SZ /d "0.0.0.0" /reg:32 +reg add "HKLM\%SPPk%\%_oApp%" /f /v KeyManagementServicePort /t REG_SZ /d "1688" /reg:32 +) +reg delete "HKLM\%SPPk%\%_oApp%" /f +reg add "HKLM\%SPPk%\%_oApp%" /f /v KeyManagementServiceName /t REG_SZ /d "0.0.0.0" +reg add "HKLM\%SPPk%\%_oApp%" /f /v KeyManagementServicePort /t REG_SZ /d "1688" ) +if %winbuild% GEQ 9600 ( +reg delete "HKU\S-1-5-20\%SPPk%\%_wApp%" /f +reg delete "HKU\S-1-5-20\%SPPk%\%_oApp%" /f +) +if %OsppHook% EQU 0 ( +goto :eof +) +reg add "HKLM\%OPPk%" /f /v KeyManagementServiceName /t REG_SZ /d "0.0.0.0" +reg delete "HKLM\%OPPk%" /f /v KeyManagementServicePort +reg delete "HKLM\%OPPk%" /f /v DisableDnsPublishing +reg delete "HKLM\%OPPk%" /f /v DisableKeyManagementServiceHostCaching +reg delete "HKLM\%OPPk%\%_oA14%" /f +reg delete "HKLM\%OPPk%\%_oApp%" /f goto :eof +:C2RR2V +set RunR2V=1 +set "_SLMGR=%SysPath%\slmgr.vbs" +if %_Debug% EQU 0 ( +set "_cscript=cscript //Nologo //B" +) else ( +set "_cscript=cscript //Nologo" +) +set _LTSC=0 +set "_tag="&set "_ons= 2016" +sc query ClickToRunSvc %_Nul3% +set error1=%errorlevel% +sc query OfficeSvc %_Nul3% +set error2=%errorlevel% +if %error1% EQU 1060 if %error2% EQU 1060 ( +goto :%_fC2R% +) +set _Office16=0 +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath" %_Nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" ( + set _Office16=1 +) +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun /v InstallPath" %_Nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" ( + set _Office16=1 +) +set _Office15=0 +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun /v InstallPath" %_Nul6%') do if exist "%%b\root\Licenses\ProPlus*.xrm-ms" ( + set _Office15=1 +) +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\ClickToRun /v InstallPath" %_Nul6%') do if exist "%%b\root\Licenses\ProPlus*.xrm-ms" ( + set _Office15=1 +) +if %_Office16% EQU 0 if %_Office15% EQU 0 ( +goto :%_fC2R% +) + +:Reg16istry +if %_Office16% EQU 0 goto :Reg15istry +set "_InstallRoot=" +set "_ProductIds=" +set "_GUID=" +set "_Config=" +set "_PRIDs=" +set "_LicensesPath=" +set "_Integrator=" +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath" %_Nul6%') do (set "_InstallRoot=%%b\root") +if not "%_InstallRoot%"=="" ( + for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v PackageGUID" %_Nul6%') do (set "_GUID=%%b") + for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds" %_Nul6%') do (set "_ProductIds=%%b") + set "_Config=HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration" + set "_PRIDs=HKLM\SOFTWARE\Microsoft\Office\ClickToRun\ProductReleaseIDs" +) else ( + for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun /v InstallPath" %_Nul6%') do (set "_InstallRoot=%%b\root") + for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun /v PackageGUID" %_Nul6%') do (set "_GUID=%%b") + for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun\Configuration /v ProductReleaseIds" %_Nul6%') do (set "_ProductIds=%%b") + set "_Config=HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun\Configuration" + set "_PRIDs=HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun\ProductReleaseIDs" +) +set "_LicensesPath=%_InstallRoot%\Licenses16" +set "_Integrator=%_InstallRoot%\integration\integrator.exe" +for /f "skip=2 tokens=2*" %%a in ('"reg query %_PRIDs% /v ActiveConfiguration" %_Nul6%') do set "_PRIDs=%_PRIDs%\%%b" +if "%_ProductIds%"=="" ( +if %_Office15% EQU 0 (goto :%_fC2R%) else (goto :Reg15istry) +) +if not exist "%_LicensesPath%\ProPlus*.xrm-ms" ( +if %_Office15% EQU 0 (goto :%_fC2R%) else (goto :Reg15istry) +) +if not exist "%_Integrator%" ( +if %_Office15% EQU 0 (goto :%_fC2R%) else (goto :Reg15istry) +) +if exist "%_LicensesPath%\Word2019VL_KMS_Client_AE*.xrm-ms" (set "_tag=2019"&set "_ons= 2019") +if exist "%_LicensesPath%\Word2021VL_KMS_Client_AE*.xrm-ms" (set _LTSC=1) +if %winbuild% LSS 10240 if !_LTSC! EQU 1 (set "_tag=2021"&set "_ons= 2021") +if %_Office15% EQU 0 goto :CheckC2R + +:Reg15istry +set "_Install15Root=" +set "_Product15Ids=" +set "_Con15fig=" +set "_PR15IDs=" +set "_OSPP15Ready=" +set "_Licenses15Path=" +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun /v InstallPath" %_Nul6%') do (set "_Install15Root=%%b\root") +if not "%_Install15Root%"=="" ( + for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\Configuration /v ProductReleaseIds" %_Nul6%') do (set "_Product15Ids=%%b") + set "_Con15fig=HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\Configuration /v ProductReleaseIds" + set "_PR15IDs=HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\ProductReleaseIDs" + set "_OSPP15Ready=HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\Configuration" +) else ( + for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\ClickToRun /v InstallPath" %_Nul6%') do (set "_Install15Root=%%b\root") + for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\ClickToRun\Configuration /v ProductReleaseIds" %_Nul6%') do (set "_Product15Ids=%%b") + set "_Con15fig=HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\ClickToRun\Configuration /v ProductReleaseIds" + set "_PR15IDs=HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\ClickToRun\ProductReleaseIDs" + set "_OSPP15Ready=HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\ClickToRun\Configuration" +) +set "_OSPP15ReadT=REG_SZ" +if "%_Product15Ids%"=="" ( +reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\propertyBag /v productreleaseid %_Nul3% && ( + for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\propertyBag /v productreleaseid" %_Nul6%') do (set "_Product15Ids=%%b") + set "_Con15fig=HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\propertyBag /v productreleaseid" + set "_OSPP15Ready=HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun" + set "_OSPP15ReadT=REG_DWORD" + ) +reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\ClickToRun\propertyBag /v productreleaseid %_Nul3% && ( + for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\ClickToRun\propertyBag /v productreleaseid" %_Nul6%') do (set "_Product15Ids=%%b") + set "_Con15fig=HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\ClickToRun\propertyBag /v productreleaseid" + set "_OSPP15Ready=HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\ClickToRun" + set "_OSPP15ReadT=REG_DWORD" + ) +) +set "_Licenses15Path=%_Install15Root%\Licenses" +if exist "%ProgramFiles%\Microsoft Office\Office15\OSPP.VBS" ( + set "_OSPP15VBS=%ProgramFiles%\Microsoft Office\Office15\OSPP.VBS" +) else if exist "%ProgramW6432%\Microsoft Office\Office15\OSPP.VBS" ( + set "_OSPP15VBS=%ProgramW6432%\Microsoft Office\Office15\OSPP.VBS" +) else if exist "%ProgramFiles(x86)%\Microsoft Office\Office15\OSPP.VBS" ( + set "_OSPP15VBS=%ProgramFiles(x86)%\Microsoft Office\Office15\OSPP.VBS" +) +if "%_Product15Ids%"=="" ( +if %_Office16% EQU 0 (goto :%_fC2R%) else (goto :CheckC2R) +) +if not exist "%_Licenses15Path%\ProPlus*.xrm-ms" ( +if %_Office16% EQU 0 (goto :%_fC2R%) else (goto :CheckC2R) +) +if %winbuild% LSS 9200 if not exist "%_OSPP15VBS%" ( +if %_Office16% EQU 0 (goto :%_fC2R%) else (goto :CheckC2R) +) + +:CheckC2R +set _OMSI=0 +if %_Office16% EQU 0 ( +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\16.0\Common\InstallRoot /v Path" %_Nul6%') do if exist "%%b\OSPP.VBS" set _OMSI=1 +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\16.0\Common\InstallRoot /v Path" %_Nul6%') do if exist "%%b\OSPP.VBS" set _OMSI=1 +) +if %_Office15% EQU 0 ( +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\15.0\Common\InstallRoot /v Path" %_Nul6%') do if exist "%%b\OSPP.VBS" set _OMSI=1 +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Common\InstallRoot /v Path" %_Nul6%') do if exist "%%b\OSPP.VBS" set _OMSI=1 +) +if %winbuild% GEQ 9200 ( +set _spp=SoftwareLicensingProduct +set _sps=SoftwareLicensingService +set "_vbsi=%_SLMGR% /ilc " +) else ( +set _spp=OfficeSoftwareProtectionProduct +set _sps=OfficeSoftwareProtectionService +set _vbsi="!_OSPP15VBS!" /inslic: +) +set "_wmi=" +for /f "tokens=2 delims==" %%# in ('"wmic path %_sps% get version /value" %_Nul6%') do set "_wmi=%%#" +if "%_wmi%"=="" ( +goto :%_fC2R% +) +set _Identity=0 +set _vNext=0 +set sub_O365=0 +set sub_proj=0 +set sub_vis=0 +dir /b /s /a:-d "!_Local!\Microsoft\Office\Licenses\*1*" %_Nul3% && set _Identity=1 +dir /b /s /a:-d "!ProgramData!\Microsoft\Office\Licenses\*1*" %_Nul3% && set _Identity=1 +set kNext=HKCU\SOFTWARE\Microsoft\Office\16.0\Common\Licensing\LicensingNext +if %_Identity% EQU 1 reg query %kNext% /v MigrationToV5Done %_Nul2% | find /i "0x1" %_Nul1% && set _vNext=1 +if %_vNext% EQU 1 ( +reg query %kNext% | findstr /i /r ".*retail" %_Nul2% | findstr /i /v "project visio" %_Nul2% | find /i "0x2" %_Nul1% && (set sub_O365=1) +reg query %kNext% | findstr /i /r ".*retail" %_Nul2% | findstr /i /v "project visio" %_Nul2% | find /i "0x3" %_Nul1% && (set sub_O365=1) +reg query %kNext% | findstr /i /r ".*volume" %_Nul2% | findstr /i /v "project visio" %_Nul2% | find /i "0x2" %_Nul1% && (set sub_O365=1) +reg query %kNext% | findstr /i /r ".*volume" %_Nul2% | findstr /i /v "project visio" %_Nul2% | find /i "0x3" %_Nul1% && (set sub_O365=1) +reg query %kNext% | findstr /i /r "project.*" %_Nul2% | find /i "0x2" %_Nul1% && set sub_proj=1 +reg query %kNext% | findstr /i /r "project.*" %_Nul2% | find /i "0x3" %_Nul1% && set sub_proj=1 +reg query %kNext% | findstr /i /r "visio.*" %_Nul2% | find /i "0x2" %_Nul1% && set sub_vis=1 +reg query %kNext% | findstr /i /r "visio.*" %_Nul2% | find /i "0x3" %_Nul1% && set sub_vis=1 +) +set _Retail=0 +wmic path %_spp% where "ApplicationID='%_oApp%' AND LicenseStatus='1' AND PartialProductKey<>NULL" get Description %_Nul2% |findstr /V /R "^$" >"!_temp!\crvRetail.txt" +find /i "RETAIL channel" "!_temp!\crvRetail.txt" %_Nul1% && set _Retail=1 +find /i "RETAIL(MAK) channel" "!_temp!\crvRetail.txt" %_Nul1% && set _Retail=1 +find /i "TIMEBASED_SUB channel" "!_temp!\crvRetail.txt" %_Nul1% && set _Retail=1 +set "_copp=" +if exist "%SysPath%\msvcr100.dll" ( +set _copp=1 +) else if exist "!_InstallRoot!\vfs\System\msvcr100.dll" ( +set _copp="!_InstallRoot!\vfs\System" +) else if exist "!_Install15Root!\vfs\System\msvcr100.dll" ( +set _copp="!_Install15Root!\vfs\System" +) else if exist "%SystemRoot%\SysWOW64\msvcr100.dll" ( +set _copp=1 +set xBit=x86 +) else if exist "!_InstallRoot!\vfs\SystemX86\msvcr100.dll" ( +set _copp="!_InstallRoot!\vfs\SystemX86" +set xBit=x86 +) else if exist "!_Install15Root!\vfs\SystemX86\msvcr100.dll" ( +set _copp="!_Install15Root!\vfs\SystemX86" +set xBit=x86 +) +if not exist "!_work!\bin\cleanospp%xBit%.exe" ( +set "_copp=" +) +if %_Identity% EQU 0 if %_Retail% EQU 0 if %_OMSI% EQU 0 if defined _copp ( +if "!_copp!"=="1" ( +%_Nul3% "!_work!\bin\cleanospp%xBit%.exe" -Licenses +) else ( +pushd %_copp% +%_Nul3% copy /y "!_work!\bin\cleanospp%xBit%.exe" cleanospp.exe +%_Nul3% cleanospp.exe -Licenses +%_Nul3% del /f /q cleanospp.exe +popd + ) +) +set _O16O365=0 +set _C16Msg=0 +set _C15Msg=0 +if %_Retail% EQU 1 wmic path %_spp% where "ApplicationID='%_oApp%' AND LicenseStatus='1' AND PartialProductKey<>NULL" get LicenseFamily %_Nul2% |findstr /V /R "^$" >"!_temp!\crvRetail.txt" +wmic path %_spp% where "ApplicationID='%_oApp%'" get LicenseFamily %_Nul2% |findstr /V /R "^$" >"!_temp!\crvVolume.txt" 2>&1 + +if %_Office16% EQU 0 goto :R15V + +set _O21Ids=ProPlus2021,ProjectPro2021,VisioPro2021,Standard2021,ProjectStd2021,VisioStd2021,Access2021,SkypeforBusiness2021 +set _O19Ids=ProPlus2019,ProjectPro2019,VisioPro2019,Standard2019,ProjectStd2019,VisioStd2019,Access2019,SkypeforBusiness2019 +set _O16Ids=ProjectPro,VisioPro,Standard,ProjectStd,VisioStd,Access,SkypeforBusiness +set _A21Ids=Excel2021,Outlook2021,PowerPoint2021,Publisher2021,Word2021 +set _A19Ids=Excel2019,Outlook2019,PowerPoint2019,Publisher2019,Word2019 +set _A16Ids=Excel,Outlook,PowerPoint,Publisher,Word +set _V21Ids=%_O21Ids%,%_A21Ids% +set _V19Ids=%_O19Ids%,%_A19Ids% +set _V16Ids=Mondo,%_O16Ids%,%_A16Ids%,OneNote +set _R16Ids=%_V16Ids%,Professional,HomeBusiness,HomeStudent,O365ProPlus,O365Business,O365SmallBusPrem,O365HomePrem,O365EduCloud +set _RetIds=%_V21Ids%,Professional2021,HomeBusiness2021,HomeStudent2021,%_V19Ids%,Professional2019,HomeBusiness2019,HomeStudent2019,%_R16Ids% +set _Suites=Mondo,O365ProPlus,O365Business,O365SmallBusPrem,O365HomePrem,O365EduCloud,ProPlus,Standard,Professional,HomeBusiness,HomeStudent,ProPlus2019,Standard2019,Professional2019,HomeBusiness2019,HomeStudent2019,ProPlus2021,Standard2021,Professional2021,HomeBusiness2021,HomeStudent2021 +set _PrjSKU=ProjectPro,ProjectStd,ProjectPro2019,ProjectStd2019,ProjectPro2021,ProjectStd2021 +set _VisSKU=VisioPro,VisioStd,VisioPro2019,VisioStd2019,VisioPro2021,VisioStd2021 + +echo %_ProductIds%>"!_temp!\crvProductIds.txt" +for %%a in (%_RetIds%,ProPlus) do ( +set _%%a=0 +) +for %%a in (%_RetIds%) do ( +findstr /I /C:"%%aRetail" "!_temp!\crvProductIds.txt" %_Nul1% && set _%%a=1 +) +if !_LTSC! EQU 0 for %%a in (%_V21Ids%) do ( +set _%%a=0 +) +if !_LTSC! EQU 1 for %%a in (%_V21Ids%) do ( +findstr /I /C:"%%aVolume" "!_temp!\crvProductIds.txt" %_Nul1% && ( + find /i "Office21%%aVL_KMS_Client" "!_temp!\crvVolume.txt" %_Nul1% && (set _%%a=0) || (set _%%a=1) + ) +) +for %%a in (%_V19Ids%) do ( +findstr /I /C:"%%aVolume" "!_temp!\crvProductIds.txt" %_Nul1% && ( + find /i "Office19%%aVL_KMS_Client" "!_temp!\crvVolume.txt" %_Nul1% && (set _%%a=0) || (set _%%a=1) + ) +) +for %%a in (%_V16Ids%) do ( +findstr /I /C:"%%aVolume" "!_temp!\crvProductIds.txt" %_Nul1% && ( + find /i "Office16%%aVL_KMS_Client" "!_temp!\crvVolume.txt" %_Nul1% && (set _%%a=0) || (set _%%a=1) + ) +) +reg query %_PRIDs%\ProPlusRetail.16 %_Nul3% && ( + find /i "Office16ProPlusVL_KMS_Client" "!_temp!\crvVolume.txt" %_Nul1% && (set _ProPlus=0) || (set _ProPlus=1) +) +reg query %_PRIDs%\ProPlusVolume.16 %_Nul3% && ( + find /i "Office16ProPlusVL_KMS_Client" "!_temp!\crvVolume.txt" %_Nul1% && (set _ProPlus=0) || (set _ProPlus=1) +) +if %_Retail% EQU 1 for %%a in (%_RetIds%) do ( +findstr /I /C:"%%aRetail" "!_temp!\crvProductIds.txt" %_Nul1% && ( + find /i "Office16%%aR_Retail" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office16%%aR_OEM" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office16%%aR_Sub" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office16%%aR_PIN" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office16%%aE5R_" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office16%%aEDUR_" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office16%%aMSDNR_" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office16%%aO365R_" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office16%%aCO365R_" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office16%%aVL_MAK" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office16%%aXC2RVL_MAKC2R" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R16=1) + find /i "Office19%%aR_Retail" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R19=1) + find /i "Office19%%aR_OEM" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R19=1) + find /i "Office19%%aMSDNR_" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R19=1) + find /i "Office19%%aVL_MAK" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R19=1) + find /i "Office21%%aR_Retail" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R21=1) + find /i "Office21%%aR_OEM" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R21=1) + find /i "Office21%%aMSDNR_" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R21=1) + find /i "Office21%%aVL_MAK" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R21=1) + ) +) +if %_Retail% EQU 1 reg query %_PRIDs%\ProPlusRetail.16 %_Nul3% && ( + find /i "Office16ProPlusR_Retail" "!_temp!\crvRetail.txt" %_Nul1% && (set _ProPlus=0 & set aC2R16=1) + find /i "Office16ProPlusR_OEM" "!_temp!\crvRetail.txt" %_Nul1% && (set _ProPlus=0 & set aC2R16=1) + find /i "Office16ProPlusMSDNR_" "!_temp!\crvRetail.txt" %_Nul1% && (set _ProPlus=0 & set aC2R16=1) + find /i "Office16ProPlusVL_MAK" "!_temp!\crvRetail.txt" %_Nul1% && (set _ProPlus=0 & set aC2R16=1) +) +find /i "Office16MondoVL_KMS_Client" "!_temp!\crvVolume.txt" %_Nul1% && ( +wmic path %spp% where 'ApplicationID="%_oApp%" AND LicenseFamily like "Office16O365%%"' get LicenseFamily /value %_Nul2% | find /i "O365" %_Nul1% && ( + for %%a in (O365ProPlus,O365Business,O365SmallBusPrem,O365HomePrem,O365EduCloud) do set _%%a=0 + ) +) +if %sub_O365% EQU 1 ( + for %%a in (%_Suites%) do set _%%a=0 +echo. +echo Microsoft 365 product is activated with a subscription. +) +if %sub_proj% EQU 1 ( + for %%a in (%_PrjSKU%) do set _%%a=0 +echo. +echo Microsoft Project is activated with a subscription. +) +if %sub_vis% EQU 1 ( + for %%a in (%_VisSKU%) do set _%%a=0 +echo. +echo Microsoft Visio is activated with a subscription. +) + +for %%a in (%_RetIds%,ProPlus) do if !_%%a! EQU 1 ( +set _C16Msg=1 +) +if %_C16Msg% EQU 1 ( +echo. +echo Converting Office C2R Retail-to-Volume: +) +if %_C16Msg% EQU 0 (if %_Office15% EQU 1 (goto :R15V) else (goto :GVLKC2R)) + +if !_Mondo! EQU 1 ( +call :InsLic Mondo +) +if !_O365ProPlus! EQU 1 ( +echo O365ProPlus 2016 Suite ^<-^> Mondo 2016 Licenses +call :InsLic O365ProPlus DRNV7-VGMM2-B3G9T-4BF84-VMFTK +if !_Mondo! EQU 0 call :InsLic Mondo +) +if !_O365Business! EQU 1 if !_O365ProPlus! EQU 0 ( +set _O365ProPlus=1 +echo O365Business 2016 Suite ^<-^> Mondo 2016 Licenses +call :InsLic O365Business NCHRJ-3VPGW-X73DM-6B36K-3RQ6B +if !_Mondo! EQU 0 call :InsLic Mondo +) +if !_O365SmallBusPrem! EQU 1 if !_O365Business! EQU 0 if !_O365ProPlus! EQU 0 ( +set _O365ProPlus=1 +echo O365SmallBusPrem 2016 Suite ^<-^> Mondo 2016 Licenses +call :InsLic O365SmallBusPrem 3FBRX-NFP7C-6JWVK-F2YGK-H499R +if !_Mondo! EQU 0 call :InsLic Mondo +) +if !_O365HomePrem! EQU 1 if !_O365SmallBusPrem! EQU 0 if !_O365Business! EQU 0 if !_O365ProPlus! EQU 0 ( +set _O365ProPlus=1 +echo O365HomePrem 2016 Suite ^<-^> Mondo 2016 Licenses +call :InsLic O365HomePrem 9FNY8-PWWTY-8RY4F-GJMTV-KHGM9 +if !_Mondo! EQU 0 call :InsLic Mondo +) +if !_O365EduCloud! EQU 1 if !_O365HomePrem! EQU 0 if !_O365SmallBusPrem! EQU 0 if !_O365Business! EQU 0 if !_O365ProPlus! EQU 0 ( +set _O365ProPlus=1 +echo O365EduCloud 2016 Suite ^<-^> Mondo 2016 Licenses +call :InsLic O365EduCloud 8843N-BCXXD-Q84H8-R4Q37-T3CPT +if !_Mondo! EQU 0 call :InsLic Mondo +) +if !_O365ProPlus! EQU 1 set _O16O365=1 +if !_Mondo! EQU 1 if !_O365ProPlus! EQU 0 ( +echo Mondo 2016 Suite +call :InsLic O365ProPlus DRNV7-VGMM2-B3G9T-4BF84-VMFTK +if %_Office15% EQU 1 (goto :R15V) else (goto :GVLKC2R) +) +if !_ProPlus2021! EQU 1 if !_O365ProPlus! EQU 0 ( +echo ProPlus 2021 Suite +call :InsLic ProPlus2021 +) +if !_ProPlus2019! EQU 1 if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 ( +echo ProPlus 2019 Suite -^> ProPlus%_ons% Licenses +call :InsLic ProPlus%_tag% +) +if !_ProPlus! EQU 1 if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 ( +echo ProPlus 2016 Suite -^> ProPlus%_ons% Licenses +call :InsLic ProPlus%_tag% +) +if !_Professional2021! EQU 1 if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 ( +echo Professional 2021 Suite -^> ProPlus 2021 Licenses +call :InsLic ProPlus2021 +) +if !_Professional2019! EQU 1 if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 ( +echo Professional 2019 Suite -^> ProPlus%_ons% Licenses +call :InsLic ProPlus%_tag% +) +if !_Professional! EQU 1 if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 ( +echo Professional 2016 Suite -^> ProPlus%_ons% Licenses +call :InsLic ProPlus%_tag% +) +if !_Standard2021! EQU 1 if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 ( +echo Standard 2021 Suite +call :InsLic Standard2021 +) +if !_Standard2019! EQU 1 if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 if !_Standard2021! EQU 0 ( +echo Standard 2019 Suite -^> Standard%_ons% Licenses +call :InsLic Standard%_tag% +) +if !_Standard! EQU 1 if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 if !_Standard2021! EQU 0 if !_Standard2019! EQU 0 ( +echo Standard 2016 Suite -^> Standard%_ons% Licenses +call :InsLic Standard%_tag% +) +for %%a in (ProjectPro,VisioPro,ProjectStd,VisioStd) do if !_%%a2021! EQU 1 ( + echo %%a 2021 SKU + call :InsLic %%a2021 +) +for %%a in (ProjectPro,VisioPro,ProjectStd,VisioStd) do if !_%%a2019! EQU 1 ( +if !_%%a2021! EQU 0 ( + echo %%a 2019 SKU -^> %%a%_ons% Licenses + call :InsLic %%a%_tag% + ) +) +for %%a in (ProjectPro,VisioPro,ProjectStd,VisioStd) do if !_%%a! EQU 1 ( +if !_%%a2021! EQU 0 if !_%%a2019! EQU 0 ( + echo %%a 2016 SKU -^> %%a%_ons% Licenses + call :InsLic %%a%_tag% + ) +) +for %%a in (HomeBusiness,HomeStudent) do if !_%%a2021! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 if !_Standard2021! EQU 0 if !_Standard2019! EQU 0 if !_Standard! EQU 0 ( + set _Standard2021=1 + echo %%a 2021 Suite -^> Standard 2021 Licenses + call :InsLic Standard2021 + ) +) +for %%a in (HomeBusiness,HomeStudent) do if !_%%a2019! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 if !_Standard2021! EQU 0 if !_Standard2019! EQU 0 if !_Standard! EQU 0 if !_%%a2021! EQU 0 ( + set _Standard2019=1 + echo %%a 2019 Suite -^> Standard%_ons% Licenses + call :InsLic Standard%_tag% + ) +) +for %%a in (HomeBusiness,HomeStudent) do if !_%%a! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 if !_Standard2021! EQU 0 if !_Standard2019! EQU 0 if !_Standard! EQU 0 if !_%%a2021! EQU 0 if !_%%a2019! EQU 0 ( + set _Standard=1 + echo %%a 2016 Suite -^> Standard%_ons% Licenses + call :InsLic Standard%_tag% + ) +) +for %%a in (%_A21Ids%,OneNote) do if !_%%a! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 if !_Standard2021! EQU 0 if !_Standard2019! EQU 0 if !_Standard! EQU 0 ( + echo %%a App + call :InsLic %%a + ) +) +for %%a in (%_A16Ids%) do if !_%%a2019! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 if !_Standard2021! EQU 0 if !_Standard2019! EQU 0 if !_Standard! EQU 0 if !_%%a2021! EQU 0 ( + echo %%a 2019 App -^> %%a%_ons% Licenses + call :InsLic %%a%_tag% + ) +) +for %%a in (%_A16Ids%) do if !_%%a! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 if !_Standard2021! EQU 0 if !_Standard2019! EQU 0 if !_Standard! EQU 0 if !_%%a2021! EQU 0 if !_%%a2019! EQU 0 ( + echo %%a 2016 App -^> %%a%_ons% Licenses + call :InsLic %%a%_tag% + ) +) +for %%a in (Access) do if !_%%a2021! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 ( + echo %%a 2021 App + call :InsLic %%a2021 + ) +) +for %%a in (Access) do if !_%%a2019! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 if !_%%a2021! EQU 0 ( + echo %%a 2019 App -^> %%a%_ons% Licenses + call :InsLic %%a%_tag% + ) +) +for %%a in (Access) do if !_%%a! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_Professional2021! EQU 0 if !_Professional2019! EQU 0 if !_Professional! EQU 0 if !_%%a2021! EQU 0 if !_%%a2019! EQU 0 ( + echo %%a 2016 App -^> %%a%_ons% Licenses + call :InsLic %%a%_tag% + ) +) +for %%a in (SkypeforBusiness) do if !_%%a2021! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 ( + echo %%a 2021 App + call :InsLic %%a2021 + ) +) +for %%a in (SkypeforBusiness) do if !_%%a2019! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_%%a2021! EQU 0 ( + echo %%a 2019 App -^> %%a%_ons% Licenses + call :InsLic %%a%_tag% + ) +) +for %%a in (SkypeforBusiness) do if !_%%a! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus2021! EQU 0 if !_ProPlus2019! EQU 0 if !_ProPlus! EQU 0 if !_%%a2021! EQU 0 if !_%%a2019! EQU 0 ( + echo %%a 2016 App -^> %%a%_ons% Licenses + call :InsLic %%a%_tag% + ) +) +if %_Office15% EQU 1 (goto :R15V) else (goto :GVLKC2R) + +:R15V +for %%# in ("!_Licenses15Path!\client-issuance-*.xrm-ms") do ( +%_cscript% %_vbsi%"!_Licenses15Path!\%%~nx#" +) +%_cscript% %_vbsi%"!_Licenses15Path!\pkeyconfig-office.xrm-ms" + +set _O15Ids=Standard,ProjectPro,VisioPro,ProjectStd,VisioStd,Access,Lync +set _A15Ids=Excel,Groove,InfoPath,OneNote,Outlook,PowerPoint,Publisher,Word +set _R15Ids=SPD,Mondo,%_O15Ids%,%_A15Ids%,Professional,HomeBusiness,HomeStudent,O365ProPlus,O365Business,O365SmallBusPrem,O365HomePrem +set _V15Ids=Mondo,%_O15Ids%,%_A15Ids% + +echo %_Product15Ids%>"!_temp!\crvProduct15s.txt" +for %%a in (%_R15Ids%,ProPlus) do ( +set _%%a=0 +) +for %%a in (%_R15Ids%) do ( +findstr /I /C:"%%aRetail" "!_temp!\crvProduct15s.txt" %_Nul1% && set _%%a=1 +) +for %%a in (%_V15Ids%) do ( +findstr /I /C:"%%aVolume" "!_temp!\crvProduct15s.txt" %_Nul1% && ( + find /i "Office%%aVL_KMS_Client" "!_temp!\crvVolume.txt" %_Nul1% && (set _%%a=0) || (set _%%a=1) + ) +) +reg query %_PR15IDs%\Active\ProPlusRetail\x-none %_Nul3% && ( + find /i "OfficeProPlusVL_KMS_Client" "!_temp!\crvVolume.txt" %_Nul1% && (set _ProPlus=0) || (set _ProPlus=1) +) +reg query %_PR15IDs%\Active\ProPlusVolume\x-none %_Nul3% && ( + find /i "OfficeProPlusVL_KMS_Client" "!_temp!\crvVolume.txt" %_Nul1% && (set _ProPlus=0) || (set _ProPlus=1) +) +if %_Retail% EQU 1 for %%a in (%_R15Ids%) do ( +findstr /I /C:"%%aRetail" "!_temp!\crvProduct15s.txt" %_Nul1% && ( + find /i "Office%%aR_Retail" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R15=1) + find /i "Office%%aR_OEM" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R15=1) + find /i "Office%%aR_Sub" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R15=1) + find /i "Office%%aR_PIN" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R15=1) + find /i "Office%%aMSDNR_" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R15=1) + find /i "Office%%aO365R_" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R15=1) + find /i "Office%%aCO365R_" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R15=1) + find /i "Office%%aVL_MAK" "!_temp!\crvRetail.txt" %_Nul1% && (set _%%a=0 & set aC2R15=1) + ) +) +if %_Retail% EQU 1 reg query %_PR15IDs%\Active\ProPlusRetail\x-none %_Nul3% && ( + find /i "OfficeProPlusR_Retail" "!_temp!\crvRetail.txt" %_Nul1% && (set _ProPlus=0 & set aC2R15=1) + find /i "OfficeProPlusR_OEM" "!_temp!\crvRetail.txt" %_Nul1% && (set _ProPlus=0 & set aC2R15=1) + find /i "OfficeProPlusMSDNR_" "!_temp!\crvRetail.txt" %_Nul1% && (set _ProPlus=0 & set aC2R15=1) + find /i "OfficeProPlusVL_MAK" "!_temp!\crvRetail.txt" %_Nul1% && (set _ProPlus=0 & set aC2R15=1) +) +find /i "OfficeMondoVL_KMS_Client" "!_temp!\crvVolume.txt" %_Nul1% && ( +wmic path %spp% where 'ApplicationID="%_oApp%" AND LicenseFamily like "OfficeO365%%"' get LicenseFamily /value %_Nul2% | find /i "O365" %_Nul1% && ( + for %%a in (O365ProPlus,O365Business,O365SmallBusPrem,O365HomePrem) do set _%%a=0 + ) +) + +for %%a in (%_R15Ids%,ProPlus) do if !_%%a! EQU 1 ( +set _C15Msg=1 +) +if %_C15Msg% EQU 1 if %_C16Msg% EQU 0 ( +echo. +echo Converting Office C2R Retail-to-Volume: +) +if %_C15Msg% EQU 0 goto :GVLKC2R + +if !_Mondo! EQU 1 ( +call :Ins15Lic Mondo +) +if !_O365ProPlus! EQU 1 if !_O16O365! EQU 0 ( +echo O365ProPlus 2013 Suite ^<-^> Mondo 2013 Licenses +call :Ins15Lic O365ProPlus DRNV7-VGMM2-B3G9T-4BF84-VMFTK +if !_Mondo! EQU 0 call :Ins15Lic Mondo +) +if !_O365SmallBusPrem! EQU 1 if !_O365ProPlus! EQU 0 if !_O16O365! EQU 0 ( +set _O365ProPlus=1 +echo O365SmallBusPrem 2013 Suite ^<-^> Mondo 2013 Licenses +call :Ins15Lic O365SmallBusPrem 3FBRX-NFP7C-6JWVK-F2YGK-H499R +if !_Mondo! EQU 0 call :Ins15Lic Mondo +) +if !_O365HomePrem! EQU 1 if !_O365SmallBusPrem! EQU 0 if !_O365ProPlus! EQU 0 if !_O16O365! EQU 0 ( +set _O365ProPlus=1 +echo O365HomePrem 2013 Suite ^<-^> Mondo 2013 Licenses +call :Ins15Lic O365HomePrem 9FNY8-PWWTY-8RY4F-GJMTV-KHGM9 +if !_Mondo! EQU 0 call :Ins15Lic Mondo +) +if !_O365Business! EQU 1 if !_O365HomePrem! EQU 0 if !_O365SmallBusPrem! EQU 0 if !_O365ProPlus! EQU 0 if !_O16O365! EQU 0 ( +set _O365ProPlus=1 +echo O365Business 2013 Suite ^<-^> Mondo 2013 Licenses +call :Ins15Lic O365Business MCPBN-CPY7X-3PK9R-P6GTT-H8P8Y +if !_Mondo! EQU 0 call :Ins15Lic Mondo +) +if !_Mondo! EQU 1 if !_O365ProPlus! EQU 0 if !_O16O365! EQU 0 ( +echo Mondo 2013 Suite +call :Ins15Lic O365ProPlus DRNV7-VGMM2-B3G9T-4BF84-VMFTK +goto :GVLKC2R +) +if !_SPD! EQU 1 if !_Mondo! EQU 0 if !_O365ProPlus! EQU 0 ( +echo SharePoint Designer 2013 App -^> Mondo 2013 Licenses +call :Ins15Lic Mondo +goto :GVLKC2R +) +if !_ProPlus! EQU 1 if !_O365ProPlus! EQU 0 ( +echo ProPlus 2013 Suite +call :Ins15Lic ProPlus +) +if !_Professional! EQU 1 if !_O365ProPlus! EQU 0 if !_ProPlus! EQU 0 ( +echo Professional 2013 Suite -^> ProPlus 2013 Licenses +call :Ins15Lic ProPlus +) +if !_Standard! EQU 1 if !_O365ProPlus! EQU 0 if !_ProPlus! EQU 0 if !_Professional! EQU 0 ( +echo Standard 2013 Suite +call :Ins15Lic Standard +) +for %%a in (ProjectPro,VisioPro,ProjectStd,VisioStd) do if !_%%a! EQU 1 ( +echo %%a 2013 SKU +call :Ins15Lic %%a +) +for %%a in (HomeBusiness,HomeStudent) do if !_%%a! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus! EQU 0 if !_Professional! EQU 0 if !_Standard! EQU 0 ( + set _Standard=1 + echo %%a 2013 Suite -^> Standard 2013 Licenses + call :Ins15Lic Standard + ) +) +for %%a in (%_A15Ids%) do if !_%%a! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus! EQU 0 if !_Professional! EQU 0 if !_Standard! EQU 0 ( + echo %%a 2013 App + call :Ins15Lic %%a + ) +) +for %%a in (Access) do if !_%%a! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus! EQU 0 if !_Professional! EQU 0 ( + echo %%a 2013 App + call :Ins15Lic %%a + ) +) +for %%a in (Lync) do if !_%%a! EQU 1 ( +if !_O365ProPlus! EQU 0 if !_ProPlus! EQU 0 ( + echo SkypeforBusiness 2015 App + call :Ins15Lic %%a + ) +) +goto :GVLKC2R + +:InsLic +set "_ID=%1Volume" +set "_pkey=" +if not "%2"=="" ( +set "_ID=%1Retail" +set "_pkey=PidKey=%2" +) +reg delete %_Config% /f /v %_ID%.OSPPReady %_Nul3% +"!_Integrator!" /I /License PRIDName=%_ID%.16 %_pkey% PackageGUID="%_GUID%" PackageRoot="!_InstallRoot!" %_Nul1% +reg add %_Config% /f /v %_ID%.OSPPReady /t REG_SZ /d 1 %_Nul1% +reg query %_Config% /v ProductReleaseIds | findstr /I "%_ID%" %_Nul1% +if %errorlevel% NEQ 0 ( +for /f "skip=2 tokens=2*" %%a in ('reg query %_Config% /v ProductReleaseIds') do reg add %_Config% /v ProductReleaseIds /t REG_SZ /d "%%b,%_ID%" /f %_Nul1% +) +exit /b + +:Ins15Lic +set "_ID=%1Volume" +set "_patt=%1VL_" +set "_pkey=" +if not "%2"=="" ( +set "_ID=%1Retail" +set "_patt=%1R_" +set "_pkey=%2" +) +reg delete %_OSPP15Ready% /f /v %_ID%.OSPPReady %_Nul3% +for %%# in ("!_Licenses15Path!\%_patt%*.xrm-ms") do ( +%_cscript% %_vbsi%"!_Licenses15Path!\%%~nx#" +) +if defined _pkey wmic path %_sps% where version='%_wmi%' call InstallProductKey ProductKey="%_pkey%" %_Nul3% +reg add %_OSPP15Ready% /f /v %_ID%.OSPPReady /t %_OSPP15ReadT% /d 1 %_Nul1% +reg query %_Con15fig% %_Nul2% | findstr /I "%_ID%" %_Nul1% +if %errorlevel% NEQ 0 ( +for /f "skip=2 tokens=2*" %%a in ('reg query %_Con15fig% %_Nul6%') do reg add %_Con15fig% /t REG_SZ /d "%%b,%_ID%" /f %_Nul1% +) +exit /b + +:GVLKC2R +if %_Office16% EQU 1 ( +for %%a in (%_RetIds%,ProPlus) do set "_%%a=" +) +if %_Office15% EQU 1 ( +for %%a in (%_R15Ids%,ProPlus) do set "_%%a=" +) +if %winbuild% GEQ 9200 wmic path %_sps% where version='%_wmi%' call RefreshLicenseStatus %_Nul3% +if exist "%SysPath%\spp\store_test\2.0\tokens.dat" if defined _copp ( +%_cscript% %_SLMGR% /rilc +) +goto :%_sC2R% + :keys if "%~1"=="" exit /b -goto :%1 %_Nul2% || exit /b +goto :%1 %_Nul2% + +:: Windows 11 [Co] +:ca7df2e3-5ea0-47b8-9ac1-b1be4d8edd69 +set "_key=37D7F-N49CB-WQR8W-TBJ73-FM8RX" &:: SE {Cloud} +exit /b + +:d30136fc-cb4b-416e-a23d-87207abc44a9 +set "_key=6XN7V-PCBDC-BDBRH-8DQY7-G6R44" &:: SE N {Cloud N} +exit /b :: Windows 10 [RS5] :32d2fab3-e4a8-42c2-923b-4bf4fd13e6ee -set "key=M7XTQ-FN8P6-TTKYV-9D4CC-J462D" &:: Enterprise LTSC 2019 +set "_key=M7XTQ-FN8P6-TTKYV-9D4CC-J462D" &:: Enterprise LTSC 2019 exit /b :7103a333-b8c8-49cc-93ce-d37c09687f92 -set "key=92NFX-8DJQP-P6BBQ-THF9C-7CG2H" &:: Enterprise LTSC 2019 N +set "_key=92NFX-8DJQP-P6BBQ-THF9C-7CG2H" &:: Enterprise LTSC 2019 N exit /b :ec868e65-fadf-4759-b23e-93fe37f2cc29 -set "key=CPWHC-NT2C7-VYW78-DHDB2-PG3GK" &:: Enterprise for Virtual Desktops +set "_key=CPWHC-NT2C7-VYW78-DHDB2-PG3GK" &:: Enterprise for Virtual Desktops exit /b :0df4f814-3f57-4b8b-9a9d-fddadcd69fac -set "key=NBTWJ-3DR69-3C4V8-C26MC-GQ9M6" &:: Lean +set "_key=NBTWJ-3DR69-3C4V8-C26MC-GQ9M6" &:: Lean exit /b :: Windows 10 [RS3] :82bbc092-bc50-4e16-8e18-b74fc486aec3 -set "key=NRG8B-VKK3Q-CXVCJ-9G2XF-6Q84J" &:: Pro Workstation +set "_key=NRG8B-VKK3Q-CXVCJ-9G2XF-6Q84J" &:: Pro Workstation exit /b :4b1571d3-bafb-4b40-8087-a961be2caf65 -set "key=9FNHH-K3HBT-3W4TD-6383H-6XYWF" &:: Pro Workstation N +set "_key=9FNHH-K3HBT-3W4TD-6383H-6XYWF" &:: Pro Workstation N exit /b :e4db50ea-bda1-4566-b047-0ca50abc6f07 -set "key=7NBT4-WGBQX-MP4H7-QXFF8-YP3KX" &:: Enterprise Remote Server +set "_key=7NBT4-WGBQX-MP4H7-QXFF8-YP3KX" &:: Enterprise Remote Server exit /b :: Windows 10 [RS2] :e0b2d383-d112-413f-8a80-97f373a5820c -set "key=YYVX9-NTFWV-6MDM3-9PT4T-4M68B" &:: Enterprise G +set "_key=YYVX9-NTFWV-6MDM3-9PT4T-4M68B" &:: Enterprise G exit /b :e38454fb-41a4-4f59-a5dc-25080e354730 -set "key=44RPN-FTY23-9VTTB-MP9BX-T84FV" &:: Enterprise G N +set "_key=44RPN-FTY23-9VTTB-MP9BX-T84FV" &:: Enterprise G N exit /b :: Windows 10 [RS1] :2d5a5a60-3040-48bf-beb0-fcd770c20ce0 -set "key=DCPHK-NFMTC-H88MJ-PFHPY-QJ4BJ" &:: Enterprise 2016 LTSB +set "_key=DCPHK-NFMTC-H88MJ-PFHPY-QJ4BJ" &:: Enterprise 2016 LTSB exit /b :9f776d83-7156-45b2-8a5c-359b9c9f22a3 -set "key=QFFDN-GRT3P-VKWWX-X7T3R-8B639" &:: Enterprise 2016 LTSB N +set "_key=QFFDN-GRT3P-VKWWX-X7T3R-8B639" &:: Enterprise 2016 LTSB N exit /b :3f1afc82-f8ac-4f6c-8005-1d233e606eee -set "key=6TP4R-GNPTD-KYYHQ-7B7DP-J447Y" &:: Pro Education +set "_key=6TP4R-GNPTD-KYYHQ-7B7DP-J447Y" &:: Pro Education exit /b :5300b18c-2e33-4dc2-8291-47ffcec746dd -set "key=YVWGF-BXNMC-HTQYQ-CPQ99-66QFC" &:: Pro Education N +set "_key=YVWGF-BXNMC-HTQYQ-CPQ99-66QFC" &:: Pro Education N exit /b :: Windows 10 [TH] :58e97c99-f377-4ef1-81d5-4ad5522b5fd8 -set "key=TX9XD-98N7V-6WMQ6-BX7FG-H8Q99" &:: Home +set "_key=TX9XD-98N7V-6WMQ6-BX7FG-H8Q99" &:: Home exit /b :7b9e1751-a8da-4f75-9560-5fadfe3d8e38 -set "key=3KHY7-WNT83-DGQKR-F7HPR-844BM" &:: Home N +set "_key=3KHY7-WNT83-DGQKR-F7HPR-844BM" &:: Home N exit /b :cd918a57-a41b-4c82-8dce-1a538e221a83 -set "key=7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH" &:: Home Single Language +set "_key=7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH" &:: Home Single Language exit /b :a9107544-f4a0-4053-a96a-1479abdef912 -set "key=PVMJN-6DFY6-9CCP6-7BKTT-D3WVR" &:: Home China +set "_key=PVMJN-6DFY6-9CCP6-7BKTT-D3WVR" &:: Home China exit /b :2de67392-b7a7-462a-b1ca-108dd189f588 -set "key=W269N-WFGWX-YVC9B-4J6C9-T83GX" &:: Pro +set "_key=W269N-WFGWX-YVC9B-4J6C9-T83GX" &:: Pro exit /b :a80b5abf-76ad-428b-b05d-a47d2dffeebf -set "key=MH37W-N47XK-V7XM9-C7227-GCQG9" &:: Pro N +set "_key=MH37W-N47XK-V7XM9-C7227-GCQG9" &:: Pro N exit /b :e0c42288-980c-4788-a014-c080d2e1926e -set "key=NW6C2-QMPVW-D7KKK-3GKT6-VCFB2" &:: Education +set "_key=NW6C2-QMPVW-D7KKK-3GKT6-VCFB2" &:: Education exit /b :3c102355-d027-42c6-ad23-2e7ef8a02585 -set "key=2WH4N-8QGBV-H22JP-CT43Q-MDWWJ" &:: Education N +set "_key=2WH4N-8QGBV-H22JP-CT43Q-MDWWJ" &:: Education N exit /b :73111121-5638-40f6-bc11-f1d7b0d64300 -set "key=NPPR9-FWDCX-D2C8J-H872K-2YT43" &:: Enterprise +set "_key=NPPR9-FWDCX-D2C8J-H872K-2YT43" &:: Enterprise exit /b :e272e3e2-732f-4c65-a8f0-484747d0d947 -set "key=DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4" &:: Enterprise N +set "_key=DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4" &:: Enterprise N exit /b :7b51a46c-0c04-4e8f-9af4-8496cca90d5e -set "key=WNMTR-4C88C-JK8YV-HQ7T2-76DF9" &:: Enterprise 2015 LTSB +set "_key=WNMTR-4C88C-JK8YV-HQ7T2-76DF9" &:: Enterprise 2015 LTSB exit /b :87b838b7-41b6-4590-8318-5797951d8529 -set "key=2F77B-TNFGY-69QQF-B8YKP-D69TJ" &:: Enterprise 2015 LTSB N +set "_key=2F77B-TNFGY-69QQF-B8YKP-D69TJ" &:: Enterprise 2015 LTSB N +exit /b + +:: Windows Server 2022 [Fe] +:9bd77860-9b31-4b7b-96ad-2564017315bf +set "_key=VDYBN-27WPP-V4HQT-9VMD4-VMK7H" &:: Standard +exit /b + +:ef6cfc9f-8c5d-44ac-9aad-de6a2ea0ae03 +set "_key=WX4NM-KYWYW-QJJR4-XV3QB-6VM33" &:: Datacenter +exit /b + +:8c8f0ad3-9a43-4e05-b840-93b8d1475cbc +set "_key=6N379-GGTMK-23C6M-XVVTC-CKFRQ" &:: Azure Core +exit /b + +:f5e9429c-f50b-4b98-b15c-ef92eb5cff39 +set "_key=67KN8-4FYJW-2487Q-MQ2J7-4C4RG" &:: Standard ACor +exit /b + +:39e69c41-42b4-4a0a-abad-8e3c10a797cc +set "_key=QFND9-D3Y9C-J3KKY-6RPVP-2DPYV" &:: Datacenter ACor exit /b :: Windows Server 2019 [RS5] :de32eafd-aaee-4662-9444-c1befb41bde2 -set "key=N69G4-B89J2-4G8F4-WWYCC-J464C" &:: Standard +set "_key=N69G4-B89J2-4G8F4-WWYCC-J464C" &:: Standard exit /b :34e1ae55-27f8-4950-8877-7a03be5fb181 -set "key=WMDGN-G9PQG-XVVXX-R3X43-63DFG" &:: Datacenter -exit /b - -:034d3cbb-5d4b-4245-b3f8-f84571314078 -set "key=WVDHN-86M7X-466P6-VHXV7-YY726" &:: Essentials +set "_key=WMDGN-G9PQG-XVVXX-R3X43-63DFG" &:: Datacenter exit /b :a99cc1f0-7719-4306-9645-294102fbff95 -set "key=FDNH6-VW9RW-BXPJ7-4XTYG-239TB" &:: Azure Core +set "_key=FDNH6-VW9RW-BXPJ7-4XTYG-239TB" &:: Azure Core exit /b :73e3957c-fc0c-400d-9184-5f7b6f2eb409 -set "key=N2KJX-J94YW-TQVFB-DG9YT-724CC" &:: Standard ACor +set "_key=N2KJX-J94YW-TQVFB-DG9YT-724CC" &:: Standard ACor exit /b :90c362e5-0da1-4bfd-b53b-b87d309ade43 -set "key=6NMRW-2C8FM-D24W7-TQWMY-CWH2D" &:: Datacenter ACor +set "_key=6NMRW-2C8FM-D24W7-TQWMY-CWH2D" &:: Datacenter ACor +exit /b + +:034d3cbb-5d4b-4245-b3f8-f84571314078 +set "_key=WVDHN-86M7X-466P6-VHXV7-YY726" &:: Essentials exit /b :8de8eb62-bbe0-40ac-ac17-f75595071ea3 -set "key=GRFBW-QNDC4-6QBHG-CCK3B-2PR88" &:: ServerARM64 +set "_key=GRFBW-QNDC4-6QBHG-CCK3B-2PR88" &:: ServerARM64 +exit /b + +:19b5e0fb-4431-46bc-bac1-2f1873e4ae73 +set "_key=NTBV8-9K7Q8-V27C6-M2BTV-KHMXV" &:: Azure Datacenter - ServerTurbine exit /b :: Windows Server 2016 [RS4] :43d9af6e-5e86-4be8-a797-d072a046896c -set "key=K9FYF-G6NCK-73M32-XMVPY-F9DRR" &:: ServerARM64 +set "_key=K9FYF-G6NCK-73M32-XMVPY-F9DRR" &:: ServerARM64 exit /b :: Windows Server 2016 [RS3] :61c5ef22-f14f-4553-a824-c4b31e84b100 -set "key=PTXN8-JFHJM-4WC78-MPCBR-9W4KR" &:: Standard ACor +set "_key=PTXN8-JFHJM-4WC78-MPCBR-9W4KR" &:: Standard ACor exit /b :e49c08e7-da82-42f8-bde2-b570fbcae76c -set "key=2HXDN-KRXHB-GPYC7-YCKFJ-7FVDG" &:: Datacenter ACor +set "_key=2HXDN-KRXHB-GPYC7-YCKFJ-7FVDG" &:: Datacenter ACor exit /b :: Windows Server 2016 [RS1] :8c1c5410-9f39-4805-8c9d-63a07706358f -set "key=WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY" &:: Standard +set "_key=WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY" &:: Standard exit /b :21c56779-b449-4d20-adfc-eece0e1ad74b -set "key=CB7KF-BWN84-R7R2Y-793K2-8XDDG" &:: Datacenter +set "_key=CB7KF-BWN84-R7R2Y-793K2-8XDDG" &:: Datacenter exit /b -:2b5a1b0f-a5ab-4c54-ac2f-a6d94824a283 -set "key=JCKRF-N37P4-C2D82-9YXRT-4M63B" &:: Essentials +:3dbf341b-5f6c-4fa7-b936-699dce9e263f +set "_key=VP34G-4NPPG-79JTQ-864T4-R3MQX" &:: Azure Core exit /b -:7b4433f4-b1e7-4788-895a-c45378d38253 -set "key=QN4C6-GBJD2-FB422-GHWJK-GJG2R" &:: Cloud Storage +:2b5a1b0f-a5ab-4c54-ac2f-a6d94824a283 +set "_key=JCKRF-N37P4-C2D82-9YXRT-4M63B" &:: Essentials exit /b -:3dbf341b-5f6c-4fa7-b936-699dce9e263f -set "key=VP34G-4NPPG-79JTQ-864T4-R3MQX" &:: Azure Core +:7b4433f4-b1e7-4788-895a-c45378d38253 +set "_key=QN4C6-GBJD2-FB422-GHWJK-GJG2R" &:: Cloud Storage exit /b :: Windows 8.1 :fe1c3238-432a-43a1-8e25-97e7d1ef10f3 -set "key=M9Q9P-WNJJT-6PXPY-DWX8H-6XWKK" &:: Core +set "_key=M9Q9P-WNJJT-6PXPY-DWX8H-6XWKK" &:: Core exit /b :78558a64-dc19-43fe-a0d0-8075b2a370a3 -set "key=7B9N3-D94CG-YTVHR-QBPX3-RJP64" &:: Core N +set "_key=7B9N3-D94CG-YTVHR-QBPX3-RJP64" &:: Core N exit /b :c72c6a1d-f252-4e7e-bdd1-3fca342acb35 -set "key=BB6NG-PQ82V-VRDPW-8XVD2-V8P66" &:: Core Single Language +set "_key=BB6NG-PQ82V-VRDPW-8XVD2-V8P66" &:: Core Single Language exit /b :db78b74f-ef1c-4892-abfe-1e66b8231df6 -set "key=NCTT7-2RGK8-WMHRF-RY7YQ-JTXG3" &:: Core China +set "_key=NCTT7-2RGK8-WMHRF-RY7YQ-JTXG3" &:: Core China exit /b :ffee456a-cd87-4390-8e07-16146c672fd0 -set "key=XYTND-K6QKT-K2MRH-66RTM-43JKP" &:: Core ARM +set "_key=XYTND-K6QKT-K2MRH-66RTM-43JKP" &:: Core ARM exit /b :c06b6981-d7fd-4a35-b7b4-054742b7af67 -set "key=GCRJD-8NW9H-F2CDX-CCM8D-9D6T9" &:: Pro +set "_key=GCRJD-8NW9H-F2CDX-CCM8D-9D6T9" &:: Pro exit /b :7476d79f-8e48-49b4-ab63-4d0b813a16e4 -set "key=HMCNV-VVBFX-7HMBH-CTY9B-B4FXY" &:: Pro N +set "_key=HMCNV-VVBFX-7HMBH-CTY9B-B4FXY" &:: Pro N exit /b :096ce63d-4fac-48a9-82a9-61ae9e800e5f -set "key=789NJ-TQK6T-6XTH8-J39CJ-J8D3P" &:: Pro with Media Center +set "_key=789NJ-TQK6T-6XTH8-J39CJ-J8D3P" &:: Pro with Media Center exit /b :81671aaf-79d1-4eb1-b004-8cbbe173afea -set "key=MHF9N-XY6XB-WVXMC-BTDCT-MKKG7" &:: Enterprise +set "_key=MHF9N-XY6XB-WVXMC-BTDCT-MKKG7" &:: Enterprise exit /b :113e705c-fa49-48a4-beea-7dd879b46b14 -set "key=TT4HM-HN7YT-62K67-RGRQJ-JFFXW" &:: Enterprise N +set "_key=TT4HM-HN7YT-62K67-RGRQJ-JFFXW" &:: Enterprise N exit /b :0ab82d54-47f4-4acb-818c-cc5bf0ecb649 -set "key=NMMPB-38DD4-R2823-62W8D-VXKJB" &:: Embedded Industry Pro +set "_key=NMMPB-38DD4-R2823-62W8D-VXKJB" &:: Embedded Industry Pro exit /b :cd4e2d9f-5059-4a50-a92d-05d5bb1267c7 -set "key=FNFKF-PWTVT-9RC8H-32HB2-JB34X" &:: Embedded Industry Enterprise +set "_key=FNFKF-PWTVT-9RC8H-32HB2-JB34X" &:: Embedded Industry Enterprise exit /b :f7e88590-dfc7-4c78-bccb-6f3865b99d1a -set "key=VHXM3-NR6FT-RY6RT-CK882-KW2CJ" &:: Embedded Industry Automotive +set "_key=VHXM3-NR6FT-RY6RT-CK882-KW2CJ" &:: Embedded Industry Automotive exit /b :e9942b32-2e55-4197-b0bd-5ff58cba8860 -set "key=3PY8R-QHNP9-W7XQD-G6DPH-3J2C9" &:: with Bing +set "_key=3PY8R-QHNP9-W7XQD-G6DPH-3J2C9" &:: with Bing exit /b :c6ddecd6-2354-4c19-909b-306a3058484e -set "key=Q6HTR-N24GM-PMJFP-69CD8-2GXKR" &:: with Bing N +set "_key=Q6HTR-N24GM-PMJFP-69CD8-2GXKR" &:: with Bing N exit /b :b8f5e3a3-ed33-4608-81e1-37d6c9dcfd9c -set "key=KF37N-VDV38-GRRTV-XH8X6-6F3BB" &:: with Bing Single Language +set "_key=KF37N-VDV38-GRRTV-XH8X6-6F3BB" &:: with Bing Single Language exit /b :ba998212-460a-44db-bfb5-71bf09d1c68b -set "key=R962J-37N87-9VVK2-WJ74P-XTMHR" &:: with Bing China +set "_key=R962J-37N87-9VVK2-WJ74P-XTMHR" &:: with Bing China exit /b :e58d87b5-8126-4580-80fb-861b22f79296 -set "key=MX3RK-9HNGX-K3QKC-6PJ3F-W8D7B" &:: Pro for Students +set "_key=MX3RK-9HNGX-K3QKC-6PJ3F-W8D7B" &:: Pro for Students exit /b :cab491c7-a918-4f60-b502-dab75e334f40 -set "key=TNFGH-2R6PB-8XM3K-QYHX2-J4296" &:: Pro for Students N +set "_key=TNFGH-2R6PB-8XM3K-QYHX2-J4296" &:: Pro for Students N exit /b :: Windows Server 2012 R2 :b3ca044e-a358-4d68-9883-aaa2941aca99 -set "key=D2N9P-3P6X9-2R39C-7RTCD-MDVJX" &:: Standard +set "_key=D2N9P-3P6X9-2R39C-7RTCD-MDVJX" &:: Standard exit /b :00091344-1ea4-4f37-b789-01750ba6988c -set "key=W3GGN-FT8W3-Y4M27-J84CP-Q3VJ9" &:: Datacenter +set "_key=W3GGN-FT8W3-Y4M27-J84CP-Q3VJ9" &:: Datacenter exit /b :21db6ba4-9a7b-4a14-9e29-64a60c59301d -set "key=KNC87-3J2TX-XB4WP-VCPJV-M4FWM" &:: Essentials +set "_key=KNC87-3J2TX-XB4WP-VCPJV-M4FWM" &:: Essentials exit /b :b743a2be-68d4-4dd3-af32-92425b7bb623 -set "key=3NPTF-33KPT-GGBPR-YX76B-39KDD" &:: Cloud Storage +set "_key=3NPTF-33KPT-GGBPR-YX76B-39KDD" &:: Cloud Storage exit /b :: Windows 8 :c04ed6bf-55c8-4b47-9f8e-5a1f31ceee60 -set "key=BN3D2-R7TKB-3YPBD-8DRP2-27GG4" &:: Core +set "_key=BN3D2-R7TKB-3YPBD-8DRP2-27GG4" &:: Core exit /b :197390a0-65f6-4a95-bdc4-55d58a3b0253 -set "key=8N2M2-HWPGY-7PGT9-HGDD8-GVGGY" &:: Core N +set "_key=8N2M2-HWPGY-7PGT9-HGDD8-GVGGY" &:: Core N exit /b :8860fcd4-a77b-4a20-9045-a150ff11d609 -set "key=2WN2H-YGCQR-KFX6K-CD6TF-84YXQ" &:: Core Single Language +set "_key=2WN2H-YGCQR-KFX6K-CD6TF-84YXQ" &:: Core Single Language exit /b :9d5584a2-2d85-419a-982c-a00888bb9ddf -set "key=4K36P-JN4VD-GDC6V-KDT89-DYFKP" &:: Core China +set "_key=4K36P-JN4VD-GDC6V-KDT89-DYFKP" &:: Core China exit /b :af35d7b7-5035-4b63-8972-f0b747b9f4dc -set "key=DXHJF-N9KQX-MFPVR-GHGQK-Y7RKV" &:: Core ARM +set "_key=DXHJF-N9KQX-MFPVR-GHGQK-Y7RKV" &:: Core ARM exit /b :a98bcd6d-5343-4603-8afe-5908e4611112 -set "key=NG4HW-VH26C-733KW-K6F98-J8CK4" &:: Pro +set "_key=NG4HW-VH26C-733KW-K6F98-J8CK4" &:: Pro exit /b :ebf245c1-29a8-4daf-9cb1-38dfc608a8c8 -set "key=XCVCF-2NXM9-723PB-MHCB7-2RYQQ" &:: Pro N +set "_key=XCVCF-2NXM9-723PB-MHCB7-2RYQQ" &:: Pro N exit /b :a00018a3-f20f-4632-bf7c-8daa5351c914 -set "key=GNBB8-YVD74-QJHX6-27H4K-8QHDG" &:: Pro with Media Center +set "_key=GNBB8-YVD74-QJHX6-27H4K-8QHDG" &:: Pro with Media Center exit /b :458e1bec-837a-45f6-b9d5-925ed5d299de -set "key=32JNW-9KQ84-P47T8-D8GGY-CWCK7" &:: Enterprise +set "_key=32JNW-9KQ84-P47T8-D8GGY-CWCK7" &:: Enterprise exit /b :e14997e7-800a-4cf7-ad10-de4b45b578db -set "key=JMNMF-RHW7P-DMY6X-RF3DR-X2BQT" &:: Enterprise N +set "_key=JMNMF-RHW7P-DMY6X-RF3DR-X2BQT" &:: Enterprise N exit /b :10018baf-ce21-4060-80bd-47fe74ed4dab -set "key=RYXVT-BNQG7-VD29F-DBMRY-HT73M" &:: Embedded Industry Pro +set "_key=RYXVT-BNQG7-VD29F-DBMRY-HT73M" &:: Embedded Industry Pro exit /b :18db1848-12e0-4167-b9d7-da7fcda507db -set "key=NKB3R-R2F8T-3XCDP-7Q2KW-XWYQ2" &:: Embedded Industry Enterprise +set "_key=NKB3R-R2F8T-3XCDP-7Q2KW-XWYQ2" &:: Embedded Industry Enterprise exit /b :: Windows Server 2012 :f0f5ec41-0d55-4732-af02-440a44a3cf0f -set "key=XC9B7-NBPP2-83J2H-RHMBY-92BT4" &:: Standard +set "_key=XC9B7-NBPP2-83J2H-RHMBY-92BT4" &:: Standard exit /b :d3643d60-0c42-412d-a7d6-52e6635327f6 -set "key=48HP8-DN98B-MYWDG-T2DCC-8W83P" &:: Datacenter +set "_key=48HP8-DN98B-MYWDG-T2DCC-8W83P" &:: Datacenter exit /b :7d5486c7-e120-4771-b7f1-7b56c6d3170c -set "key=HM7DN-YVMH3-46JC3-XYTG7-CYQJJ" &:: MultiPoint Standard +set "_key=HM7DN-YVMH3-46JC3-XYTG7-CYQJJ" &:: MultiPoint Standard exit /b :95fd1c83-7df5-494a-be8b-1300e1c9d1cd -set "key=XNH6W-2V9GX-RGJ4K-Y8X6F-QGJ2G" &:: MultiPoint Premium +set "_key=XNH6W-2V9GX-RGJ4K-Y8X6F-QGJ2G" &:: MultiPoint Premium exit /b :: Windows 7 :b92e9980-b9d5-4821-9c94-140f632f6312 -set "key=FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4" &:: Professional +set "_key=FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4" &:: Professional exit /b :54a09a0d-d57b-4c10-8b69-a842d6590ad5 -set "key=MRPKT-YTG23-K7D7T-X2JMM-QY7MG" &:: Professional N +set "_key=MRPKT-YTG23-K7D7T-X2JMM-QY7MG" &:: Professional N exit /b :5a041529-fef8-4d07-b06f-b59b573b32d2 -set "key=W82YF-2Q76Y-63HXB-FGJG9-GF7QX" &:: Professional E +set "_key=W82YF-2Q76Y-63HXB-FGJG9-GF7QX" &:: Professional E exit /b :ae2ee509-1b34-41c0-acb7-6d4650168915 -set "key=33PXH-7Y6KF-2VJC9-XBBR8-HVTHH" &:: Enterprise +set "_key=33PXH-7Y6KF-2VJC9-XBBR8-HVTHH" &:: Enterprise exit /b :1cb6d605-11b3-4e14-bb30-da91c8e3983a -set "key=YDRBP-3D83W-TY26F-D46B2-XCKRJ" &:: Enterprise N +set "_key=YDRBP-3D83W-TY26F-D46B2-XCKRJ" &:: Enterprise N exit /b :46bbed08-9c7b-48fc-a614-95250573f4ea -set "key=C29WB-22CC8-VJ326-GHFJW-H9DH4" &:: Enterprise E +set "_key=C29WB-22CC8-VJ326-GHFJW-H9DH4" &:: Enterprise E exit /b :db537896-376f-48ae-a492-53d0547773d0 -set "key=YBYF6-BHCR3-JPKRB-CDW7B-F9BK4" &:: Embedded POSReady 7 +set "_key=YBYF6-BHCR3-JPKRB-CDW7B-F9BK4" &:: Embedded POSReady 7 exit /b :e1a8296a-db37-44d1-8cce-7bc961d59c54 -set "key=XGY72-BRBBT-FF8MH-2GG8H-W7KCW" &:: Embedded Standard +set "_key=XGY72-BRBBT-FF8MH-2GG8H-W7KCW" &:: Embedded Standard exit /b :aa6dd3aa-c2b4-40e2-a544-a6bbb3f5c395 -set "key=73KQT-CD9G6-K7TQG-66MRP-CQ22C" &:: Embedded ThinPC +set "_key=73KQT-CD9G6-K7TQG-66MRP-CQ22C" &:: Embedded ThinPC exit /b :: Windows Server 2008 R2 :a78b8bd9-8017-4df5-b86a-09f756affa7c -set "key=6TPJF-RBVHG-WBW2R-86QPH-6RTM4" &:: Web +set "_key=6TPJF-RBVHG-WBW2R-86QPH-6RTM4" &:: Web exit /b :cda18cf3-c196-46ad-b289-60c072869994 -set "key=TT8MH-CG224-D3D7Q-498W2-9QCTX" &:: HPC +set "_key=TT8MH-CG224-D3D7Q-498W2-9QCTX" &:: HPC exit /b :68531fb9-5511-4989-97be-d11a0f55633f -set "key=YC6KT-GKW9T-YTKYR-T4X34-R7VHC" &:: Standard +set "_key=YC6KT-GKW9T-YTKYR-T4X34-R7VHC" &:: Standard exit /b :7482e61b-c589-4b7f-8ecc-46d455ac3b87 -set "key=74YFP-3QFB3-KQT8W-PMXWJ-7M648" &:: Datacenter +set "_key=74YFP-3QFB3-KQT8W-PMXWJ-7M648" &:: Datacenter exit /b :620e2b3d-09e7-42fd-802a-17a13652fe7a -set "key=489J6-VHDMP-X63PK-3K798-CPX3Y" &:: Enterprise +set "_key=489J6-VHDMP-X63PK-3K798-CPX3Y" &:: Enterprise exit /b :8a26851c-1c7e-48d3-a687-fbca9b9ac16b -set "key=GT63C-RJFQ3-4GMB6-BRFB9-CB83V" &:: Itanium +set "_key=GT63C-RJFQ3-4GMB6-BRFB9-CB83V" &:: Itanium exit /b :f772515c-0e87-48d5-a676-e6962c3e1195 -set "key=736RG-XDKJK-V34PF-BHK87-J6X3K" &:: MultiPoint Server +set "_key=736RG-XDKJK-V34PF-BHK87-J6X3K" &:: MultiPoint Server - ServerEmbeddedSolution exit /b -:: Office 2019 -:0bc88885-718c-491d-921f-6f214349e79c -set "key=VQ9DP-NVHPH-T9HJC-J9PDT-KTQRG" &:: Professional Plus C2R-P +:: Office 2021 +:fbdb3e18-a8ef-4fb3-9183-dffd60bd0984 +set "_key=FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH" &:: Professional Plus exit /b -:fc7c4d0c-2e85-4bb9-afd4-01ed1476b5e9 -set "key=XM2V9-DN9HH-QB449-XDGKC-W2RMW" &:: Project Professional C2R-P +:080a45c5-9f9f-49eb-b4b0-c3c610a5ebd3 +set "_key=KDX7X-BNVR8-TXXGX-4Q7Y8-78VT3" &:: Standard exit /b -:500f6619-ef93-4b75-bcb4-82819998a3ca -set "key=N2CG9-YD3YK-936X4-3WR82-Q3X4H" &:: Visio Professional C2R-P +:76881159-155c-43e0-9db7-2d70a9a3a4ca +set "_key=FTNWT-C6WBT-8HMGF-K9PRX-QV9H8" &:: Project Professional +exit /b + +:6dd72704-f752-4b71-94c7-11cec6bfc355 +set "_key=J2JDC-NJCYY-9RGQ4-YXWMH-T3D4T" &:: Project Standard +exit /b + +:fb61ac9a-1688-45d2-8f6b-0674dbffa33c +set "_key=KNH8D-FGHT4-T8RK3-CTDYJ-K2HT4" &:: Visio Professional +exit /b + +:72fce797-1884-48dd-a860-b2f6a5efd3ca +set "_key=MJVNY-BYWPY-CWV6J-2RKRT-4M8QG" &:: Visio Standard +exit /b + +:1fe429d8-3fa7-4a39-b6f0-03dded42fe14 +set "_key=WM8YG-YNGDD-4JHDC-PG3F4-FC4T4" &:: Access +exit /b + +:ea71effc-69f1-4925-9991-2f5e319bbc24 +set "_key=NWG3X-87C9K-TC7YY-BC2G7-G6RVC" &:: Excel +exit /b + +:a5799e4c-f83c-4c6e-9516-dfe9b696150b +set "_key=C9FM6-3N72F-HFJXB-TM3V9-T86R9" &:: Outlook +exit /b + +:6e166cc3-495d-438a-89e7-d7c9e6fd4dea +set "_key=TY7XF-NFRBR-KJ44C-G83KF-GX27K" &:: PowerPoint +exit /b + +:aa66521f-2370-4ad8-a2bb-c095e3e4338f +set "_key=2MW9D-N4BXM-9VBPG-Q7W6M-KFBGQ" &:: Publisher +exit /b + +:1f32a9af-1274-48bd-ba1e-1ab7508a23e8 +set "_key=HWCXN-K3WBT-WJBKY-R8BD9-XK29P" &:: Skype for Business +exit /b + +:abe28aea-625a-43b1-8e30-225eb8fbd9e5 +set "_key=TN8H9-M34D3-Y64V9-TR72V-X79KV" &:: Word exit /b +:: Office 2019 :85dd8b5f-eaa4-4af3-a628-cce9e77c9a03 -set "key=NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP" &:: Professional Plus +set "_key=NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP" &:: Professional Plus exit /b :6912a74b-a5fb-401a-bfdb-2e3ab46f4b02 -set "key=6NWWJ-YQWMR-QKGCB-6TMB3-9D9HK" &:: Standard +set "_key=6NWWJ-YQWMR-QKGCB-6TMB3-9D9HK" &:: Standard exit /b :2ca2bf3f-949e-446a-82c7-e25a15ec78c4 -set "key=B4NPR-3FKK7-T2MBV-FRQ4W-PKD2B" &:: Project Professional +set "_key=B4NPR-3FKK7-T2MBV-FRQ4W-PKD2B" &:: Project Professional exit /b :1777f0e3-7392-4198-97ea-8ae4de6f6381 -set "key=C4F7P-NCP8C-6CQPT-MQHV9-JXD2M" &:: Project Standard +set "_key=C4F7P-NCP8C-6CQPT-MQHV9-JXD2M" &:: Project Standard exit /b :5b5cf08f-b81a-431d-b080-3450d8620565 -set "key=9BGNQ-K37YR-RQHF2-38RQ3-7VCBB" &:: Visio Professional +set "_key=9BGNQ-K37YR-RQHF2-38RQ3-7VCBB" &:: Visio Professional exit /b :e06d7df3-aad0-419d-8dfb-0ac37e2bdf39 -set "key=7TQNQ-K3YQQ-3PFH7-CCPPM-X4VQ2" &:: Visio Standard +set "_key=7TQNQ-K3YQQ-3PFH7-CCPPM-X4VQ2" &:: Visio Standard exit /b :9e9bceeb-e736-4f26-88de-763f87dcc485 -set "key=9N9PT-27V4Y-VJ2PD-YXFMF-YTFQT" &:: Access +set "_key=9N9PT-27V4Y-VJ2PD-YXFMF-YTFQT" &:: Access exit /b :237854e9-79fc-4497-a0c1-a70969691c6b -set "key=TMJWT-YYNMB-3BKTF-644FC-RVXBD" &:: Excel +set "_key=TMJWT-YYNMB-3BKTF-644FC-RVXBD" &:: Excel exit /b :c8f8a301-19f5-4132-96ce-2de9d4adbd33 -set "key=7HD7K-N4PVK-BHBCQ-YWQRW-XW4VK" &:: Outlook +set "_key=7HD7K-N4PVK-BHBCQ-YWQRW-XW4VK" &:: Outlook exit /b :3131fd61-5e4f-4308-8d6d-62be1987c92c -set "key=RRNCX-C64HY-W2MM7-MCH9G-TJHMQ" &:: PowerPoint +set "_key=RRNCX-C64HY-W2MM7-MCH9G-TJHMQ" &:: PowerPoint exit /b :9d3e4cca-e172-46f1-a2f4-1d2107051444 -set "key=G2KWX-3NW6P-PY93R-JXK2T-C9Y9V" &:: Publisher +set "_key=G2KWX-3NW6P-PY93R-JXK2T-C9Y9V" &:: Publisher exit /b :734c6c6e-b0ba-4298-a891-671772b2bd1b -set "key=NCJ33-JHBBY-HTK98-MYCV8-HMKHJ" &:: Skype for Business +set "_key=NCJ33-JHBBY-HTK98-MYCV8-HMKHJ" &:: Skype for Business exit /b :059834fe-a8ea-4bff-b67b-4d006b5447d3 -set "key=PBX3G-NWMT6-Q7XBW-PYJGG-WXD33" &:: Word +set "_key=PBX3G-NWMT6-Q7XBW-PYJGG-WXD33" &:: Word +exit /b + +:0bc88885-718c-491d-921f-6f214349e79c +set "_key=VQ9DP-NVHPH-T9HJC-J9PDT-KTQRG" &:: Pro Plus 2019 Preview +exit /b + +:fc7c4d0c-2e85-4bb9-afd4-01ed1476b5e9 +set "_key=XM2V9-DN9HH-QB449-XDGKC-W2RMW" &:: Project Pro 2019 Preview +exit /b + +:500f6619-ef93-4b75-bcb4-82819998a3ca +set "_key=N2CG9-YD3YK-936X4-3WR82-Q3X4H" &:: Visio Pro 2019 Preview +exit /b + +:f3fb2d68-83dd-4c8b-8f09-08e0d950ac3b +set "_key=HFPBN-RYGG8-HQWCW-26CH6-PDPVF" &:: Pro Plus 2021 Preview +exit /b + +:76093b1b-7057-49d7-b970-638ebcbfd873 +set "_key=WDNBY-PCYFY-9WP6G-BXVXM-92HDV" &:: Project Pro 2021 Preview +exit /b + +:a3b44174-2451-4cd6-b25f-66638bfb9046 +set "_key=2XYX7-NXXBK-9CK7W-K2TKW-JFJ7G" &:: Visio Pro 2021 Preview exit /b :: Office 2016 :829b8110-0e6f-4349-bca4-42803577788d -set "key=WGT24-HCNMF-FQ7XH-6M8K7-DRTW9" &:: Project Professional C2R-P +set "_key=WGT24-HCNMF-FQ7XH-6M8K7-DRTW9" &:: Project Professional C2R-P exit /b :cbbaca45-556a-4416-ad03-bda598eaa7c8 -set "key=D8NRQ-JTYM3-7J2DX-646CT-6836M" &:: Project Standard C2R-P +set "_key=D8NRQ-JTYM3-7J2DX-646CT-6836M" &:: Project Standard C2R-P exit /b :b234abe3-0857-4f9c-b05a-4dc314f85557 -set "key=69WXN-MBYV6-22PQG-3WGHK-RM6XC" &:: Visio Professional C2R-P +set "_key=69WXN-MBYV6-22PQG-3WGHK-RM6XC" &:: Visio Professional C2R-P exit /b :361fe620-64f4-41b5-ba77-84f8e079b1f7 -set "key=NY48V-PPYYH-3F4PX-XJRKJ-W4423" &:: Visio Standard C2R-P +set "_key=NY48V-PPYYH-3F4PX-XJRKJ-W4423" &:: Visio Standard C2R-P exit /b :e914ea6e-a5fa-4439-a394-a9bb3293ca09 -set "key=DMTCJ-KNRKX-26982-JYCKT-P7KB6" &:: MondoR +set "_key=DMTCJ-KNRKX-26982-JYCKT-P7KB6" &:: MondoR exit /b :9caabccb-61b1-4b4b-8bec-d10a3c3ac2ce -set "key=HFTND-W9MK4-8B7MJ-B6C4G-XQBR2" &:: Mondo +set "_key=HFTND-W9MK4-8B7MJ-B6C4G-XQBR2" &:: Mondo exit /b :d450596f-894d-49e0-966a-fd39ed4c4c64 -set "key=XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99" &:: Professional Plus +set "_key=XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99" &:: Professional Plus exit /b :dedfa23d-6ed1-45a6-85dc-63cae0546de6 -set "key=JNRGM-WHDWX-FJJG3-K47QV-DRTFM" &:: Standard +set "_key=JNRGM-WHDWX-FJJG3-K47QV-DRTFM" &:: Standard exit /b :4f414197-0fc2-4c01-b68a-86cbb9ac254c -set "key=YG9NW-3K39V-2T3HJ-93F3Q-G83KT" &:: Project Professional +set "_key=YG9NW-3K39V-2T3HJ-93F3Q-G83KT" &:: Project Professional exit /b :da7ddabc-3fbe-4447-9e01-6ab7440b4cd4 -set "key=GNFHQ-F6YQM-KQDGJ-327XX-KQBVC" &:: Project Standard +set "_key=GNFHQ-F6YQM-KQDGJ-327XX-KQBVC" &:: Project Standard exit /b :6bf301c1-b94a-43e9-ba31-d494598c47fb -set "key=PD3PC-RHNGV-FXJ29-8JK7D-RJRJK" &:: Visio Professional +set "_key=PD3PC-RHNGV-FXJ29-8JK7D-RJRJK" &:: Visio Professional exit /b :aa2a7821-1827-4c2c-8f1d-4513a34dda97 -set "key=7WHWN-4T7MP-G96JF-G33KR-W8GF4" &:: Visio Standard +set "_key=7WHWN-4T7MP-G96JF-G33KR-W8GF4" &:: Visio Standard exit /b :67c0fc0c-deba-401b-bf8b-9c8ad8395804 -set "key=GNH9Y-D2J4T-FJHGG-QRVH7-QPFDW" &:: Access +set "_key=GNH9Y-D2J4T-FJHGG-QRVH7-QPFDW" &:: Access exit /b :c3e65d36-141f-4d2f-a303-a842ee756a29 -set "key=9C2PK-NWTVB-JMPW8-BFT28-7FTBF" &:: Excel +set "_key=9C2PK-NWTVB-JMPW8-BFT28-7FTBF" &:: Excel exit /b :d8cace59-33d2-4ac7-9b1b-9b72339c51c8 -set "key=DR92N-9HTF2-97XKM-XW2WJ-XW3J6" &:: OneNote +set "_key=DR92N-9HTF2-97XKM-XW2WJ-XW3J6" &:: OneNote exit /b :ec9d9265-9d1e-4ed0-838a-cdc20f2551a1 -set "key=R69KK-NTPKF-7M3Q4-QYBHW-6MT9B" &:: Outlook +set "_key=R69KK-NTPKF-7M3Q4-QYBHW-6MT9B" &:: Outlook exit /b :d70b1bba-b893-4544-96e2-b7a318091c33 -set "key=J7MQP-HNJ4Y-WJ7YM-PFYGF-BY6C6" &:: Powerpoint +set "_key=J7MQP-HNJ4Y-WJ7YM-PFYGF-BY6C6" &:: Powerpoint exit /b :041a06cb-c5b8-4772-809f-416d03d16654 -set "key=F47MM-N3XJP-TQXJ9-BP99D-8K837" &:: Publisher +set "_key=F47MM-N3XJP-TQXJ9-BP99D-8K837" &:: Publisher exit /b :83e04ee1-fa8d-436d-8994-d31a862cab77 -set "key=869NQ-FJ69K-466HW-QYCP2-DDBV6" &:: Skype for Business +set "_key=869NQ-FJ69K-466HW-QYCP2-DDBV6" &:: Skype for Business exit /b :bb11badf-d8aa-470e-9311-20eaf80fe5cc -set "key=WXY84-JN2Q9-RBCCQ-3Q3J3-3PFJ6" &:: Word +set "_key=WXY84-JN2Q9-RBCCQ-3Q3J3-3PFJ6" &:: Word exit /b :: Office 2013 :dc981c6b-fc8e-420f-aa43-f8f33e5c0923 -set "key=42QTK-RN8M7-J3C4G-BBGYM-88CYV" &:: Mondo +set "_key=42QTK-RN8M7-J3C4G-BBGYM-88CYV" &:: Mondo exit /b :b322da9c-a2e2-4058-9e4e-f59a6970bd69 -set "key=YC7DK-G2NP3-2QQC3-J6H88-GVGXT" &:: Professional Plus +set "_key=YC7DK-G2NP3-2QQC3-J6H88-GVGXT" &:: Professional Plus exit /b :b13afb38-cd79-4ae5-9f7f-eed058d750ca -set "key=KBKQT-2NMXY-JJWGP-M62JB-92CD4" &:: Standard +set "_key=KBKQT-2NMXY-JJWGP-M62JB-92CD4" &:: Standard exit /b :4a5d124a-e620-44ba-b6ff-658961b33b9a -set "key=FN8TT-7WMH6-2D4X9-M337T-2342K" &:: Project Professional +set "_key=FN8TT-7WMH6-2D4X9-M337T-2342K" &:: Project Professional exit /b :427a28d1-d17c-4abf-b717-32c780ba6f07 -set "key=6NTH3-CW976-3G3Y2-JK3TX-8QHTT" &:: Project Standard +set "_key=6NTH3-CW976-3G3Y2-JK3TX-8QHTT" &:: Project Standard exit /b :e13ac10e-75d0-4aff-a0cd-764982cf541c -set "key=C2FG9-N6J68-H8BTJ-BW3QX-RM3B3" &:: Visio Professional +set "_key=C2FG9-N6J68-H8BTJ-BW3QX-RM3B3" &:: Visio Professional exit /b :ac4efaf0-f81f-4f61-bdf7-ea32b02ab117 -set "key=J484Y-4NKBF-W2HMG-DBMJC-PGWR7" &:: Visio Standard +set "_key=J484Y-4NKBF-W2HMG-DBMJC-PGWR7" &:: Visio Standard exit /b :6ee7622c-18d8-4005-9fb7-92db644a279b -set "key=NG2JY-H4JBT-HQXYP-78QH9-4JM2D" &:: Access +set "_key=NG2JY-H4JBT-HQXYP-78QH9-4JM2D" &:: Access exit /b :f7461d52-7c2b-43b2-8744-ea958e0bd09a -set "key=VGPNG-Y7HQW-9RHP7-TKPV3-BG7GB" &:: Excel +set "_key=VGPNG-Y7HQW-9RHP7-TKPV3-BG7GB" &:: Excel exit /b :fb4875ec-0c6b-450f-b82b-ab57d8d1677f -set "key=H7R7V-WPNXQ-WCYYC-76BGV-VT7GH" &:: Groove +set "_key=H7R7V-WPNXQ-WCYYC-76BGV-VT7GH" &:: Groove exit /b :a30b8040-d68a-423f-b0b5-9ce292ea5a8f -set "key=DKT8B-N7VXH-D963P-Q4PHY-F8894" &:: InfoPath +set "_key=DKT8B-N7VXH-D963P-Q4PHY-F8894" &:: InfoPath exit /b :1b9f11e3-c85c-4e1b-bb29-879ad2c909e3 -set "key=2MG3G-3BNTT-3MFW9-KDQW3-TCK7R" &:: Lync +set "_key=2MG3G-3BNTT-3MFW9-KDQW3-TCK7R" &:: Lync exit /b :efe1f3e6-aea2-4144-a208-32aa872b6545 -set "key=TGN6P-8MMBC-37P2F-XHXXK-P34VW" &:: OneNote +set "_key=TGN6P-8MMBC-37P2F-XHXXK-P34VW" &:: OneNote exit /b :771c3afa-50c5-443f-b151-ff2546d863a0 -set "key=QPN8Q-BJBTJ-334K3-93TGY-2PMBT" &:: Outlook +set "_key=QPN8Q-BJBTJ-334K3-93TGY-2PMBT" &:: Outlook exit /b :8c762649-97d1-4953-ad27-b7e2c25b972e -set "key=4NT99-8RJFH-Q2VDH-KYG2C-4RD4F" &:: Powerpoint +set "_key=4NT99-8RJFH-Q2VDH-KYG2C-4RD4F" &:: Powerpoint exit /b :00c79ff1-6850-443d-bf61-71cde0de305f -set "key=PN2WF-29XG2-T9HJ7-JQPJR-FCXK4" &:: Publisher +set "_key=PN2WF-29XG2-T9HJ7-JQPJR-FCXK4" &:: Publisher exit /b :d9f5b1c6-5386-495a-88f9-9ad6b41ac9b3 -set "key=6Q7VD-NX8JD-WJ2VH-88V73-4GBJ7" &:: Word +set "_key=6Q7VD-NX8JD-WJ2VH-88V73-4GBJ7" &:: Word exit /b :: Office 2010 :09ed9640-f020-400a-acd8-d7d867dfd9c2 -set "key=YBJTT-JG6MD-V9Q7P-DBKXJ-38W9R" &:: Mondo +set "_key=YBJTT-JG6MD-V9Q7P-DBKXJ-38W9R" &:: Mondo exit /b :ef3d4e49-a53d-4d81-a2b1-2ca6c2556b2c -set "key=7TC2V-WXF6P-TD7RT-BQRXR-B8K32" &:: Mondo2 +set "_key=7TC2V-WXF6P-TD7RT-BQRXR-B8K32" &:: Mondo2 exit /b :6f327760-8c5c-417c-9b61-836a98287e0c -set "key=VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB" &:: Professional Plus +set "_key=VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB" &:: Professional Plus exit /b :9da2a678-fb6b-4e67-ab84-60dd6a9c819a -set "key=V7QKV-4XVVR-XYV4D-F7DFM-8R6BM" &:: Standard +set "_key=V7QKV-4XVVR-XYV4D-F7DFM-8R6BM" &:: Standard exit /b :df133ff7-bf14-4f95-afe3-7b48e7e331ef -set "key=YGX6F-PGV49-PGW3J-9BTGG-VHKC6" &:: Project Professional +set "_key=YGX6F-PGV49-PGW3J-9BTGG-VHKC6" &:: Project Professional exit /b :5dc7bf61-5ec9-4996-9ccb-df806a2d0efe -set "key=4HP3K-88W3F-W2K3D-6677X-F9PGB" &:: Project Standard +set "_key=4HP3K-88W3F-W2K3D-6677X-F9PGB" &:: Project Standard exit /b :92236105-bb67-494f-94c7-7f7a607929bd -set "key=D9DWC-HPYVV-JGF4P-BTWQB-WX8BJ" &:: Visio Premium +set "_key=D9DWC-HPYVV-JGF4P-BTWQB-WX8BJ" &:: Visio Premium exit /b :e558389c-83c3-4b29-adfe-5e4d7f46c358 -set "key=7MCW8-VRQVK-G677T-PDJCM-Q8TCP" &:: Visio Professional +set "_key=7MCW8-VRQVK-G677T-PDJCM-Q8TCP" &:: Visio Professional exit /b :9ed833ff-4f92-4f36-b370-8683a4f13275 -set "key=767HD-QGMWX-8QTDB-9G3R2-KHFGJ" &:: Visio Standard +set "_key=767HD-QGMWX-8QTDB-9G3R2-KHFGJ" &:: Visio Standard exit /b :8ce7e872-188c-4b98-9d90-f8f90b7aad02 -set "key=V7Y44-9T38C-R2VJK-666HK-T7DDX" &:: Access +set "_key=V7Y44-9T38C-R2VJK-666HK-T7DDX" &:: Access exit /b :cee5d470-6e3b-4fcc-8c2b-d17428568a9f -set "key=H62QG-HXVKF-PP4HP-66KMR-CW9BM" &:: Excel +set "_key=H62QG-HXVKF-PP4HP-66KMR-CW9BM" &:: Excel exit /b :8947d0b8-c33b-43e1-8c56-9b674c052832 -set "key=QYYW6-QP4CB-MBV6G-HYMCJ-4T3J4" &:: Groove (SharePoint Workspace) +set "_key=QYYW6-QP4CB-MBV6G-HYMCJ-4T3J4" &:: Groove - SharePoint Workspace exit /b :ca6b6639-4ad6-40ae-a575-14dee07f6430 -set "key=K96W8-67RPQ-62T9Y-J8FQJ-BT37T" &:: InfoPath +set "_key=K96W8-67RPQ-62T9Y-J8FQJ-BT37T" &:: InfoPath exit /b :ab586f5c-5256-4632-962f-fefd8b49e6f4 -set "key=Q4Y4M-RHWJM-PY37F-MTKWH-D3XHX" &:: OneNote +set "_key=Q4Y4M-RHWJM-PY37F-MTKWH-D3XHX" &:: OneNote exit /b :ecb7c192-73ab-4ded-acf4-2399b095d0cc -set "key=7YDC2-CWM8M-RRTJC-8MDVC-X3DWQ" &:: Outlook +set "_key=7YDC2-CWM8M-RRTJC-8MDVC-X3DWQ" &:: Outlook exit /b :45593b1d-dfb1-4e91-bbfb-2d5d0ce2227a -set "key=RC8FX-88JRY-3PF7C-X8P67-P4VTT" &:: Powerpoint +set "_key=RC8FX-88JRY-3PF7C-X8P67-P4VTT" &:: Powerpoint exit /b :b50c4f75-599b-43e8-8dcd-1081a7967241 -set "key=BFK7F-9MYHM-V68C7-DRQ66-83YTP" &:: Publisher +set "_key=BFK7F-9MYHM-V68C7-DRQ66-83YTP" &:: Publisher exit /b :2d0882e7-a4e7-423b-8ccc-70d91e0158b1 -set "key=HVHB3-C6FV7-KQX9W-YQG79-CRY7T" &:: Word +set "_key=HVHB3-C6FV7-KQX9W-YQG79-CRY7T" &:: Word exit /b :ea509e87-07a1-4a45-9edc-eba5a39f36af -set "key=D6QFG-VBYP2-XQHM7-J97RH-VVRCK" &:: Home and Business +set "_key=D6QFG-VBYP2-XQHM7-J97RH-VVRCK" &:: Small Business Basics exit /b :E_Admin echo %_err% -echo This script require administrator privileges. -echo To do so, right click on this script and select 'Run as administrator' +echo This script requires administrator privileges. +echo To do so, right-click on this script and select 'Run as administrator' +echo. +if %_invpth% EQU 1 ( +echo. +echo === WARNING === +echo Disallowed special characters are detected in the file path name. +echo Before you can use 'Run as administrator' successfully, +echo make sure the path do not have any of the following characters: +echo ^` ^~ ^! ^@ %% ^^ ^& ^( ^) [ ] { } ^+ ^= ^; ^' ^, echo. +) echo Press any key to exit. +if %_Debug% EQU 1 goto :eof +if %Unattend% EQU 1 goto :eof pause >nul goto :eof +:E_SYM +echo. +echo %_err% +echo Symbolic link creation failed. +echo Verify that Antivirus protection is OFF or the current folder is excluded. +goto :TheEnd + :E_DLL +echo. echo %_err% -echo Required file !xOS!.dll is not found. -echo Make sure folder path is simple and Antivirus protection is OFF or excluded. +echo Required file bin\%xOS%.dll is not found. +echo Verify that Antivirus protection is OFF or the current folder is excluded. echo. echo Turn External option ON to activate via external KMS Server. -goto :END - -:E_SYM -echo %_err% -echo Create symbolic link failed. -echo Make sure folder path is simple and Antivirus protection is OFF or excluded. -goto :END +goto :TheEnd :UnsupportedVersion echo %_err% echo Unsupported OS version Detected. -echo Project is supported only for Windows 7/8/8.1/10 and their Server equivalent. -:END +echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalent. +:TheEnd echo. if %Unattend% EQU 0 echo Press any key to exit. %_Pause% diff --git a/AutoRenewal-Setup.cmd b/AutoRenewal-Setup.cmd index 28aac45..14cfb71 100644 --- a/AutoRenewal-Setup.cmd +++ b/AutoRenewal-Setup.cmd @@ -1,152 +1,410 @@ +@setlocal DisableDelayedExpansion +@set uivr=v44 @echo off +:: change to 0 to keep configured KMS cache upon removal (recommended only if you plan to reinstall) set ClearKMSCache=1 -:: ################################################################# +:: change to 1 to enable debug mode +set _Debug=0 -set KMS_IP=172.16.0.2 +:: change to 1 to suppress any output +set Silent=0 + +:: change to 1 to redirect output to a text file, works only with Silent=1 +set Logger=0 + +:: Notice for advanced users on Windows 64-bit (x64 / ARM64): +:: when you bundle KMS_VL_ALL script(s) inside self-extracting program or run it from another command script +:: if the exe pack or the caller script is running as 32-bit (x86) process +:: KMS_VL_ALL script(s) will close then relaunch itself using 64-bit (x64 / ARM64) cmd.exe +:: in that case, be advised not to proceed your pack or caller script depending on KMS_VL_ALL script(s) closure +:: instead, make sure the exe pack or the other caller script are already 64-bit (x64 / ARM64) process + +:: ################################################################### +:: # NORMALLY THERE IS NO NEED TO CHANGE ANYTHING BELOW THIS COMMENT # +:: ################################################################### + +set KMS_IP=0.0.0.0 set KMS_Port=1688 set KMS_Emulation=1 +set Unattend=0 + +set "_Null=1>nul 2>nul" + +set "_cmdf=%~f0" +if exist "%SystemRoot%\Sysnative\cmd.exe" ( +setlocal EnableDelayedExpansion +start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %*" +exit /b +) +if exist "%SystemRoot%\SysArm32\cmd.exe" if /i %PROCESSOR_ARCHITECTURE%==AMD64 ( +setlocal EnableDelayedExpansion +start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %*" +exit /b +) + +set ForceIns=0 +set ForceRem=0 +set "_args=%*" +if not defined _args goto :NoProgArgs +if "%~1"=="" set "_args="&goto :NoProgArgs + +set _args=%_args:"=% +for %%A in (%_args%) do ( +if /i "%%A"=="/d" (set _Debug=1 +) else if /i "%%A"=="/u" (set Unattend=1 +) else if /i "%%A"=="/s" (set Silent=1 +) else if /i "%%A"=="/l" (set Logger=1 +) else if /i "%%A"=="/i" (set ForceIns=1&set ForceRem=0 +) else if /i "%%A"=="/r" (set ForceIns=0&set ForceRem=1 +) else if /i "%%A"=="/k" (set ClearKMSCache=0 +) +) +if %ForceIns% EQU 1 set Unattend=1 +if %ForceRem% EQU 1 set Unattend=1 + +:NoProgArgs +if %Silent% EQU 1 set Unattend=1 +set "_run=nul" +if %Logger% EQU 1 set _run="%~dpn0_Silent.log" -set "SysPath=%Windir%\System32" -if exist "%Windir%\Sysnative\reg.exe" (set "SysPath=%Windir%\Sysnative") -set "Path=%SysPath%;%Windir%;%SysPath%\Wbem;%SysPath%\WindowsPowerShell\v1.0\" +set "SysPath=%SystemRoot%\System32" +if exist "%SystemRoot%\Sysnative\reg.exe" (set "SysPath=%SystemRoot%\Sysnative") +set "Path=%SysPath%;%SystemRoot%;%SysPath%\Wbem;%SysPath%\WindowsPowerShell\v1.0\" +set "_err===== ERROR ====" +set "_psc=powershell -nop -c" +set "_buf={$W=$Host.UI.RawUI.WindowSize;$B=$Host.UI.RawUI.BufferSize;$W.Height=27;$B.Height=300;$Host.UI.RawUI.WindowSize=$W;$Host.UI.RawUI.BufferSize=$B;}" +set "o_x64=684103f5c312ae956e66a02b965d9aad59710745" +set "o_x86=da8f931c7f3bc6643e20063e075cd8fa044b53ae" +set "o_arm=1139ae6243934ca621e6d4ed2e2f34cc130ef88a" +if /i "%PROCESSOR_ARCHITECTURE%"=="amd64" set "xBit=x64"&set "xOS=x64"&set "_orig=%o_x64%" +if /i "%PROCESSOR_ARCHITECTURE%"=="arm64" set "xBit=x86"&set "xOS=A64"&set "_orig=%o_arm%" +if /i "%PROCESSOR_ARCHITECTURE%"=="x86" if "%PROCESSOR_ARCHITEW6432%"=="" set "xBit=x86"&set "xOS=x86"&set "_orig=%o_x86%" +if /i "%PROCESSOR_ARCHITEW6432%"=="amd64" set "xBit=x64"&set "xOS=x64"&set "_orig=%o_x64%" +if /i "%PROCESSOR_ARCHITEW6432%"=="arm64" set "xBit=x86"&set "xOS=A64"&set "_orig=%o_arm%" -fsutil dirty query %SystemDrive% >nul 2>&1 || goto :E_Admin +set _invpth=0 +set "param=%~f0" +cmd /v:on /c echo(^^!param^^!| findstr /R "[| ` ~ ! @ %% \^ & ( ) \[ \] { } + = ; ' , |]*^" 1>nul 2>nul +if %errorlevel% EQU 0 set _invpth=1 +reg query HKU\S-1-5-19 1>nul 2>nul || goto :E_Admin -set "_Nul1=1>nul" -set "_Nul2=2>nul" -set "_Nul6=2^>nul" -set "_Nul3=1>nul 2>nul" -set "_Pause=pause >nul" set "_temp=%SystemRoot%\Temp" +set "_log=%~dpn0" set "_work=%~dp0" if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%" -set xOS=x64 -if /i "%PROCESSOR_ARCHITECTURE%"=="x86" (if not defined PROCESSOR_ARCHITEW6432 set xOS=Win32) +set _UNC=0 +if "%_work:~0,2%"=="\\" set _UNC=1 +for /f "skip=2 tokens=2*" %%a in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Desktop') do call set "_dsk=%%b" +if exist "%PUBLIC%\Desktop\desktop.ini" set "_dsk=%PUBLIC%\Desktop" +setlocal EnableDelayedExpansion + +if %_Debug% EQU 0 ( + set "_Nul1=1>nul" + set "_Nul2=2>nul" + set "_Nul6=2^>nul" + set "_Nul3=1>nul 2>nul" + set "_Pause=pause >nul" + if %Unattend% EQU 1 set "_Pause=" + if %Silent% EQU 0 (call :Begin) else (call :Begin >!_run! 2>&1) +) else ( + set "_Nul1=" + set "_Nul2=" + set "_Nul6=" + set "_Nul3=" + set "_Pause=" + copy /y nul "!_work!\#.rw" 1>nul 2>nul && (if exist "!_work!\#.rw" del /f /q "!_work!\#.rw") || (set "_log=!_dsk!\%~n0") + if %Silent% EQU 0 ( + echo. + echo Running in Debug Mode... + if not defined _args (echo The window will be closed when finished) else (echo please wait...) + echo. + echo writing debug log to: + echo "!_log!_Debug.log" + ) + @echo on + @prompt $G + @call :Begin >"!_log!_tmp.log" 2>&1 &cmd /u /c type "!_log!_tmp.log">"!_log!_Debug.log"&del "!_log!_tmp.log" +) +@color 07 +@title %ComSpec% +@echo off +@exit /b + +:Begin +if %_Debug% EQU 1 ( +if defined _args echo %_args% +) +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 "OSPP=SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" +set "OPPk=SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" set "SPPk=SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" -set _Hook="%SystemRoot%\system32\SppExtComObjHook.dll" +set _Hook="%SysPath%\SppExtComObjHook.dll" +set w7inf=%SystemRoot%\Migration\WTR\KMS_VL_ALL.inf set "_TaskEx=\Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger" set "_TaskOs=\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTaskLogon" -set "line=============================================================" -color 07 -title Auto Renewal Setup -mode con cols=98 lines=28 -wmic path SoftwareLicensingProduct where (Description like '%%KMSCLIENT%%') get Name %_Nul2% | findstr /i Windows %_Nul1% && (set SppHook=1) || (set SppHook=0) -wmic path OfficeSoftwareProtectionService get Version %_Nul3% && (set OsppHook=1) || (set OsppHook=0) -setlocal EnableExtensions EnableDelayedExpansion - +set "line3=____________________________________________________________" for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G - set OffVer="%IFEO%\osppsvc.exe" +set SSppHook=0 +for /f %%A in ('dir /b /ad %SysPath%\spp\tokens\skus') do ( + if %winbuild% GEQ 9200 if exist "%SysPath%\spp\tokens\skus\%%A\*GVLK*.xrm-ms" set SSppHook=1 + if %winbuild% LSS 9200 if exist "%SysPath%\spp\tokens\skus\%%A\*VLKMS*.xrm-ms" set SSppHook=1 + if %winbuild% LSS 9200 if exist "%SysPath%\spp\tokens\skus\%%A\*VL-BYPASS*.xrm-ms" set SSppHook=1 +) +set OsppHook=1 +sc query osppsvc %_Nul3% +if %errorlevel% equ 1060 set OsppHook=0 + +set ESU_KMS=0 +if %winbuild% LSS 9200 for /f %%A in ('dir /b /ad %SysPath%\spp\tokens\channels') do ( + if exist "%SysPath%\spp\tokens\channels\%%A\*VL-BYPASS*.xrm-ms" set ESU_KMS=1 +) +set ESU_EDT=0 +if %ESU_KMS% EQU 1 for %%A in (%ESUEditions%) do ( + if exist "%SysPath%\spp\tokens\skus\Security-SPP-Component-SKU-%%A\*.xrm-ms" set ESU_EDT=1 +) +if %ESU_EDT% EQU 1 set SSppHook=1 + if %winbuild% GEQ 9200 ( - set OSType=Win8 - set SppVer="%IFEO%\SppExtComObj.exe" + set OSType=Win8 + set SppVer=SppExtComObj.exe ) else if %winbuild% GEQ 7600 ( - set OSType=Win7 - set SppVer="%IFEO%\sppsvc.exe" + set OSType=Win7 + set SppVer=sppsvc.exe ) else ( - goto :UnsupportedVersion + goto :UnsupportedVersion ) - -echo. -if exist "%SystemRoot%\system32\SppExtComObj*.dll" ( -dir /b /al %_Hook% %_Nul3% || goto :uninst +if %OSType% EQU Win8 reg query "%IFEO%\sppsvc.exe" %_Nul3% && ( +reg delete "%IFEO%\sppsvc.exe" /f %_Nul3% +call :StopService sppsvc ) -if not exist "!_work!\bin\!xOS!.dll" goto :E_DLL + +color 07 +if %Unattend% EQU 0 title Auto Renewal Setup %uivr% +if %Silent% EQU 0 if %_Debug% EQU 0 mode con cols=100 lines=28 + +if %ForceIns% EQU 1 goto :inst +if %ForceRem% EQU 1 goto :remv +if exist %_Hook% dir /b /al %_Hook% %_Nul3% || goto :remv +reg query "%IFEO%\%SppVer%" /v VerifierFlags %_Nul3% && goto :remv +reg query "%IFEO%\osppsvc.exe" /v VerifierFlags %_Nul3% && goto :remv +if not exist "!_work!\bin\%xOS%.dll" goto :E_DLL :inst +echo. +if %_Debug% NEQ 0 goto :pinst +if %Unattend% NEQ 0 ( +echo Mode: Installation +goto :pinst +) choice /C YN /N /M "Local KMS Emulator will be installed on your computer. Continue? [y/n]: " -if errorlevel 2 exit +if errorlevel 2 exit /b +:pinst echo. -echo %line% +echo %line3% call :StopService sppsvc if %OsppHook% NEQ 0 call :StopService osppsvc if %winbuild% GEQ 9600 ( - WMIC /NAMESPACE:\\root\Microsoft\Windows\Defender PATH MSFT_MpPreference call Add ExclusionPath=%_Hook% %_Nul3% && set "AddExc= and Windows Defender exclusion" + reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" /v NoGenTicket /t REG_DWORD /d 1 /f %_Nul3% + if %winbuild% EQU 14393 reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" /v NoAcquireGT /t REG_DWORD /d 1 /f %_Nul3% + WMIC /NAMESPACE:\\root\Microsoft\Windows\Defender PATH MSFT_MpPreference call Add ExclusionPath=%_Hook% Force=True %_Nul3% && set "AddExc= and Windows Defender exclusion" ) echo. echo Adding File%AddExc%... -echo %_Hook% +echo %SystemRoot%\System32\SppExtComObjHook.dll for %%# in (SppExtComObjHookAvrf.dll,SppExtComObjHook.dll,SppExtComObjPatcher.dll,SppExtComObjPatcher.exe) do ( - if exist "%SystemRoot%\system32\%%#" del /f /q "%SystemRoot%\system32\%%#" %_Nul3% + if exist "%SysPath%\%%#" del /f /q "%SysPath%\%%#" %_Nul3% + if exist "%SystemRoot%\SysWOW64\%%#" del /f /q "%SystemRoot%\SysWOW64\%%#" %_Nul3% +) +for /f "skip=1 tokens=* delims=" %%# in ('certutil -hashfile "!_work!\bin\%xOS%.dll" SHA1^|findstr /i /v CertUtil') do set "_hash=%%#" +set "_hash=%_hash: =%" +if /i not "%_hash%"=="%_orig%" ( +echo. +echo === WARNING === +echo SHA1 hash verification mismatch. +echo "bin\%xOS%.dll" +echo Expected: %_orig% +echo Detected: %_hash% +echo. +echo If you compiled the file yourself, then ignore this message. ) -copy /y "!_work!\bin\!xOS!.dll" %_Hook% %_Nul3% || (echo Failed&goto :END) +copy /y "!_work!\bin\%xOS%.dll" %_Hook% %_Nul3% || (echo Failed&del /f /q %_Hook%&goto :TheEnd) echo. echo Adding Registry Keys... -echo %SppVer% -if %OSType% EQU Win8 ( +if %SSppHook% NEQ 0 call :CreateIFEOEntry %SppVer% +call :CreateIFEOEntry osppsvc.exe +if %OSType% EQU Win7 ( call :CreateIFEOEntry SppExtComObj.exe +if %SSppHook% NEQ 0 if not exist %w7inf% ( + echo.&echo Adding migration fail-safe...&echo %w7inf% + if not exist "%SystemRoot%\Migration\WTR" md "%SystemRoot%\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 [*]" + )>%w7inf% + ) ) -if %OSType% EQU Win7 if %SppHook% NEQ 0 ( -call :CreateIFEOEntry sppsvc.exe -) -echo %OffVer% -call :CreateIFEOEntry osppsvc.exe -if %winbuild% GEQ 9200 call :CreateTask -if %winbuild% GEQ 9200 schtasks /query /tn "%_TaskEx%" %_Nul3% && ( +if %OSType% EQU Win8 call :CreateTask +if not exist "!_work!\Activate.cmd" ( +echo %line3% echo. -echo Adding Schedule Task... -echo "%_TaskEx%" +echo %_err% +echo Activate.cmd is missing, skipping activation... +goto :einst +) +if %Silent% EQU 0 if %_Debug% EQU 0 ( +%_Nul3% %_psc% "&%_buf%" +if %Unattend% EQU 0 title Auto Renewal Setup %uivr% ) echo. -echo %line% +echo %line3% +set "_para=/u" +if %_Debug% EQU 1 set "_para=!_para! /d" +if %Silent% EQU 1 set "_para=!_para! /s" +if %Logger% EQU 1 set "_para=!_para! /l" +cmd.exe /c ""!_work!\Activate.cmd" !_para!" +if %Unattend% EQU 0 title Auto Renewal Setup %uivr% +:einst +echo %line3% echo. echo Done. -echo. -echo It is recommended to exclude this file in the Antivirus protection. -echo %_Hook% -echo. -echo Now run the file Activate.cmd to complete the Auto Renewal Activation. -goto :END +echo Make sure to exclude this file in the Antivirus protection. +echo %SystemRoot%\System32\SppExtComObjHook.dll +goto :TheEnd -:uninst +:remv +echo. +if %_Debug% NEQ 0 goto :premv +if %Unattend% NEQ 0 ( +echo Mode: Removal +goto :premv +) choice /C YN /N /M "Local KMS Emulator will be removed from your computer. Continue? [y/n]: " -if errorlevel 2 exit +if errorlevel 2 exit /b +:premv echo. -echo %line% +echo %line3% call :StopService sppsvc if %OsppHook% NEQ 0 call :StopService osppsvc if %winbuild% GEQ 9600 ( -reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" /v "NoGenTicket" /f %_Nul3% -for %%# in (SppExtComObjHookAvrf.dll,SppExtComObjHook.dll,SppExtComObjPatcher.dll,SppExtComObjPatcher.exe) do ( - WMIC /NAMESPACE:\\root\Microsoft\Windows\Defender PATH MSFT_MpPreference call Remove ExclusionPath="%SystemRoot%\system32\%%#" %_Nul3% && set "RemExc= and Windows Defender exclusions" - ) + for %%# in (NoGenTicket,NoAcquireGT) do reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" /v %%# /f %_Null% + WMIC /NAMESPACE:\\root\Microsoft\Windows\Defender PATH MSFT_MpPreference call Remove ExclusionPath=%_Hook% Force=True %_Nul3% && set "RemExc= and Windows Defender exclusions" ) echo. echo Removing Files%RemExc%... -for %%# in (SppExtComObjHookAvrf.dll,SppExtComObjHook.dll,SppExtComObjPatcher.dll,SppExtComObjPatcher.exe) do ( - if exist "%SystemRoot%\system32\%%#" (echo "%SystemRoot%\system32\%%#"&del /f /q "%SystemRoot%\system32\%%#") +for %%# in (SppExtComObjHookAvrf.dll,SppExtComObjHook.dll,SppExtComObjPatcher.dll,SppExtComObjPatcher.exe) do if exist "%SysPath%\%%#" ( + echo %SystemRoot%\System32\%%# + del /f /q "%SysPath%\%%#" %_Nul3% +) +for %%# in (SppExtComObjHookAvrf.dll,SppExtComObjHook.dll,SppExtComObjPatcher.dll,SppExtComObjPatcher.exe) do if exist "%SystemRoot%\SysWOW64\%%#" ( + echo %SystemRoot%\SysWOW64\%%# + del /f /q "%SystemRoot%\SysWOW64\%%#" %_Nul3% +) +if exist %w7inf% ( + echo %w7inf% + del /f /q %w7inf% ) echo. echo Removing Registry Keys... -echo %SppVer% -if %OSType% EQU Win8 ( -call :RemoveIFEOEntry SppExtComObj.exe +for %%# in (SppExtComObj.exe,sppsvc.exe,osppsvc.exe) do reg query "%IFEO%\%%#" %_Nul3% && ( + call :RemoveIFEOEntry %%# ) -if %OSType% EQU Win7 if %SppHook% NEQ 0 ( -call :RemoveIFEOEntry sppsvc.exe -) -echo %OffVer% -call :RemoveIFEOEntry osppsvc.exe -if %winbuild% GEQ 9200 schtasks /query /tn "%_TaskEx%" %_Nul3% && ( +if %OSType% EQU Win8 schtasks /query /tn "%_TaskEx%" %_Nul3% && ( echo. echo Removing Schedule Task... -echo "%_TaskEx%" +echo %_TaskEx% schtasks /delete /f /tn "%_TaskEx%" %_Nul3% ) -if %ClearKMSCache% EQU 1 ( +if %ClearKMSCache% EQU 1 (call :cCache) else (call :cREG %_Nul3%) echo. -echo Clearing KMS Cache... -call :cKMS SoftwareLicensingProduct SoftwareLicensingService %_Nul3% -if %OsppHook% NEQ 0 call :cKMS OfficeSoftwareProtectionProduct OfficeSoftwareProtectionService %_Nul3% -call :cREG %_Nul3% +echo %line3% +echo. +echo Done. +goto :TheEnd + +:cREG +reg add "HKLM\%SPPk%" /f /v KeyManagementServiceName /t REG_SZ /d "0.0.0.0" +reg add "HKLM\%SPPk%" /f /v KeyManagementServicePort /t REG_SZ /d "1688" +reg delete "HKLM\%SPPk%" /f /v DisableDnsPublishing +reg delete "HKLM\%SPPk%" /f /v DisableKeyManagementServiceHostCaching +reg delete "HKLM\%SPPk%\%_wApp%" /f +if %winbuild% GEQ 9200 ( +if not %xOS%==x86 ( +reg add "HKLM\%SPPk%" /f /v KeyManagementServiceName /t REG_SZ /d "0.0.0.0" /reg:32 +reg add "HKLM\%SPPk%" /f /v KeyManagementServicePort /t REG_SZ /d "1688" /reg:32 +reg delete "HKLM\%SPPk%\%_oApp%" /f /reg:32 +reg add "HKLM\%SPPk%\%_oApp%" /f /v KeyManagementServiceName /t REG_SZ /d "0.0.0.0" /reg:32 +reg add "HKLM\%SPPk%\%_oApp%" /f /v KeyManagementServicePort /t REG_SZ /d "1688" /reg:32 +) +reg delete "HKLM\%SPPk%\%_oApp%" /f +reg add "HKLM\%SPPk%\%_oApp%" /f /v KeyManagementServiceName /t REG_SZ /d "0.0.0.0" +reg add "HKLM\%SPPk%\%_oApp%" /f /v KeyManagementServicePort /t REG_SZ /d "1688" ) +if %winbuild% GEQ 9600 ( +reg delete "HKU\S-1-5-20\%SPPk%\%_wApp%" /f +reg delete "HKU\S-1-5-20\%SPPk%\%_oApp%" /f +) +if %OsppHook% EQU 0 ( +goto :eof +) +reg add "HKLM\%OPPk%" /f /v KeyManagementServiceName /t REG_SZ /d "0.0.0.0" +reg delete "HKLM\%OPPk%" /f /v KeyManagementServicePort +reg delete "HKLM\%OPPk%" /f /v DisableDnsPublishing +reg delete "HKLM\%OPPk%" /f /v DisableKeyManagementServiceHostCaching +reg delete "HKLM\%OPPk%\%_oA14%" /f +reg delete "HKLM\%OPPk%\%_oApp%" /f +goto :eof + +:rREG +reg delete "HKLM\%SPPk%" /f /v KeyManagementServiceName +reg delete "HKLM\%SPPk%" /f /v KeyManagementServicePort +reg delete "HKLM\%SPPk%" /f /v DisableDnsPublishing +reg delete "HKLM\%SPPk%" /f /v DisableKeyManagementServiceHostCaching +reg delete "HKLM\%SPPk%\%_wApp%" /f +if %winbuild% GEQ 9200 ( +if not %xOS%==x86 ( +reg delete "HKLM\%SPPk%" /f /v KeyManagementServiceName /reg:32 +reg delete "HKLM\%SPPk%" /f /v KeyManagementServicePort /reg:32 +reg delete "HKLM\%SPPk%\%_oApp%" /f /reg:32 +) +reg delete "HKLM\%SPPk%\%_oApp%" /f +) +if %winbuild% GEQ 9600 ( +reg delete "HKU\S-1-5-20\%SPPk%\%_wApp%" /f +reg delete "HKU\S-1-5-20\%SPPk%\%_oApp%" /f +) +reg delete "HKLM\%OPPk%" /f /v KeyManagementServiceName +reg delete "HKLM\%OPPk%" /f /v KeyManagementServicePort +reg delete "HKLM\%OPPk%" /f /v DisableDnsPublishing +reg delete "HKLM\%OPPk%" /f /v DisableKeyManagementServiceHostCaching +reg delete "HKLM\%OPPk%\%_oA14%" /f +reg delete "HKLM\%OPPk%\%_oApp%" /f +goto :eof + +:cCache +echo. +echo Clearing KMS Cache... +call :rREG %_Nul3% +set "_C16R=" +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath" %_Nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1" +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath /reg:32" %_Nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" set "_C16R=1" +if %winbuild% GEQ 9200 if defined _C16R ( echo. -echo %line% +echo ## Notice ## echo. -echo Done. -goto :END +echo To make sure Office programs do not show a non-genuine banner +echo please apply manual or auto-renewal activation, and don't uninstall afterward. +) +goto :eof :StopService sc query %1 | find /i "STOPPED" %_Nul1% || net stop %1 /y %_Nul3% @@ -154,9 +412,12 @@ sc query %1 | find /i "STOPPED" %_Nul1% || sc stop %1 %_Nul3% goto :eof :CreateIFEOEntry -reg delete "%IFEO%\%1" /f /v Debugger %_Nul3% -reg add "%IFEO%\%1" /f /v VerifierDlls /t REG_SZ /d "SppExtComObjHook.dll" %_Nul3% || (echo Failed&del /f /q %_Hook%&goto :END) -reg add "%IFEO%\%1" /f /v GlobalFlag /t REG_DWORD /d 256 %_Nul3% +echo [%IFEO%\%1] +reg delete "%IFEO%\%1" /f /v Debugger %_Null% +reg add "%IFEO%\%1" /f /v VerifierDlls /t REG_SZ /d "SppExtComObjHook.dll" %_Nul3% || (echo Failed&del /f /q %_Hook%&goto :TheEnd) +reg add "%IFEO%\%1" /f /v VerifierDebug /t REG_DWORD /d 0x00000000 %_Nul3% +reg add "%IFEO%\%1" /f /v VerifierFlags /t REG_DWORD /d 0x80000000 %_Nul3% +reg add "%IFEO%\%1" /f /v GlobalFlag /t REG_DWORD /d 0x00000100 %_Nul3% reg add "%IFEO%\%1" /f /v KMS_Emulation /t REG_DWORD /d %KMS_Emulation% %_Nul3% if /i %1 EQU osppsvc.exe ( reg add "HKLM\%OSPP%" /f /v KeyManagementServiceName /t REG_SZ /d %KMS_IP% %_Nul3% @@ -165,15 +426,15 @@ reg add "HKLM\%OSPP%" /f /v KeyManagementServicePort /t REG_SZ /d %KMS_Port% %_N goto :eof :RemoveIFEOEntry +echo [%IFEO%\%1] if /i %1 NEQ osppsvc.exe ( -reg delete "%IFEO%\%1" /f %_Nul3% +reg delete "%IFEO%\%1" /f %_Null% goto :eof ) -if %OsppHook% EQU 0 if /i %1 EQU osppsvc.exe ( -reg delete "%IFEO%\%1" /f %_Nul3% -goto :eof +if %OsppHook% EQU 0 ( +reg delete "%IFEO%\%1" /f %_Null% ) -for %%A in (Debugger,VerifierDlls,GlobalFlag,KMS_Emulation,KMS_ActivationInterval,KMS_RenewalInterval,Office2010,Office2013,Office2016,Office2019) do reg delete "%IFEO%\%1" /f /v %%A %_Nul3% +if %OsppHook% NEQ 0 for %%A in (Debugger,VerifierDlls,VerifierDebug,VerifierFlags,GlobalFlag,KMS_Emulation,KMS_ActivationInterval,KMS_RenewalInterval,Office2010,Office2013,Office2016,Office2019) do reg delete "%IFEO%\%1" /v %%A /f %_Null% goto :eof :CreateTask @@ -188,62 +449,46 @@ schtasks /query /tn "%_TaskEx%" %_Nul3% || ( schtasks /query /tn "%_TaskEx%" %_Nul3% || ( if exist "!_work!\bin\SvcTrigger.xml" schtasks /create /tn "%_TaskEx%" /xml "!_work!\bin\SvcTrigger.xml" /f %_Nul3% ) -goto :eof - -:cKMS -set spp=%1 -set sps=%2 -for /f "tokens=2 delims==" %%G in ('"wmic path %spp% where (Description like '%%KMSCLIENT%%') get ID /VALUE" %_Nul6%') do (set app=%%G&call :cAPP) -for /f "tokens=2 delims==" %%A in ('"wmic path %sps% get Version /VALUE"') do set ver=%%A -wmic path %sps% where version='%ver%' call ClearKeyManagementServiceMachine -wmic path %sps% where version='%ver%' call ClearKeyManagementServicePort -wmic path %sps% where version='%ver%' call DisableKeyManagementServiceDnsPublishing 1 -wmic path %sps% where version='%ver%' call DisableKeyManagementServiceHostCaching 1 -goto :eof - -:cAPP -wmic path %spp% where ID='%app%' call ClearKeyManagementServiceMachine -wmic path %spp% where ID='%app%' call ClearKeyManagementServicePort -goto :eof - -:cREG -reg delete "HKLM\%SPPk%\55c92734-d682-4d71-983e-d6ec3f16059f" /f -reg delete "HKLM\%SPPk%\0ff1ce15-a989-479d-af46-f275c6370663" /f -reg delete "HKLM\%SPPk%" /f /v KeyManagementServiceName -reg delete "HKLM\%SPPk%" /f /v KeyManagementServicePort -reg delete "HKU\S-1-5-20\%SPPk%\55c92734-d682-4d71-983e-d6ec3f16059f" /f -reg delete "HKU\S-1-5-20\%SPPk%\0ff1ce15-a989-479d-af46-f275c6370663" /f -reg delete "HKLM\%OSPP%\59a52881-a989-479d-af46-f275c6370663" /f -reg delete "HKLM\%OSPP%\0ff1ce15-a989-479d-af46-f275c6370663" /f -reg delete "HKLM\%OSPP%" /f /v KeyManagementServiceName -reg delete "HKLM\%OSPP%" /f /v KeyManagementServicePort -if %OsppHook% EQU 0 ( -reg delete "HKLM\%OSPP%" /f -reg delete "HKU\S-1-5-20\%OSPP%" /f +schtasks /query /tn "%_TaskEx%" %_Nul3% && ( +echo. +echo Adding Schedule Task... +echo %_TaskEx% ) goto :eof :E_Admin -echo ==== ERROR ==== -echo This script require administrator privileges. -echo To do so, right click on this script and select 'Run as administrator' +echo %_err% +echo This script requires administrator privileges. +echo To do so, right-click on this script and select 'Run as administrator' +echo. +if %_invpth% EQU 1 ( +echo. +echo === WARNING === +echo Disallowed special characters are detected in the file path name. +echo Before you can use 'Run as administrator' successfully, +echo make sure the path do not have any of the following characters: +echo ^` ^~ ^! ^@ %% ^^ ^& ^( ^) [ ] { } ^+ ^= ^; ^' ^, echo. +) echo Press any key to exit. +if %_Debug% EQU 1 goto :eof +if %Unattend% EQU 1 goto :eof pause >nul goto :eof :E_DLL -echo ==== ERROR ==== -echo Required file !xOS!.dll is not found. -echo Make sure folder path is simple and Antivirus protection is OFF or excluded. -goto :END +echo. +echo %_err% +echo Required file bin\%xOS%.dll is not found. +echo Verify that Antivirus protection is OFF or the current folder is excluded. +goto :TheEnd :UnsupportedVersion -echo ==== ERROR ==== +echo %_err% echo Unsupported OS version Detected. -echo Project is supported only for Windows 7/8/8.1/10 and their Server equivalent. -:END +echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalent. +:TheEnd echo. -echo Press any key to exit. +if %Unattend% EQU 0 echo Press any key to exit. %_Pause% goto :eof \ No newline at end of file diff --git a/Check-Activation-Status-Alternative.cmd b/Check-Activation-Status-Alternative.cmd deleted file mode 100644 index c1e4055..0000000 --- a/Check-Activation-Status-Alternative.cmd +++ /dev/null @@ -1,204 +0,0 @@ -@echo off -color 07 -title Status - WMIC -set spp=SoftwareLicensingProduct -set sps=SoftwareLicensingService -set ospp=OfficeSoftwareProtectionProduct -set osps=OfficeSoftwareProtectionService -set winApp=55c92734-d682-4d71-983e-d6ec3f16059f -set o14App=59a52881-a989-479d-af46-f275c6370663 -set o15App=0ff1ce15-a989-479d-af46-f275c6370663 -for %%# in (spp_get,ospp_get,W1nd0ws,sppw,0ff1ce15,sppo,osppsvc,ospp14,ospp15) do set "%%#=" -for /f "tokens=6 delims=[]. " %%# in ('ver') do set winbuild=%%# -set "spp_get=Description, DiscoveredKeyManagementServiceMachineName, DiscoveredKeyManagementServiceMachinePort, EvaluationEndDate, GracePeriodRemaining, ID, KeyManagementServiceMachine, KeyManagementServicePort, KeyManagementServiceProductKeyID, LicenseStatus, LicenseStatusReason, Name, PartialProductKey, ProductKeyID, VLActivationInterval, VLRenewalInterval" -set "ospp_get=%spp_get%" -if %winbuild% geq 9200 set "spp_get=%spp_get%, DiscoveredKeyManagementServiceMachineIpAddress, KeyManagementServiceLookupDomain, ProductKeyChannel, VLActivationTypeEnabled" - -set "SysPath=%Windir%\System32" -if exist "%Windir%\Sysnative\reg.exe" (set "SysPath=%Windir%\Sysnative") -set "Path=%SysPath%;%Windir%;%SysPath%\Wbem;%SysPath%\WindowsPowerShell\v1.0\" - -call :PKey %spp% %winApp% W1nd0ws sppw -if %winbuild% geq 9200 call :PKey %spp% %o15App% 0ff1ce15 sppo -wmic path %osps% get Version 1>nul 2>nul && ( -call :PKey %ospp% %o14App% osppsvc ospp14 -if %winbuild% lss 9200 call :PKey %ospp% %o15App% osppsvc ospp15 -) - -:SPP -echo ************************************************************ -echo *** Windows Status *** -echo ************************************************************ -if not defined W1nd0ws ( -echo. -echo Error: product key not found. -goto :SPPo -) -for /f "tokens=2 delims==" %%# in ('"wmic path %spp% where (ApplicationID='%winApp%' and PartialProductKey is not null) get ID /value"') do ( - set "chkID=%%#" - call :Property "%spp%" "%sps%" "%spp_get%" - call :Output - echo ____________________________________________________________________________ - echo. -) - -:SPPo -set verbose=1 -if not defined 0ff1ce15 ( -if defined osppsvc goto :OSPP -goto :End -) -echo ************************************************************ -echo *** Office Status *** -echo ************************************************************ -for /f "tokens=2 delims==" %%# in ('"wmic path %spp% where (ApplicationID='%o15App%' and PartialProductKey is not null) get ID /value"') do ( - set "chkID=%%#" - call :Property "%spp%" "%sps%" "%spp_get%" - call :Output - echo ____________________________________________________________________________ - echo. -) -set verbose=0 -if defined osppsvc goto :OSPP -goto :End - -:OSPP -if %verbose%==1 ( -echo ************************************************************ -echo *** Office Status *** -echo ************************************************************ -) -if defined ospp15 for /f "tokens=2 delims==" %%# in ('"wmic path %ospp% where (ApplicationID='%o15App%' and PartialProductKey is not null) get ID /value"') do ( - set "chkID=%%#" - call :Property "%ospp%" "%osps%" "%ospp_get%" - call :Output - echo ____________________________________________________________________________ - echo. -) -if defined ospp14 for /f "tokens=2 delims==" %%# in ('"wmic path %ospp% where (ApplicationID='%o14App%' and PartialProductKey is not null) get ID /value"') do ( - set "chkID=%%#" - call :Property "%ospp%" "%osps%" "%ospp_get%" - call :Output - echo ____________________________________________________________________________ - echo. -) -goto :End - -:PKey -wmic path %1 where (ApplicationID='%2' and PartialProductKey is not null) get ID /value 2>nul | findstr /i ID 1>nul && (set %3=1&set %4=1) -exit /b - -:Property -for %%# in (%~3) do set "%%#=" -if %~1 equ %ospp% for %%# in (DiscoveredKeyManagementServiceMachineIpAddress, KeyManagementServiceLookupDomain, ProductKeyChannel, VLActivationTypeEnabled) do set "%%#=" -set "KmsClient=" -for /f "tokens=* delims=" %%# in ('"wmic path %~1 where (ID='%chkID%') get %~3 /value" ^| findstr ^=') do set "%%#" - -set /a gprDays=%GracePeriodRemaining%/1440 -echo %Description%| findstr /i VOLUME_KMSCLIENT 1>nul && (set KmsClient=1) -call cmd /c exit /b %LicenseStatusReason% -set "LicenseReason=%=ExitCode%" - -if %LicenseStatus%==0 ( -set "License=Unlicensed" -set "LicenseMsg=" -) -if %LicenseStatus%==1 ( -set "License=Licensed" -set "LicenseMsg=" -if not %GracePeriodRemaining%==0 set "LicenseMsg=Volume activation expiration: %GracePeriodRemaining% minute(s) (%gprDays% day(s))" -) -if %LicenseStatus%==2 ( -set "License=Initial grace period" -set "LicenseMsg=Time remaining: %GracePeriodRemaining% minute(s) (%gprDays% day(s))" -) -if %LicenseStatus%==3 ( -set "License=Additional grace period (KMS license expired or hardware out of tolerance)" -set "LicenseMsg=Time remaining: %GracePeriodRemaining% minute(s) (%gprDays% day(s))" -) -if %LicenseStatus%==4 ( -set "License=Non-genuine grace period." -set "LicenseMsg=Time remaining: %GracePeriodRemaining% minute(s) (%gprDays% day(s))" -) -if %LicenseStatus%==6 ( -set "License=Extended grace period" -set "LicenseMsg=Time remaining: %GracePeriodRemaining% minute(s) (%gprDays% day(s))" -) -if %LicenseStatus%==5 ( -set "License=Notification" - if "%LicenseReason%"=="C004F200" (set "LicenseMsg=Notification Reason: 0xC004F200 (non-genuine)." - ) else if "%LicenseReason%"=="C004F009" (set "LicenseMsg=Notification Reason: 0xC004F009 (grace time expired)." - ) else (set "LicenseMsg=Notification Reason: 0x%LicenseReason%" - ) -) -if %LicenseStatus% gtr 6 ( -set "License=Unknown" -set "LicenseMsg=" -) -if not defined KmsClient exit /b - -if %KeyManagementServicePort%==0 set KeyManagementServicePort=1688 -set "KmsReg=Registered KMS machine name: %KeyManagementServiceMachine%:%KeyManagementServicePort%" -if "%KeyManagementServiceMachine%"=="" set "KmsReg=Registered KMS machine name: KMS name not available" - -if %DiscoveredKeyManagementServiceMachinePort%==0 set DiscoveredKeyManagementServiceMachinePort=1688 -set "KmsDns=KMS machine name from DNS: %DiscoveredKeyManagementServiceMachineName%:%DiscoveredKeyManagementServiceMachinePort%" -if "%DiscoveredKeyManagementServiceMachineName%"=="" set "KmsDns=DNS auto-discovery: KMS name not available" - -for /f "tokens=* delims=" %%# in ('"wmic path %~2 get ClientMachineID, KeyManagementServiceHostCaching /value" ^| findstr ^=') do set "%%#" -if /i %KeyManagementServiceHostCaching%==True (set KeyManagementServiceHostCaching=Enabled) else (set KeyManagementServiceHostCaching=Disabled) - -if %winbuild% lss 9200 exit /b -if %~1 equ %ospp% exit /b - -if "%DiscoveredKeyManagementServiceMachineIpAddress%"=="" set "DiscoveredKeyManagementServiceMachineIpAddress=not available" - -if "%KeyManagementServiceLookupDomain%"=="" set "KeyManagementServiceLookupDomain=" - -if %VLActivationTypeEnabled%==3 ( -set VLActivationType=Token -) else if %VLActivationTypeEnabled%==2 ( -set VLActivationType=KMS -) else if %VLActivationTypeEnabled%==1 ( -set VLActivationType=AD -) else ( -set VLActivationType=All -) -exit /b - -:Output -echo. -echo Name: %Name% -echo Description: %Description% -echo Activation ID: %ID% -echo Extended PID: %ProductKeyID% -if defined ProductKeyChannel echo Product Key Channel: %ProductKeyChannel% -echo Partial Product Key: %PartialProductKey% -echo License Status: %License% -if defined LicenseMsg echo %LicenseMsg% -if not %LicenseStatus%==0 if not %EvaluationEndDate:~0,8%==16010101 echo Evaluation End Date: %EvaluationEndDate:~0,4%-%EvaluationEndDate:~4,2%-%EvaluationEndDate:~6,2% %EvaluationEndDate:~8,2%:%EvaluationEndDate:~10,2% UTC -if not defined KmsClient exit /b -if defined VLActivationTypeEnabled echo Configured Activation Type: %VLActivationType% -echo. -if not %LicenseStatus%==1 ( -echo Please activate the product in order to update KMS client information values. -exit /b -) -echo Most recent activation information: -echo Key Management Service client information -echo. Client Machine ID (CMID): %ClientMachineID% -echo. %KmsDns% -echo. %KmsReg% -if defined DiscoveredKeyManagementServiceMachineIpAddress echo. KMS machine IP address: %DiscoveredKeyManagementServiceMachineIpAddress% -echo. KMS machine extended PID: %KeyManagementServiceProductKeyID% -echo. Activation interval: %VLActivationInterval% minutes -echo. Renewal interval: %VLRenewalInterval% minutes -echo. KMS host caching: %KeyManagementServiceHostCaching% -if defined KeyManagementServiceLookupDomain echo. KMS SRV record lookup domain: %KeyManagementServiceLookupDomain% -exit /b - -:End -echo. -echo Press any key to exit... -pause >nul -exit /b diff --git a/Check-Activation-Status-vbs.cmd b/Check-Activation-Status-vbs.cmd new file mode 100644 index 0000000..1006aa0 --- /dev/null +++ b/Check-Activation-Status-vbs.cmd @@ -0,0 +1,200 @@ +@setlocal DisableDelayedExpansion +@echo off +@cls +set "_cmdf=%~f0" +if exist "%SystemRoot%\Sysnative\cmd.exe" ( +setlocal EnableDelayedExpansion +start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" " +exit /b +) +if exist "%SystemRoot%\SysArm32\cmd.exe" if /i %PROCESSOR_ARCHITECTURE%==AMD64 ( +setlocal EnableDelayedExpansion +start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" " +exit /b +) +color 07 +title Check Activation Status [vbs] +set "SysPath=%SystemRoot%\System32" +if exist "%SystemRoot%\Sysnative\reg.exe" (set "SysPath=%SystemRoot%\Sysnative") +set "Path=%SysPath%;%SystemRoot%;%SysPath%\Wbem;%SysPath%\WindowsPowerShell\v1.0\" +set "_bit=64" +set "_wow=1" +if /i "%PROCESSOR_ARCHITECTURE%"=="x86" if "%PROCESSOR_ARCHITEW6432%"=="" set "_wow=0"&set "_bit=32" +set "_utemp=%TEMP%" +set "line2=************************************************************" +set "line3=____________________________________________________________" +set _sO16vbs=0 +set _sO15vbs=0 +if exist "%ProgramFiles%\Microsoft Office\Office15\ospp.vbs" ( + set _sO15vbs=1 +) else if exist "%ProgramW6432%\Microsoft Office\Office15\ospp.vbs" ( + set _sO15vbs=1 +) else if exist "%ProgramFiles(x86)%\Microsoft Office\Office15\ospp.vbs" ( + set _sO15vbs=1 +) +setlocal EnableDelayedExpansion +echo %line2% +echo *** Windows Status *** +echo %line2% +pushd "!_utemp!" +copy /y %SystemRoot%\System32\slmgr.vbs . >nul 2>&1 +net start sppsvc /y >nul 2>&1 +cscript //nologo slmgr.vbs /dli || (echo Error executing slmgr.vbs&del /f /q slmgr.vbs&popd&goto :casVend) +cscript //nologo slmgr.vbs /xpr +del /f /q slmgr.vbs >nul 2>&1 +popd +echo %line3% + +:casVo16 +set office= +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\16.0\Common\InstallRoot /v Path" 2^>nul') do (set "office=%%b") +if exist "!office!\ospp.vbs" ( +set _sO16vbs=1 +echo. +echo %line2% +if %_sO15vbs% EQU 0 ( +echo *** Office 2016 %_bit%-bit Status *** +) else ( +echo *** Office 2013/2016 Status *** +) +echo %line2% +cscript //nologo "!office!\ospp.vbs" /dstatus +) +if %_wow%==0 goto :casVo13 +set office= +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\16.0\Common\InstallRoot /v Path" 2^>nul') do (set "office=%%b") +if exist "!office!\ospp.vbs" ( +set _sO16vbs=1 +echo. +echo %line2% +if %_sO15vbs% EQU 0 ( +echo *** Office 2016 32-bit Status *** +) else ( +echo *** Office 2013/2016 Status *** +) +echo %line2% +cscript //nologo "!office!\ospp.vbs" /dstatus +) + +:casVo13 +if %_sO16vbs% EQU 1 goto :casVo10 +set office= +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\15.0\Common\InstallRoot /v Path" 2^>nul') do (set "office=%%b") +if exist "!office!\ospp.vbs" ( +echo. +echo %line2% +echo *** Office 2013 %_bit%-bit Status *** +echo %line2% +cscript //nologo "!office!\ospp.vbs" /dstatus +) +if %_wow%==0 goto :casVo10 +set office= +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Common\InstallRoot /v Path" 2^>nul') do (set "office=%%b") +if exist "!office!\ospp.vbs" ( +echo. +echo %line2% +echo *** Office 2013 32-bit Status *** +echo %line2% +cscript //nologo "!office!\ospp.vbs" /dstatus +) + +:casVo10 +set office= +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\14.0\Common\InstallRoot /v Path" 2^>nul') do (set "office=%%b") +if exist "!office!\ospp.vbs" ( +echo. +echo %line2% +echo *** Office 2010 %_bit%-bit Status *** +echo %line2% +cscript //nologo "!office!\ospp.vbs" /dstatus +) +if %_wow%==0 goto :casVc16 +set office= +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\Common\InstallRoot /v Path" 2^>nul') do (set "office=%%b") +if exist "!office!\ospp.vbs" ( +echo. +echo %line2% +echo *** Office 2010 32-bit Status *** +echo %line2% +cscript //nologo "!office!\ospp.vbs" /dstatus +) + +:casVc16 +reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath >nul 2>&1 || ( +reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun /v InstallPath >nul 2>&1 || goto :casVc13 +) +set office= +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath" 2^>nul') do (set "office=%%b\Office16") +if exist "!office!\ospp.vbs" ( +set _sO16vbs=1 +echo. +echo %line2% +if %_sO15vbs% EQU 0 ( +echo *** Office 2016-2021 C2R Status *** +) else ( +echo *** Office 2013-2021 Status *** +) +echo %line2% +cscript //nologo "!office!\ospp.vbs" /dstatus +) +if %_wow%==0 goto :casVc13 +set office= +for /f "skip=2 tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun /v InstallPath" 2^>nul') do (set "office=%%b\Office16") +if exist "!office!\ospp.vbs" ( +set _sO16vbs=1 +echo. +echo %line2% +if %_sO15vbs% EQU 0 ( +echo *** Office 2016-2021 C2R Status *** +) else ( +echo *** Office 2013-2021 Status *** +) +echo %line2% +cscript //nologo "!office!\ospp.vbs" /dstatus +) + +:casVc13 +if %_sO16vbs% EQU 1 goto :casVc10 +reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun /v InstallPath >nul 2>&1 || ( +reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\ClickToRun /v InstallPath >nul 2>&1 || goto :casVc10 +) +set office= +if exist "%ProgramFiles%\Microsoft Office\Office15\ospp.vbs" ( + set "office=%ProgramFiles%\Microsoft Office\Office15" +) else if exist "%ProgramW6432%\Microsoft Office\Office15\ospp.vbs" ( + set "office=%ProgramW6432%\Microsoft Office\Office15" +) else if exist "%ProgramFiles(x86)%\Microsoft Office\Office15\ospp.vbs" ( + set "office=%ProgramFiles(x86)%\Microsoft Office\Office15" +) +if exist "!office!\ospp.vbs" ( +echo. +echo %line2% +echo *** Office 2013 C2R Status *** +echo %line2% +cscript //nologo "!office!\ospp.vbs" /dstatus +) + +:casVc10 +if %_wow%==0 reg query HKLM\SOFTWARE\Microsoft\Office\14.0\CVH /f Click2run /k >nul 2>&1 || goto :casVend +if %_wow%==1 reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\CVH /f Click2run /k >nul 2>&1 || goto :casVend +set office= +if exist "%ProgramFiles%\Microsoft Office\Office14\ospp.vbs" ( + set "office=%ProgramFiles%\Microsoft Office\Office14" +) else if exist "%ProgramW6432%\Microsoft Office\Office14\ospp.vbs" ( + set "office=%ProgramW6432%\Microsoft Office\Office14" +) else if exist "%ProgramFiles(x86)%\Microsoft Office\Office14\ospp.vbs" ( + set "office=%ProgramFiles(x86)%\Microsoft Office\Office14" +) +if exist "!office!\ospp.vbs" ( +echo. +echo %line2% +echo *** Office 2010 C2R Status *** +echo %line2% +cscript //nologo "!office!\ospp.vbs" /dstatus +) + +:casVend +echo. +echo Press any key to exit. +pause >nul +exit /b \ No newline at end of file diff --git a/Check-Activation-Status-wmic.cmd b/Check-Activation-Status-wmic.cmd new file mode 100644 index 0000000..35c9aab --- /dev/null +++ b/Check-Activation-Status-wmic.cmd @@ -0,0 +1,440 @@ +@setlocal DisableDelayedExpansion +@echo off +@cls +set "_cmdf=%~f0" +if exist "%SystemRoot%\Sysnative\cmd.exe" ( +setlocal EnableDelayedExpansion +start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" " +exit /b +) +if exist "%SystemRoot%\SysArm32\cmd.exe" if /i %PROCESSOR_ARCHITECTURE%==AMD64 ( +setlocal EnableDelayedExpansion +start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" " +exit /b +) +color 07 +title Check Activation Status [wmic] +set wspp=SoftwareLicensingProduct +set wsps=SoftwareLicensingService +set ospp=OfficeSoftwareProtectionProduct +set osps=OfficeSoftwareProtectionService +set winApp=55c92734-d682-4d71-983e-d6ec3f16059f +set o14App=59a52881-a989-479d-af46-f275c6370663 +set o15App=0ff1ce15-a989-479d-af46-f275c6370663 +for %%# in (spp_get,ospp_get,cW1nd0ws,sppw,c0ff1ce15,sppo,osppsvc,ospp14,ospp15) do set "%%#=" +for /f "tokens=6 delims=[]. " %%# in ('ver') do set winbuild=%%# +set "spp_get=Description, DiscoveredKeyManagementServiceMachineName, DiscoveredKeyManagementServiceMachinePort, EvaluationEndDate, GracePeriodRemaining, ID, KeyManagementServiceMachine, KeyManagementServicePort, KeyManagementServiceProductKeyID, LicenseStatus, LicenseStatusReason, Name, PartialProductKey, ProductKeyID, VLActivationInterval, VLRenewalInterval" +set "ospp_get=%spp_get%" +if %winbuild% GEQ 9200 set "spp_get=%spp_get%, KeyManagementServiceLookupDomain, VLActivationTypeEnabled" +if %winbuild% GEQ 9600 set "spp_get=%spp_get%, DiscoveredKeyManagementServiceMachineIpAddress, ProductKeyChannel" +set OsppHook=1 +sc query osppsvc >nul 2>&1 +if %errorlevel% EQU 1060 set OsppHook=0 +set "_batf=%~f0" +set "_batp=%_batf:'=''%" +set "_Local=%LocalAppData%" +set _Identity=0 +setlocal EnableDelayedExpansion +dir /b /s /a:-d "!_Local!\Microsoft\Office\Licenses\*1*" 1>nul 2>nul && set _Identity=1 +dir /b /s /a:-d "!ProgramData!\Microsoft\Office\Licenses\*1*" 1>nul 2>nul && set _Identity=1 +setlocal DisableDelayedExpansion +if %winbuild% LSS 9200 if not exist "%SystemRoot%\servicing\Packages\Microsoft-Windows-PowerShell-WTR-Package~*.mum" set _Identity=0 +set _pwrsh=1 +if not exist "%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" set _pwrsh=0 + +set "SysPath=%Windir%\System32" +if exist "%Windir%\Sysnative\reg.exe" (set "SysPath=%Windir%\Sysnative") +set "Path=%SysPath%;%Windir%;%SysPath%\Wbem;%SysPath%\WindowsPowerShell\v1.0\" +set "line2=************************************************************" +set "line3=____________________________________________________________" + +net start sppsvc /y >nul 2>&1 +call :casWpkey %wspp% %winApp% cW1nd0ws sppw +if %winbuild% GEQ 9200 call :casWpkey %wspp% %o15App% c0ff1ce15 sppo +if %OsppHook% NEQ 0 ( +net start osppsvc /y >nul 2>&1 +call :casWpkey %ospp% %o14App% osppsvc ospp14 +if %winbuild% LSS 9200 call :casWpkey %ospp% %o15App% osppsvc ospp15 +) + +echo %line2% +echo *** Windows Status *** +echo %line2% +if not defined cW1nd0ws ( +echo. +echo Error: product key not found. +goto :casWcon +) +set winID=1 +for /f "tokens=2 delims==" %%# in ('"wmic path %wspp% where (ApplicationID='%winApp%' and PartialProductKey is not null) get ID /value"') do ( + set "chkID=%%#" + call :casWdet "%wspp%" "%wsps%" "%spp_get%" + call :casWout + echo %line3% + echo. +) + +:casWcon +set winID=0 +set verbose=1 +if not defined c0ff1ce15 ( +if defined osppsvc goto :casWospp +goto :casWend +) +echo %line2% +echo *** Office Status *** +echo %line2% +for /f "tokens=2 delims==" %%# in ('"wmic path %wspp% where (ApplicationID='%o15App%' and PartialProductKey is not null) get ID /value"') do ( + set "chkID=%%#" + call :casWdet "%wspp%" "%wsps%" "%spp_get%" + call :casWout + echo %line3% + echo. +) +set verbose=0 +if defined osppsvc goto :casWospp +goto :casWend + +:casWospp +if %verbose% EQU 1 ( +echo %line2% +echo *** Office Status *** +echo %line2% +) +if defined ospp15 for /f "tokens=2 delims==" %%# in ('"wmic path %ospp% where (ApplicationID='%o15App%' and PartialProductKey is not null) get ID /value"') do ( + set "chkID=%%#" + call :casWdet "%ospp%" "%osps%" "%ospp_get%" + call :casWout + echo %line3% + echo. +) +if defined ospp14 for /f "tokens=2 delims==" %%# in ('"wmic path %ospp% where (ApplicationID='%o14App%' and PartialProductKey is not null) get ID /value"') do ( + set "chkID=%%#" + call :casWdet "%ospp%" "%osps%" "%ospp_get%" + call :casWout + echo %line3% + echo. +) +goto :casWend + +:casWpkey +wmic path %1 where (ApplicationID='%2' and PartialProductKey is not null) get ID /value 2>nul | findstr /i ID 1>nul && (set %3=1&set %4=1) +exit /b + +:casWdet +for %%# in (%~3) do set "%%#=" +if %~1 equ %ospp% for %%# in (DiscoveredKeyManagementServiceMachineIpAddress, KeyManagementServiceLookupDomain, ProductKeyChannel, VLActivationTypeEnabled) do set "%%#=" +set "cKmsClient=" +set "cTblClient=" +set "cAvmClient=" +set "ExpireMsg=" +set "_xpr=" +for /f "tokens=* delims=" %%# in ('"wmic path %~1 where ID='%chkID%' get %~3 /value" ^| findstr ^=') do set "%%#" + +set /a _gpr=(GracePeriodRemaining+1440-1)/1440 +echo %Description%| findstr /i VOLUME_KMSCLIENT 1>nul && (set cKmsClient=1&set _mTag=Volume) +echo %Description%| findstr /i TIMEBASED_ 1>nul && (set cTblClient=1&set _mTag=Timebased) +echo %Description%| findstr /i VIRTUAL_MACHINE_ACTIVATION 1>nul && (set cAvmClient=1&set _mTag=Automatic VM) +cmd /c exit /b %LicenseStatusReason% +set "LicenseReason=%=ExitCode%" +set "LicenseMsg=Time remaining: %GracePeriodRemaining% minute(s) (%_gpr% day(s))" +if %_pwrsh% EQU 1 if %_gpr% GEQ 1 for /f "tokens=* delims=" %%# in ('powershell -nop -c "$([DateTime]::Now.addMinutes(%GracePeriodRemaining%)).ToString('yyyy-MM-dd HH:mm:ss')" 2^>nul') do set "_xpr=%%#" +title Check Activation Status [wmic] + +if %LicenseStatus% EQU 0 ( +set "License=Unlicensed" +set "LicenseMsg=" +) +if %LicenseStatus% EQU 1 ( +set "License=Licensed" +set "LicenseMsg=" +if %GracePeriodRemaining% EQU 0 ( + if %winID% EQU 1 (set "ExpireMsg=The machine is permanently activated.") else (set "ExpireMsg=The product is permanently activated.") + ) else ( + set "LicenseMsg=%_mTag% activation expiration: %GracePeriodRemaining% minute(s) (%_gpr% day(s))" + if defined _xpr set "ExpireMsg=%_mTag% activation will expire %_xpr%" + ) +) +if %LicenseStatus% EQU 2 ( +set "License=Initial grace period" +if defined _xpr set "ExpireMsg=Initial grace period ends %_xpr%" +) +if %LicenseStatus% EQU 3 ( +set "License=Additional grace period (KMS license expired or hardware out of tolerance)" +if defined _xpr set "ExpireMsg=Additional grace period ends %_xpr%" +) +if %LicenseStatus% EQU 4 ( +set "License=Non-genuine grace period." +if defined _xpr set "ExpireMsg=Non-genuine grace period ends %_xpr%" +) +if %LicenseStatus% EQU 6 ( +set "License=Extended grace period" +if defined _xpr set "ExpireMsg=Extended grace period ends %_xpr%" +) +if %LicenseStatus% EQU 5 ( +set "License=Notification" + if "%LicenseReason%"=="C004F200" (set "LicenseMsg=Notification Reason: 0xC004F200 (non-genuine)." + ) else if "%LicenseReason%"=="C004F009" (set "LicenseMsg=Notification Reason: 0xC004F009 (grace time expired)." + ) else (set "LicenseMsg=Notification Reason: 0x%LicenseReason%" + ) +) +if %LicenseStatus% GTR 6 ( +set "License=Unknown" +set "LicenseMsg=" +) +if not defined cKmsClient exit /b + +if %KeyManagementServicePort%==0 set KeyManagementServicePort=1688 +set "KmsReg=Registered KMS machine name: %KeyManagementServiceMachine%:%KeyManagementServicePort%" +if "%KeyManagementServiceMachine%"=="" set "KmsReg=Registered KMS machine name: KMS name not available" + +if %DiscoveredKeyManagementServiceMachinePort%==0 set DiscoveredKeyManagementServiceMachinePort=1688 +set "KmsDns=KMS machine name from DNS: %DiscoveredKeyManagementServiceMachineName%:%DiscoveredKeyManagementServiceMachinePort%" +if "%DiscoveredKeyManagementServiceMachineName%"=="" set "KmsDns=DNS auto-discovery: KMS name not available" + +for /f "tokens=* delims=" %%# in ('"wmic path %~2 get ClientMachineID, KeyManagementServiceHostCaching /value" ^| findstr ^=') do set "%%#" +if /i %KeyManagementServiceHostCaching%==True (set KeyManagementServiceHostCaching=Enabled) else (set KeyManagementServiceHostCaching=Disabled) + +if %winbuild% LSS 9200 exit /b +if %~1 equ %ospp% exit /b + +if "%KeyManagementServiceLookupDomain%"=="" set "KeyManagementServiceLookupDomain=" + +if %VLActivationTypeEnabled% EQU 3 ( +set VLActivationType=Token +) else if %VLActivationTypeEnabled% EQU 2 ( +set VLActivationType=KMS +) else if %VLActivationTypeEnabled% EQU 1 ( +set VLActivationType=AD +) else ( +set VLActivationType=All +) + +if %winbuild% LSS 9600 exit /b +if "%DiscoveredKeyManagementServiceMachineIpAddress%"=="" set "DiscoveredKeyManagementServiceMachineIpAddress=not available" +exit /b + +:casWout +echo. +echo Name: %Name% +echo Description: %Description% +echo Activation ID: %ID% +echo Extended PID: %ProductKeyID% +if defined ProductKeyChannel echo Product Key Channel: %ProductKeyChannel% +echo Partial Product Key: %PartialProductKey% +echo License Status: %License% +if defined LicenseMsg echo %LicenseMsg% +if not %LicenseStatus%==0 if not %EvaluationEndDate:~0,8%==16010101 echo Evaluation End Date: %EvaluationEndDate:~0,4%-%EvaluationEndDate:~4,2%-%EvaluationEndDate:~6,2% %EvaluationEndDate:~8,2%:%EvaluationEndDate:~10,2% UTC +if not defined cKmsClient ( +if defined ExpireMsg echo.&echo. %ExpireMsg% +exit /b +) +if defined VLActivationTypeEnabled echo Configured Activation Type: %VLActivationType% +echo. +if not %LicenseStatus%==1 ( +echo Please activate the product in order to update KMS client information values. +exit /b +) +echo Most recent activation information: +echo Key Management Service client information +echo. Client Machine ID (CMID): %ClientMachineID% +echo. %KmsDns% +echo. %KmsReg% +if defined DiscoveredKeyManagementServiceMachineIpAddress echo. KMS machine IP address: %DiscoveredKeyManagementServiceMachineIpAddress% +echo. KMS machine extended PID: %KeyManagementServiceProductKeyID% +echo. Activation interval: %VLActivationInterval% minutes +echo. Renewal interval: %VLRenewalInterval% minutes +echo. KMS host caching: %KeyManagementServiceHostCaching% +if defined KeyManagementServiceLookupDomain echo. KMS SRV record lookup domain: %KeyManagementServiceLookupDomain% +if defined ExpireMsg echo.&echo. %ExpireMsg% +exit /b + +:casWend +if %_Identity% EQU 1 if %_pwrsh% EQU 1 ( +echo %line2% +echo *** Office vNext Status *** +echo %line2% +setlocal EnableDelayedExpansion +powershell -nop -c "$f=[IO.File]::ReadAllText('!_batp!') -split ':vNextDiag\:.*';iex ($f[1])" +title Check Activation Status [wmic] +echo %line3% +echo. +) +echo. +echo Press any key to exit. +pause >nul +exit /b + +:vNextDiag: +function PrintModePerPridFromRegistry +{ + $vNextRegkey = "HKCU:\SOFTWARE\Microsoft\Office\16.0\Common\Licensing\LicensingNext" + $vNextPrids = Get-Item -Path $vNextRegkey -ErrorAction Ignore | Select-Object -ExpandProperty 'property' | Where-Object -FilterScript {$_ -Ne 'InstalledGraceKey' -And $_ -Ne 'MigrationToV5Done' -And $_ -Ne 'test' -And $_ -Ne 'unknown'} + If ($vNextPrids -Eq $null) + { + Write-Host "No registry keys found." + Return + } + $vNextPrids | ForEach ` + { + $mode = (Get-ItemProperty -Path $vNextRegkey -Name $_).$_ + Switch ($mode) + { + 2 { $mode = "vNext"; Break } + 3 { $mode = "Device"; Break } + Default { $mode = "Legacy"; Break } + } + Write-Host $_ = $mode + } +} +function PrintSharedComputerLicensing +{ + $scaRegKey = "HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration" + $scaValue = Get-ItemProperty -Path $scaRegKey -ErrorAction Ignore | Select-Object -ExpandProperty "SharedComputerLicensing" -ErrorAction Ignore + $scaRegKey2 = "HKLM:\SOFTWARE\Microsoft\Office\16.0\Common\Licensing" + $scaValue2 = Get-ItemProperty -Path $scaRegKey2 -ErrorAction Ignore | Select-Object -ExpandProperty "SharedComputerLicensing" -ErrorAction Ignore + $scaPolicyKey = "HKLM:\SOFTWARE\Policies\Microsoft\Office\16.0\Common\Licensing" + $scaPolicyValue = Get-ItemProperty -Path $scaPolicyKey -ErrorAction Ignore | Select-Object -ExpandProperty "SharedComputerLicensing" -ErrorAction Ignore + If ($scaValue -Eq $null -And $scaValue2 -Eq $null -And $scaPolicyValue -Eq $null) + { + Write-Host "No registry keys found." + Return + } + $scaModeValue = $scaValue -Or $scaValue2 -Or $scaPolicyValue + If ($scaModeValue -Eq 0) + { + $scaMode = "Disabled" + } + If ($scaModeValue -Eq 1) + { + $scaMode = "Enabled" + } + Write-Host "SharedComputerLicensing" = $scaMode + Write-Host + $tokenFiles = $null + $tokenPath = "${env:LOCALAPPDATA}\Microsoft\Office\16.0\Licensing" + If (Test-Path $tokenPath) + { + $tokenFiles = Get-ChildItem -Path $tokenPath -Recurse -File -Filter "*authString*" + } + If ($tokenFiles.length -Eq 0) + { + Write-Host "No tokens found." + Return + } + $tokenFiles | ForEach ` + { + $tokenParts = (Get-Content -Encoding Unicode -Path $_.FullName).Split('_') + $output = [PSCustomObject] ` + @{ + ACID = $tokenParts[0]; + User = $tokenParts[3] + NotBefore = $tokenParts[4]; + NotAfter = $tokenParts[5]; + } | ConvertTo-Json + Write-Host $output + } +} +function PrintLicensesInformation +{ + Param( + [ValidateSet("NUL", "Device")] + [String]$mode + ) + If ($mode -Eq "NUL") + { + $licensePath = "${env:LOCALAPPDATA}\Microsoft\Office\Licenses" + } + ElseIf ($mode -Eq "Device") + { + $licensePath = "${env:PROGRAMDATA}\Microsoft\Office\Licenses" + } + $licenseFiles = $null + If (Test-Path $licensePath) + { + $licenseFiles = Get-ChildItem -Path $licensePath -Recurse -File + } + If ($licenseFiles.length -Eq 0) + { + Write-Host "No licenses found." + Return + } + $licenseFiles | ForEach ` + { + $license = (Get-Content -Encoding Unicode $_.FullName | ConvertFrom-Json).License + $decodedLicense = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($license)) | ConvertFrom-Json + $licenseType = $decodedLicense.LicenseType + $userId = $decodedLicense.Metadata.UserId + $identitiesRegkey = Get-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Office\16.0\Common\Identity\Identities\${userId}*" -ErrorAction Ignore + $licenseState = $null + If ((Get-Date) -Gt (Get-Date $decodedLicense.MetaData.NotAfter)) + { + $licenseState = "RFM" + } + ElseIf (($decodedLicense.ExpiresOn -Eq $null) -Or + ((Get-Date) -Lt (Get-Date $decodedLicense.ExpiresOn))) + { + $licenseState = "Licensed" + } + Else + { + $licenseState = "Grace" + } + if ($mode -Eq "NUL") + { + $output = [PSCustomObject] ` + @{ + Version = $_.Directory.Name + Type = "User|${licenseType}"; + Product = $decodedLicense.ProductReleaseId; + Acid = $decodedLicense.Acid; + LicenseState = $licenseState; + EntitlementStatus = $decodedLicense.Status; + ReasonCode = $decodedLicense.ReasonCode; + NotBefore = $decodedLicense.Metadata.NotBefore; + NotAfter = $decodedLicense.Metadata.NotAfter; + NextRenewal = $decodedLicense.Metadata.RenewAfter; + Expiration = $decodedLicense.ExpiresOn; + TenantId = $decodedLicense.Metadata.TenantId; + } | ConvertTo-Json + } + ElseIf ($mode -Eq "Device") + { + $output = [PSCustomObject] ` + @{ + Version = $_.Directory.Name + Type = "Device|${licenseType}"; + Product = $decodedLicense.ProductReleaseId; + Acid = $decodedLicense.Acid; + DeviceId = $decodedLicense.Metadata.DeviceId; + LicenseState = $licenseState; + EntitlementStatus = $decodedLicense.Status; + ReasonCode = $decodedLicense.ReasonCode; + NotBefore = $decodedLicense.Metadata.NotBefore; + NotAfter = $decodedLicense.Metadata.NotAfter; + NextRenewal = $decodedLicense.Metadata.RenewAfter; + Expiration = $decodedLicense.ExpiresOn; + TenantId = $decodedLicense.Metadata.TenantId; + } | ConvertTo-Json + } + Write-Output $output + } +} + Write-Host + Write-Host "========== Mode per ProductReleaseId ==========" + Write-Host +PrintModePerPridFromRegistry + Write-Host + Write-Host "========== Shared Computer Licensing ==========" + Write-Host +PrintSharedComputerLicensing + Write-Host + Write-Host "========== vNext licenses ==========" + Write-Host +PrintLicensesInformation -Mode "NUL" + Write-Host + Write-Host "========== Device licenses ==========" + Write-Host +PrintLicensesInformation -Mode "Device" +:vNextDiag: +:: ============ \ No newline at end of file diff --git a/Check-Activation-Status.cmd b/Check-Activation-Status.cmd deleted file mode 100644 index 3915f6a..0000000 --- a/Check-Activation-Status.cmd +++ /dev/null @@ -1,132 +0,0 @@ -@echo off -color 07 -title Status - VBS -set "SysPath=%Windir%\System32" -if exist "%Windir%\Sysnative\reg.exe" (set "SysPath=%Windir%\Sysnative") -set "Path=%SysPath%;%Windir%;%SysPath%\Wbem;%SysPath%\WindowsPowerShell\v1.0\" -set "_tempdir=%SystemRoot%\Temp" -set bit=64&set wow=1 -if /i "%PROCESSOR_ARCHITECTURE%"=="x86" (if "%PROCESSOR_ARCHITEW6432%"=="" set bit=32&set wow=0) -set "line=************************************************************" -setlocal EnableDelayedExpansion -echo %line% -echo *** Windows Status *** -echo %line% -copy /y %Windir%\System32\slmgr.vbs "!_tempdir!\slmgr.vbs" >nul 2>&1 -cscript //nologo "!_tempdir!\slmgr.vbs" /dli || (echo Error executing slmgr.vbs&del /f /q "!_tempdir!\slmgr.vbs"&goto :End) -cscript //nologo "!_tempdir!\slmgr.vbs" /xpr -del /f /q "!_tempdir!\slmgr.vbs" >nul 2>&1 -echo ____________________________________________________________________________ - -:office2016 -set office= -for /f "tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\16.0\Common\InstallRoot /v Path" 2^>nul') do (set "office=%%b") -if exist "!office!\OSPP.VBS" ( -echo. -echo %line% -echo *** Office 2016 %bit%-bit Status *** -echo %line% -cscript //nologo "!office!\OSPP.VBS" /dstatus -) -if %wow%==0 goto :office2013 -set office= -for /f "tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\16.0\Common\InstallRoot /v Path" 2^>nul') do (set "office=%%b") -if exist "!office!\OSPP.VBS" ( -echo. -echo %line% -echo *** Office 2016 32-bit Status *** -echo %line% -cscript //nologo "!office!\OSPP.VBS" /dstatus -) - -:office2013 -set office= -for /f "tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\15.0\Common\InstallRoot /v Path" 2^>nul') do (set "office=%%b") -if exist "!office!\OSPP.VBS" ( -echo. -echo %line% -echo *** Office 2013 %bit%-bit Status *** -echo %line% -cscript //nologo "!office!\OSPP.VBS" /dstatus -) -if %wow%==0 goto :office2010 -set office= -for /f "tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Common\InstallRoot /v Path" 2^>nul') do (set "office=%%b") -if exist "!office!\OSPP.VBS" ( -echo. -echo %line% -echo *** Office 2013 32-bit Status *** -echo %line% -cscript //nologo "!office!\OSPP.VBS" /dstatus -) - -:office2010 -set office= -for /f "tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\14.0\Common\InstallRoot /v Path" 2^>nul') do (set "office=%%b") -if exist "!office!\OSPP.VBS" ( -echo. -echo %line% -echo *** Office 2010 %bit%-bit Status *** -echo %line% -cscript //nologo "!office!\OSPP.VBS" /dstatus -) -if %wow%==0 goto :office2016C2R -set office= -for /f "tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\Common\InstallRoot /v Path" 2^>nul') do (set "office=%%b") -if exist "!office!\OSPP.VBS" ( -echo. -echo %line% -echo *** Office 2010 32-bit Status *** -echo %line% -cscript //nologo "!office!\OSPP.VBS" /dstatus -) - -:office2016C2R -reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath >nul 2>&1 || goto :office2013C2R -set office= -for /f "tokens=2*" %%a in ('"reg query HKLM\SOFTWARE\Microsoft\Office\ClickToRun /v InstallPath" 2^>nul') do (set "office=%%b\Office16") -if exist "!office!\OSPP.VBS" ( -echo. -echo %line% -echo *** Office 2016/2019 C2R Status *** -echo %line% -cscript //nologo "!office!\OSPP.VBS" /dstatus -) - -:office2013C2R -reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun /v InstallPath >nul 2>&1 || goto :office2010C2R -set office= -if exist "%ProgramFiles%\Microsoft Office\Office15\OSPP.VBS" ( - set "office=%ProgramFiles%\Microsoft Office\Office15" -) else if exist "%ProgramFiles(x86)%\Microsoft Office\Office15\OSPP.VBS" ( - set "office=%ProgramFiles(x86)%\Microsoft Office\Office15" -) -if exist "!office!\OSPP.VBS" ( -echo. -echo %line% -echo *** Office 2013 C2R Status *** -echo %line% -cscript //nologo "!office!\OSPP.VBS" /dstatus -) - -:office2010C2R -reg query HKLM\SOFTWARE\Microsoft\Office\14.0\ClickToRun /v InstallPath >nul 2>&1 || goto :End -set office= -if exist "%ProgramFiles%\Microsoft Office\Office14\OSPP.VBS" ( - set "office=%ProgramFiles%\Microsoft Office\Office14" -) else if exist "%ProgramFiles(x86)%\Microsoft Office\Office14\OSPP.VBS" ( - set "office=%ProgramFiles(x86)%\Microsoft Office\Office14" -) -if exist "!office!\OSPP.VBS" ( -echo. -echo %line% -echo *** Office 2010 C2R Status *** -echo %line% -cscript //nologo "!office!\OSPP.VBS" /dstatus -) - -:End -echo. -echo Press any key to exit... -PAUSE >NUL -EXIT /B \ No newline at end of file diff --git a/README.md b/README.md index 3273018..49761c9 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# KMS_VL_ALL - Smart Activation Script (Version 32) +# KMS_VL_ALL - Smart Activation Script (Version 44) ## Supported Volume Products: [see here](https://github.com/lixuy/vlmcsd#valid-apps) >Server/Windows https://docs.microsoft.com/en-us/windows-server/get-started/kmsclientkeys -office2016 / office 2019 +office2016 / office 2019 /office 2021 https://docs.microsoft.com/en-us/DeployOffice/vlactivation/gvlks office2013 https://technet.microsoft.com/en-us/library/dn385360.aspx @@ -81,8 +81,8 @@ see ReadMe.html >不管你是用哪种方式激活,如果你安装了新的产品,你仍至少需要运行一次**Activate.cmd**来处理产品激活。 ## 其他文件 - - **Check-Activation-Status.cmd** 是检查激活状态的脚本(使用VBS)。 - - **Check-Activation-Status-Alternative.cmd** 是检查激活状态的脚本(使用WMI)。 + - **Check-Activation-Status-vbs.cmd** 是检查激活状态的脚本(使用VBS)。 + - **Check-Activation-Status-wmic.cmd** 是检查激活状态的脚本(使用WMI)。 - **$OEM$** 是用于封装系统部署自动激活的文件夹。 diff --git a/ReadMe.html b/ReadMe.html index 8982add..e1e764c 100644 --- a/ReadMe.html +++ b/ReadMe.html @@ -1,9 +1,9 @@  - + KMS_VL_ALL -