

&echo No Supported KMS Client Windows Detected.) Wmic path %spp% where (Description like ' %%KMSCLIENT %%') get Name 2 > nul | findstr /i Windows 1 > nul & (set WinVL=1) || (echo. Wmic path %spp% where (Description like ' %%KMSCLIENT %%') get Name 2 > nul | findstr /i Office 1 > nul & (set office15=1) || (if not defined win7 echo. If %loc_off15% equ 0 if %loc_off16% equ 0 (set "aword=No Installed ") else (set "aword=No Supported KMS Client ") Schtasks /query /tn "\Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger " > nul 2 >&1 || schtasks /create /tn "\Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger " /xml " %~dp0Win32\SvcTrigger.xml " /f > nul 2 >&1

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 "įOR %%A IN (Cloud,CloudN) DO (IF /I " %EditionWMI% " = " %%A " GOTO : Main)įor %%A in (14,15,16) do call : officeLoc %%A IF /I " %EditionPKG:~ -7% " = "Edition " (įOR /F "TOKENS=3 DELIMS=: " %%A IN ('DISM /English /Online /Get-CurrentEdition 2 ^ > NUL ^| FIND /I "Current Edition : "') DO SET " EditionID = %%A "įOR /F "TOKENS=2 DELIMS= " %%A IN (' "WMIC PATH SoftwareLicensingProduct WHERE (Name LIKE 'Windows %%' AND PartialProductKey is not NULL) GET LicenseFamily /VALUE "') DO IF NOT ERRORLEVEL 1 SET " EditionWMI = %%A " REG QUERY " %RegKey%\ %%A " /v "CurrentState " 2 > NUL | FIND /I "0x70 " 1 > NUL & (įOR /F "TOKENS=3 DELIMS=-~ " %%B IN ('ECHO %%A') DO SET " EditionPKG = %%B " SET " Pattern =Microsoft-Windows-*Edition~31bf3856ad364e35 "įOR /F "TOKENS=8 DELIMS=\ " %%A IN ('REG QUERY " %RegKey% " /f " %Pattern% " /k 2 ^ > NUL ^| FIND /I "CurrentVersion "') DO ( SET " RegKey =HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages " Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform " /v NoGenTicket /t REG_DWORD /d 1 /f > nul 2 >&1 IF /I " %PROCESSOR_ARCHITECTURE% " EQU "AMD64 " (set xOS=圆4) else (set xOS=Win32)įor /f "tokens=6 delims=. Setlocal EnableExtensions EnableDelayedExpansion If %Online% = 0 (call : Get_KMS_IP KMS_IP 0) else (call : Get_KMS_IP KMS_IP 1) If %Online% = 0 if not exist " %SystemRoot%\system32\SppExtComObjPatcher.* " goto : E_Patcher Enter Your Choice : "Įcho =Įcho Note: Make sure you are connected to Internet For Successful Activation.Ĭhoice /C:GC /N /M " Continue To Activation Go Back : "

^| Check Windows ^& Office Activation Status ^|Įcho. ^| Activate Windows ^& Office With 'Online-KMS' ^|Įcho. ::=įor /f "tokens=2 delims= " %%a IN (' "wmic Path Win32_OperatingSystem Get Caption /format:LIST "') do (set NameOS= %%a) > nul 2 >&1įor /f "tokens=2 delims= " %%a IN (' "wmic Path Win32_OperatingSystem Get CSDVersion /format:LIST "') do (set SP= %%a) > nul 2 >&1įor /f "tokens=2 delims= " %%a in ('wmic path Win32_OperatingSystem get BuildNumber /value') do (set WinBuild= %%a) > nul 2 >&1Įcho. &pause > nul 2 >&1 &exit)Ĭmd /u /c echo Set UAC = CreateObject ^( "Shell.Application " ^) : UAC.ShellExecute " %~0 ", " %params% ", " ", "runas ", 1 > " %temp%\getadmin.vbs " &cscript //nologo " %temp%\getadmin.vbs " &exit If " %1 " = " %params% " (echo Elevating UAC for Administrator Privileges failed &echo Right click on the script and select 'Run as administrator' &echo Press any key to exit. :: The following test is to avoid infinite looping if elevating UAC for Administrator Privileges failed Set " params =Problem_with_elevating_UAC_for_Administrator_Privileges " &if exist " %temp%\getadmin.vbs " del " %temp%\getadmin.vbs "įsutil dirty query %systemdrive% > nul 2 >&1 & goto : GotPrivileges
