-
Notifications
You must be signed in to change notification settings - Fork 1
/
KMS-VL-ALL.cmd
1570 lines (1570 loc) · 53.2 KB
/
KMS-VL-ALL.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
@echo off
set /a _Debug=0
::=============================================================
:: Get Administrator Rights
set _Args=%*
set _Args=%_Args:"=""%
fltmc 1>nul 2>nul || (
cd /d "%~dp0"
cmd /u /c echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && %~s0 %_Args%", "", "runas", 1 > "%temp%\GetAdmin.vbs"
"%temp%\GetAdmin.vbs"
del /f /q "%temp%\GetAdmin.vbs" 1>nul 2>nul
exit
)
::=============================================================
:: Define switches
echo %*| find /i "-createtask" >nul&& set /a _Task=1
echo %*| find /i "-renewalonly" >nul&& set /a _Task=2
::=============================================================
:: No Debug, Define the nul suppressors
if %_Debug% EQU 0 (
set "_Nul_1=1>nul"
set "_Nul_2=2>nul"
set "_Nul_2e=2^>nul"
set "_Nul_1_2=1>nul 2>nul"
goto :Begin
)
:: Debug, Clear all nul suppressors, Relaunch script redirecting output to log file
if %_Debug% NEQ 0 (
set "_Nul_1="
set "_Nul_2="
set "_Nul_2e="
set "_Nul_1_2="
echo.
echo Running in Debug Mode...
echo The window will be closed when finished
)
if "%1" NEQ "" (
@echo on & prompt $g
goto :Begin
)
cd /d "%~dp0"
cmd /c "%~s0" debug>"%~dpn0.tmp" 2>&1
cmd /u /c type "%~dpn0.tmp">"%~sdp0KMS_VL_ALL_Debug.log"
del "%~dpn0.tmp"
exit/b
::=============================================================
:Begin
:: Set Title of the Script; Color [Background][Text] in hex (0 to F)
title KMS-VL-ALL-7.0RC2 [2018-06-07]
color 07
::===================
:: Get Fully Qualified FileName of the Script
set "_FileName=%~f0"
::===================
:: Get Drive and Path containing the Script
set "_FileDir=%~dp0"
::===================
:: Set Task Name for the Script
set "_TaskName=KMS_VL_ALL"
::===================
:: Set EnableExtensions and DelayedExpansion
setlocal EnableExtensions EnableDelayedExpansion
::=============================================================
:: Can be 0 (Online Mode - Used for External KMS Server) | 1 (Offline Mode - Used for Internal KMS Server)
set /a _OfflineMode=1
::===================
:: Can be 0 (Delete Auto-Renewal-Task OR Manual-Mode) | 1 (Create Auto-Renewal-Task)
if not defined _Task set /a _Task=0
::===================
:: Can be ONSTART | ONLOGON | MINUTE(1-1439) | HOURLY(1-23) | DAILY(1-365) | WEEKLY(1-52) | MONTHLY(1-12)
set "_TaskFrequency=ONLOGON"
:: Can be integers in the range shown above
set /a _TaskModifier=1
::=============================================================
:: Set Parameters for KMS Server
::===================
:: Custom Windows ePID
set "_WindowsEPID=03612-00206-471-452343-03-1033-14393.0000-1082018"
:: Custom Windows 10 Enterprise G/GN ePID
set "_WindowsGEPID=03612-00206-471-452343-03-1033-14393.0000-1082018"
::===================
:: Custom Office 2010 ePID
set "_Office2010EPID=03612-00096-199-303490-03-1033-14393.0000-1082018"
::===================
:: Custom Office 2013 ePID
set "_Office2013EPID=03612-00206-234-394838-03-1033-14393.0000-1082018"
::===================
:: Custom Office 2016 ePID
set "_Office2016EPID=03612-00206-437-938923-03-1033-14393.0000-1082018"
::===================
:: Can be Custom HardwareID obtained from a Real KMS Server Host
set "_HardwareID=3A1C049600B60076"
::===================
:: Can be 0 (Custom ePIDs) | 1 (Randomized ePIDs for every Session) | 2 (Randomized ePIDs for every Request)
set /a _RandomLevel=0
::===================
:: Can be (15 to 43200) minutes; Default - 2 hours, Maximum - 30 days
set /a _KMSActivationInterval=43200
::===================
:: Can be (15 to 43200) minutes; Default - 7 days, Maximum - 30 days
set /a _KMSRenewalInterval=43200
::=============================================================
:: Set Parameters for KMS Client
::===================
:: _KMSHost Can be (0-255.0-255.0-255.0-255), but NOT 127.x.x.x/Localhost IPs [Offline Mode] | KMS-ServerName/IP [Online Mode]
set "_KMSHost=172.16.0.4"
set "_KMSLocalHost=127.0.0.2"
::===================
:: Can be (1 to 65535) [Offline Mode]; 1688 [Online Mode]
set /a _KMSPort=1686
::=============================================================
:: Set Registry Key for DLL Hook
set "_regKey=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options"
::=============================================================
:: Registry Keys for SPP and OSPP
set "_hkSPP=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform"
set "_huSPP=HKEY_USERS\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform"
set "_hkOSPP=HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform"
::=============================================================
:: Set KMS Genuine Ticket Validation Parameters
::===================
:: Can be 0 (Enable Genuine Ticket) | 1 (Disable Genuine Ticket)
set /a _KMSNoGenTicket=1
::===================
:: Registry Key for KMS Genuine Ticket
set "_KMSGenuineKey=HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform"
::=============================================================
:: Go to the Path of the Script
pushd "!_FileDir!"
::===================
:: Check if [Office 2010 on Windows XP SP3 or Later] OR [Office 2013 or Later on Windows 7 / Server 2008 R2] is Installed
wmic path OfficeSoftwareProtectionService get Version %_Nul_1_2% && (
set /a _OSPS=1
) || (
set /a _OSPS=0
)
::===================
:: Check if Office products are ACTUALLY installed
for %%A in (14,15,16) do (
call :OfficeDetect %%A
)
::===================
:: Get Architecture of the OS installed; OS Locale Independent from Windows XP / Server 2003 and Later
for /f "tokens=2 delims==" %%G in ('wmic path Win32_Processor get AddressWidth /value') do (
set "_OSarch=%%G-bit"
)
::===================
:: Visual Studio Activation
call :VisualStudio "12.0" "InstallDir" "" "87DQC-G8CYR-CRPJ4-QX9K8-RFV2B" "06181" "2013 Ultimate"
call :VisualStudio "14.0" "InstallDir" "" "HM6NR-QXX7C-DFW2Y-8B82K-WTYJV" "07060" "2015 Enterprise"
call :VisualStudio "SxS\VS7" "15.0" "Common7\IDE" "NJVYC-BMHX2-G77MM-4XJMR-6Q8QF" "08860" "2017 Enterprise"
::===================
:: Get Windows OS build number
for /f "tokens=2 delims==" %%G in ('wmic path Win32_OperatingSystem get BuildNumber /value') do (
set /a _WinBuild=%%G
)
::===================
:: Define installed Edition for Windows 10 -1607- or later
if %_WinBuild% LSS 14393 goto :Main
:: Get Edition based on active CBS package, or fall back to Dism CurrentEdition
set "_CBS=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages"
set "_Pattern=Microsoft-Windows-*Edition~31bf3856ad364e35"
set "_EditionPkg=NUL"
for /f "tokens=8 delims=\" %%A in ('reg query "%_CBS%" /f "%_Pattern%" /k %_Nul_2e% ^| find /i "CurrentVersion"') do (
reg query "%_CBS%\%%A" /v "CurrentState" %_Nul_2% | find /i "0x70" %_Nul_1% && (
for /f "tokens=3 delims=-~" %%B in ('echo %%A') do set "_EditionPkg=%%B"
)
)
if /i "%_EditionPkg:~-7%"=="Edition" (
set "_Edition=%_EditionPkg:~0,-7%"
) else (
for /f "tokens=3 delims=: " %%A in ('dism /English /Online /Get-CurrentEdition %_Nul_2e% ^| find /i "Current Edition :"') do (
set "_Edition=%%A"
)
)
:: Get Edition based on current installed product key
for /f "tokens=2 delims==" %%A in ('"wmic path SoftwareLicensingProduct where (Name like 'Windows%%' and PartialProductKey is not NULL) get LicenseFamily /value"') do (
set "_EditionWMI=%%A"
)
if not defined _EditionWMI goto :Main
:: Exclude Windows 10 S
for %%A in (Cloud,CloudN) do (
if /i "%_EditionWMI%"=="%%A" goto :Main
)
set _Edition=%_EditionWMI%
::===================
:Main
:: Goto Main blocks according to Windows BuildNumber
if %_WinBuild% GEQ 9600 (
REM NO parenthesis or brackets in echo messages
echo Operating System: Windows 8.1 or Later
goto :Win8.1AndLater
) else if %_WinBuild% GEQ 2600 (
echo Operating System: Windows 8 or Earlier
goto :Win8AndEarlier
) else (
echo KMS_VL_ALL is NOT supported on this OS.
echo.
echo Closing in 5 Seconds...
ping 127.0.0.1 -n 6 %_Nul_1_2%
exit
)
::=============================================================
:Close
:: Create/Delete Auto-Renewal Task based on parameter; Windows XP SP3 or Later Compatible
if %_Task% EQU 1 (
schtasks /query /fo list %_Nul_2% | findstr /i "%_TaskName%" %_Nul_1% && (
schtasks /delete /tn "%_TaskName%" /f %_Nul_1_2%
)
if /i %_TaskFrequency% EQU ONSTART (
schtasks /create /tn "%_TaskName%" /ru "SYSTEM" /sc "%_TaskFrequency%" /tr "!_FileName! -renewalonly" %_Nul_1_2% && (
echo.
echo Auto-Renewal Task is Created.
)
) else if /i %_TaskFrequency% EQU ONLOGON (
schtasks /create /tn "%_TaskName%" /ru "SYSTEM" /sc "%_TaskFrequency%" /tr "!_FileName! -renewalonly" %_Nul_1_2% && (
echo.
echo Auto-Renewal Task is Created.
)
) else (
schtasks /create /tn "%_TaskName%" /ru "SYSTEM" /sc "%_TaskFrequency%" /mo "%_TaskModifier%" /tr "!_FileName! -renewalonly" %_Nul_1_2% && (
echo.
echo Auto-Renewal Task is Created.
)
)
) else if %_Task% EQU 0 (
schtasks /query /fo list %_Nul_2% | findstr /i "%_TaskName%" %_Nul_1% && (
schtasks /delete /tn "%_TaskName%" /f %_Nul_1_2%
echo.
echo Auto-Renewal Task is Deleted.
)
)
echo.
echo Closing in 5 Seconds...
ping 127.0.0.1 -n 6 %_Nul_1_2%
exit
::=============================================================
:Win8.1AndLater
if %_OfflineMode% EQU 1 (
REM Stop 'sppsvc' and 'osppsvc'
call :StopService "sppsvc"
if %_OSPS% NEQ 0 (
call :StopService "osppsvc"
)
REM Symlink the DLL Injection files to system32 folder based on OS architecture
mklink "%SystemRoot%\system32\SppExtComObjHook.dll" "!_FileDir!%_OSarch%\SppExtComObjHook.dll" %_Nul_1_2%
mklink "%SystemRoot%\system32\SppExtComObjPatcher.exe" "!_FileDir!%_OSarch%\SppExtComObjPatcher.exe" %_Nul_1_2%
REM Create registry keys for DLL Hook
call :CreateIFEOEntry "SppExtComObj.exe"
if %_OSPS% NEQ 0 (
call :CreateIFEOEntry "osppsvc.exe"
)
REM Add Firewall Exceptions for VLMCSD and Start KMS Server
call :AddFirewallRule
call :StartKMS
)
::===================
:: Enable/Disable KMS Genuine Ticket Validation for Windows 8.1 and later
if %_WinBuild% GEQ 9600 (
call :KMSGenuineTicket
)
::===================
:: Call Windows and Office Activation Main Functions
call :SLSActivation
if %_OSPS% NEQ 0 (
call :OSPSActivation
)
if %_OfflineMode% EQU 1 (
REM Stop KMS Server and Remove Firewall Exceptions for VLMCSD
call :StopKMS
call :RemoveFirewallRule
REM Stop 'sppsvc' and 'osppsvc'
call :StopService "sppsvc"
if %_OSPS% NEQ 0 (
call :StopService "osppsvc"
)
REM Delete the DLL Injection files from system32 folder
del /f /q "%SystemRoot%\system32\SppExtComObjPatcher.exe" %_Nul_1_2%
del /f /q "%SystemRoot%\system32\SppExtComObjHook.dll" %_Nul_1_2%
REM Remove registry keys for DLL Hook
call :RemoveIFEOEntry "SppExtComObj.exe"
if %_OSPS% NEQ 0 (
call :RemoveIFEOEntry "osppsvc.exe"
)
REM Start 'sppsvc'
sc start sppsvc trigger=timer;sessionid=0 %_Nul_1_2%
)
call :Close
::=============================================================
:Win8AndEarlier
:: Exit if No Office 2010 product is installed on Windows XP SP3/Server 2003 R2
if %_OSPS% EQU 0 (
if %_WinBuild% LSS 6000 (
echo.
echo No Office 2010 Product Detected...
call :Close
)
)
::===================
if %_OfflineMode% EQU 1 (
REM Localhost IP can be used for Windows 8 and earlier
set "_KMSHost=%_KMSLocalHost%"
REM Windows Vista do not support SetKeyManagementServicePort, so revert to default KMS port
if %_WinBuild% LSS 7600 (
set /a _KMSPort=1688
)
REM Add Firewall Exceptions for VLMCSD and Start KMS Server
call :AddFirewallRule
call :StartKMS
)
::===================
:: Call Windows and Office Activation Main Functions
if %_WinBuild% GEQ 6000 (
call :SLSActivation
)
if %_OSPS% NEQ 0 (
call :OSPSActivation
)
::===================
if %_OfflineMode% EQU 1 (
REM Stop KMS Server and Remove Firewall Exceptions for VLMCSD
call :StopKMS
call :RemoveFirewallRule
)
call :Close
::=============================================================
:AddFirewallRule
:: Add VLMCSD KMS Exception to Windows Firewall
if %_WinBuild% LSS 6000 (
netsh firewall delete allowedprogram "!_FileDir!32-bit\vlmcsd.exe" %_Nul_1_2%
netsh firewall add allowedprogram "!_FileDir!32-bit\vlmcsd.exe" "vlmcsd" %_Nul_1_2%
) else (
netsh advfirewall firewall delete rule name="vlmcsd" %_Nul_1_2%
netsh advfirewall firewall add rule name="vlmcsd" dir=in action=allow profile=any program="!_FileDir!32-bit\vlmcsd.exe" %_Nul_1_2%
)
exit /b
::=============================================================
:RemoveFirewallRule
:: Remove VLMCSD KMS Exception from Windows Firewall
if %_WinBuild% LSS 6000 (
netsh firewall delete allowedprogram "!_FileDir!32-bit\vlmcsd.exe" %_Nul_1_2%
) else (
netsh advfirewall firewall delete rule name="vlmcsd" %_Nul_1_2%
)
exit /b
::=============================================================
:StartKMS
:: Start VLMCSD KMS Server
if %_RandomLevel% EQU 0 (
start "" /b "!_FileDir!32-bit\vlmcsd.exe" -P %_KMSPort% -0 %_Office2010EPID% -3 %_Office2013EPID% -6 %_Office2016EPID% -w %_WindowsEPID% -G %_WindowsGEPID% -H %_HardwareID% -R %_KMSRenewalInterval% -A %_KMSActivationInterval% -T0 -e %_Nul_1_2%
) else (
start "" /b "!_FileDir!32-bit\vlmcsd.exe" -r %_RandomLevel% -P %_KMSPort% -H %_HardwareID% -R %_KMSRenewalInterval% -A %_KMSActivationInterval% -T0 -e %_Nul_1_2%
)
::===================
:: Mind boggling BUG Fix; Windows Vista or earlier takes some time to start KMS Server which prevents Activation; So add delay for it to successfully start
if %_WinBuild% LSS 7600 (
ping 127.0.0.1 -n 12 %_Nul_1_2%
)
exit /b
::=============================================================
:StopKMS
:: Stop VLMCSD KMS Server
taskkill /im "vlmcsd.exe" /t /f %_Nul_1_2%
exit /b
::=============================================================
:KMSGenuineTicket
:: Enable/Disable KMS Genuine Ticket Validation registry key based on user parameter
reg add "%_KMSGenuineKey%" /v NoGenTicket /t REG_DWORD /d %_KMSNoGenTicket% /f %_Nul_1_2%
exit /b
::=============================================================
:CreateIFEOEntry
:: Create DLL Injection Registry keys based on parameter
reg add "%_regKey%\%~1" /f /v "Debugger" /t REG_SZ /d "SppExtComObjPatcher.exe" %_Nul_1_2%
REM Set KMS_Emulation to 0 since we use external KMS Server; 1 for internal KMS Server in Injector files
reg add "%_regKey%\%~1" /f /v "KMS_Emulation" /t REG_DWORD /d 0 %_Nul_1_2%
exit /b
::=============================================================
:RemoveIFEOEntry
:: Remove DLL Injection Registry keys based on parameter
if '%~1' NEQ 'osppsvc.exe' (
reg delete "%_regKey%\%~1" /f %_Nul_1_2%
)
if '%~1' EQU 'osppsvc.exe' (
reg delete "%_regKey%\%~1" /f /v "Debugger" %_Nul_1_2%
reg delete "%_regKey%\%~1" /f /v "KMS_Emulation" %_Nul_1_2%
)
exit /b
::=============================================================
:StopService
:: Stop service based on parameter
sc query "%1" | findstr /i "STOPPED" %_Nul_1_2% || (
net stop "%1" /y %_Nul_1_2%
)
sc query "%1" | findstr /i "STOPPED" %_Nul_1_2% || (
sc stop "%1" %_Nul_1_2%
)
exit /b
::=============================================================
:SLSActivation
reg delete "%_hkSPP%\55c92734-d682-4d71-983e-d6ec3f16059f" /f %_Nul_1_2%
reg delete "%_hkSPP%\0ff1ce15-a989-479d-af46-f275c6370663" /f %_Nul_1_2%
set "_MicrosoftProduct=SoftwareLicensingProduct"
set "_MicrosoftService=SoftwareLicensingService"
::===================
:: Detect if Office 2013 [Volume Licensed] or Later is Installed
wmic path %_MicrosoftProduct% where (Description like '%%KMSCLIENT%%') get Name /value %_Nul_2% | findstr /i "Office" %_Nul_1% && (
set /a _OfficeVL=1
) || (
set /a _OfficeVL=0
if %_WinBuild% GEQ 9200 (
echo.
echo No Office 2013 or Later VL Product Detected; Retail Versions need to be converted to VL first.
)
)
::===================
:: Detect if installed Windows supports KMS Activation; Exit if there are no VolumeLicensed Windows or Office
wmic path %_MicrosoftProduct% where (Description like '%%KMSCLIENT%%') get Name /value %_Nul_2% | findstr /i "Windows" %_Nul_1% || (
echo.
echo No Supported KMS Client Windows Detected...
if %_OfficeVL% EQU 0 (
exit /b
)
)
::===================
:: Check if GVLK is installed for Windows
wmic path %_MicrosoftProduct% where (Description like '%%KMSCLIENT%%' and PartialProductKey is not NULL) get Name /value %_Nul_2% | findstr /i "Windows" %_Nul_1% && (
set /a _WindowsGVLK=1
) || (
set /a _WindowsGVLK=0
)
::===================
:: Call Common Core Activation Routines
call :CommonSLSandOSPS
reg delete "%_hkSPP%\55c92734-d682-4d71-983e-d6ec3f16059f" /f %_Nul_1_2%
reg delete "%_hkSPP%\0ff1ce15-a989-479d-af46-f275c6370663" /f %_Nul_1_2%
reg delete "%_huSPP%\55c92734-d682-4d71-983e-d6ec3f16059f" /f %_Nul_1_2%
reg delete "%_huSPP%\0ff1ce15-a989-479d-af46-f275c6370663" /f %_Nul_1_2%
exit /b
::=============================================================
:OSPSActivation
reg delete "%_hkOSPP%\59a52881-a989-479d-af46-f275c6370663" /f %_Nul_1_2%
reg delete "%_hkOSPP%\0ff1ce15-a989-479d-af46-f275c6370663" /f %_Nul_1_2%
set "_MicrosoftProduct=OfficeSoftwareProtectionProduct"
set "_MicrosoftService=OfficeSoftwareProtectionService"
::===================
:: Determine if installed Office product is Retail or VL version; Exit if no VolumeLicensed Office is detected
wmic path %_MicrosoftProduct% where (Description like '%%KMSCLIENT%%') get Name %_Nul_1_2% || (
if %_WinBuild% LSS 9200 (
echo.
echo No Office 2010 or Later VL Product Detected; Retail Versions need to be converted to VL first.
exit /b
) else (
echo.
echo No Office 2010 VL Product Detected; Retail Versions need to be converted to VL first.
exit /b
)
)
::===================
:: Call Common Core Activation Routines
call :CommonSLSandOSPS
reg delete "%_hkOSPP%\59a52881-a989-479d-af46-f275c6370663" /f %_Nul_1_2%
reg delete "%_hkOSPP%\0ff1ce15-a989-479d-af46-f275c6370663" /f %_Nul_1_2%
exit /b
::=============================================================
:CommonSLSandOSPS
:: Get SoftwareLicensingService/OfficeSoftwareProtectionService version to set 'KMSHost' and 'KMSPort' values
for /f "tokens=2 delims==" %%G in ('"wmic path %_MicrosoftService% get Version /value"') do (
set "_ver=%%G"
)
wmic path %_MicrosoftService% where version='%_ver%' call SetKeyManagementServiceMachine MachineName="%_KMSHost%" %_Nul_1_2%
wmic path %_MicrosoftService% where version='%_ver%' call SetKeyManagementServicePort %_KMSPort% %_Nul_1_2%
:: This is available only on SoftwareLicensingService version 6.2 and later; Not available for OfficeSoftwareProtectionService
wmic path %_MicrosoftService% where version='%_ver%' call SetVLActivationTypeEnabled 2 %_Nul_1_2%
::===================
:: For all the supported KMS Clients in SoftwareLicensingProduct/OfficeSoftwareProtectionProduct call 'CheckProduct'
for /f "tokens=2 delims==" %%G in ('"wmic path %_MicrosoftProduct% where (Description like '%%KMSCLIENT%%') get ID /value"') do (
set "_ActivationID=%%G"
call :CheckProduct !_ActivationID!
)
::===================
:: Clear KMS Server details from KMS Client
wmic path %_MicrosoftService% where version='%_ver%' call ClearKeyManagementServiceMachine %_Nul_1_2%
wmic path %_MicrosoftService% where version='%_ver%' call ClearKeyManagementServicePort %_Nul_1_2%
:: This is available only on SoftwareLicensingService version 6.2 and later; Not available for OfficeSoftwareProtectionService
wmic path %_MicrosoftService% where version='%_ver%' call ClearVLActivationTypeEnabled %_Nul_1_2%
wmic path %_MicrosoftService% where version='%_ver%' call DisableKeyManagementServiceDnsPublishing 1 %_Nul_1_2%
wmic path %_MicrosoftService% where version='%_ver%' call DisableKeyManagementServiceHostCaching 1 %_Nul_1_2%
exit /b
::=============================================================
:CheckProduct
:: If Detected KMS Client is already activated earlier OR has GVLK, call Activate function
wmic path %_MicrosoftProduct% where ID='%1' get LicenseStatus | findstr "1" %_Nul_1_2% && (
call :Activate %1
exit /b
)
wmic path %_MicrosoftProduct% where (PartialProductKey is not NULL) get ID | findstr /i "%1" %_Nul_1_2% && (
call :Activate %1
exit /b
)
::===================
:: Skip for Unnecessary Products
set /a _OfficeSLP=0
wmic path %_MicrosoftProduct% where ID='%1' get Name /value | findstr /i "Office" %_Nul_1% && (
set /a _OfficeSLP=1
)
if %_OfficeSLP% EQU 0 (
if %_WindowsGVLK% EQU 1 (
exit /b
)
)
:: Ugly hack for multiple Windows 10 SKU-IDs
for %%G in (
b71515d9-89a2-4c60-88c8-656fbcca7f3a
5b2add49-b8f4-42e0-a77c-adad4efeeeb1
af43f7f0-3b1e-4266-a123-1fdb53f4323b
075aca1f-05d7-42e5-a3ce-e349e7be7078
2cf5af84-abab-4ff0-83f8-f040fb2576eb
11a37f09-fb7f-4002-bd84-f3ae71d11e90
43f2ab05-7c87-4d56-b27c-44d0f9a3dabd
6ae51eeb-c268-4a21-9aae-df74c38b586d
ff808201-fec6-4fd4-ae16-abbddade5706
34260150-69ac-49a3-8a0d-4a403ab55763
903663f7-d2ab-49c9-8942-14aa9e0a9c72
4dfd543d-caa6-4f69-a95f-5ddfe2b89567
5fe40dd6-cf1f-4cf2-8729-92121ac2e997
2cc171ef-db48-4adc-af09-7c574b37f139
) do (
if /i '%1' EQU '%%G' (
exit /b
)
)
::===================
:: If Detected KMS Client do not have GVLK, do checks for permanent activation, then install GVLK and activate it
for /f "tokens=3 delims==, " %%G in ('"wmic path %_MicrosoftProduct% where ID='%1' get Name /value"') do (
set "_ProductName=%%G"
)
if '%_ProductName%' EQU '19' (
if %_Office16% EQU 0 (
exit /b
)
call :CheckOffice19 %1
exit /b
) else if '%_ProductName%' EQU '16' (
if %_Office16% EQU 0 (
exit /b
)
call :CheckOffice16 %1
exit /b
) else if '%_ProductName%' EQU '15' (
if %_Office15% EQU 0 (
exit /b
)
call :CheckOffice15 %1
exit /b
) else if '%_ProductName%' EQU '14' (
if %_Office14% EQU 0 (
exit /b
)
call :CheckOffice14 %1
exit /b
)
::===================
:: Pre Windows 10 -1607- do not have combined editions
if not defined _Edition (
call :CheckWindows %1
exit /b
)
:: Ugly hack for combined editions in Windows 10 installation
if /i '%1' EQU '2de67392-b7a7-462a-b1ca-108dd189f588' (
if /i %_Edition% NEQ Professional (
exit /b
)
)
if /i '%1' EQU 'a80b5abf-76ad-428b-b05d-a47d2dffeebf' (
if /i %_Edition% NEQ ProfessionalN (
exit /b
)
)
if /i '%1' EQU '82bbc092-bc50-4e16-8e18-b74fc486aec3' (
if /i %_Edition% NEQ ProfessionalWorkstation (
exit /b
)
)
if /i '%1' EQU '4b1571d3-bafb-4b40-8087-a961be2caf65' (
if /i %_Edition% NEQ ProfessionalWorkstationN (
exit /b
)
)
if /i '%1' EQU '3f1afc82-f8ac-4f6c-8005-1d233e606eee' (
if /i %_Edition% NEQ ProfessionalEducation (
exit /b
)
)
if /i '%1' EQU '5300b18c-2e33-4dc2-8291-47ffcec746dd' (
if /i %_Edition% NEQ ProfessionalEducationN (
exit /b
)
)
if /i '%1' EQU '73111121-5638-40f6-bc11-f1d7b0d64300' (
if /i %_Edition% NEQ Enterprise (
exit /b
)
)
if /i '%1' EQU 'e272e3e2-732f-4c65-a8f0-484747d0d947' (
if /i %_Edition% NEQ EnterpriseN (
exit /b
)
)
if /i '%1' EQU 'e0c42288-980c-4788-a014-c080d2e1926e' (
if /i %_Edition% NEQ Education (
exit /b
)
)
if /i '%1' EQU '3c102355-d027-42c6-ad23-2e7ef8a02585' (
if /i %_Edition% NEQ EducationN (
exit /b
)
)
if /i '%1' EQU 'e4db50ea-bda1-4566-b047-0ca50abc6f07' (
if /i %_Edition% NEQ ServerRdsh (
exit /b
)
)
if /i '%1' EQU '58e97c99-f377-4ef1-81d5-4ad5522b5fd8' (
if /i %_Edition% NEQ Core (
exit /b
)
)
if /i '%1' EQU 'cd918a57-a41b-4c82-8dce-1a538e221a83' (
if /i %_Edition% NEQ CoreSingleLanguage (
exit /b
)
)
call :CheckWindows %1
exit /b
::=============================================================
:CheckWindows
wmic path %_MicrosoftProduct% where (LicenseStatus='1' and GracePeriodRemaining='0') get Name %_Nul_2% | findstr /i "Windows" %_Nul_1% && (
echo.
echo Detected Windows is permanently activated.
exit /b
)
::===================
:: If Windows is not permanently activated, Install GVLK and Activate
call :SelectKey %1
exit /b
::=============================================================
:CheckOffice19
if /i '%app%' equ '0bc88885-718c-491d-921f-6f214349e79c' (
call :CheckOffice "%1" "19ProPlus2019XC2RVL_MAKC2R" "Office ProPlus 2019 C2R"
exit /b
)
if /i '%app%' equ 'fc7c4d0c-2e85-4bb9-afd4-01ed1476b5e9' (
call :CheckOffice "%1" "19ProjectPro2019XC2RVL_MAKC2R" "Project Pro 2019 C2R"
exit /b
)
if /i '%app%' equ '500f6619-ef93-4b75-bcb4-82819998a3ca' (
call :CheckOffice "%1" "19VisioPro2019XC2RVL_MAKC2R" "Visio Pro 2019 C2R"
exit /b
)
call :SelectKey %1
exit /b
::=============================================================
:CheckOffice16
if /i '%app%' equ '9caabccb-61b1-4b4b-8bec-d10a3c3ac2ce' (
call :CheckOffice "%1" "16MondoVL_MAK" "Office Mondo 2016"
exit /b
)
if /i '%app%' equ 'd450596f-894d-49e0-966a-fd39ed4c4c64' (
call :CheckOffice "%1" "16ProPlusVL_MAK" "Office ProPlus 2016"
exit /b
)
if /i '%app%' equ 'dedfa23d-6ed1-45a6-85dc-63cae0546de6' (
call :CheckOffice "%1" "16StandardVL_MAK" "Office Standard 2016"
exit /b
)
if /i '%app%' equ '4f414197-0fc2-4c01-b68a-86cbb9ac254c' (
call :CheckOffice "%1" "16ProjectProVL_MAK" "Project Pro 2016"
exit /b
)
if /i '%app%' equ 'da7ddabc-3fbe-4447-9e01-6ab7440b4cd4' (
call :CheckOffice "%1" "16ProjectStdVL_MAK" "Project Standard 2016"
exit /b
)
if /i '%app%' equ '6bf301c1-b94a-43e9-ba31-d494598c47fb' (
call :CheckOffice "%1" "16VisioProVL_MAK" "Visio Pro 2016"
exit /b
)
if /i '%app%' equ 'aa2a7821-1827-4c2c-8f1d-4513a34dda97' (
call :CheckOffice "%1" "16VisioStdVL_MAK" "Visio Standard 2016"
exit /b
)
if /i '%app%' equ '829b8110-0e6f-4349-bca4-42803577788d' (
call :CheckOffice "%1" "16ProjectProXC2RVL_MAKC2R" "Project Pro 2016 C2R"
exit /b
)
if /i '%app%' equ 'cbbaca45-556a-4416-ad03-bda598eaa7c8' (
call :CheckOffice "%1" "16ProjectStdXC2RVL_MAKC2R" "Project Standard 2016 C2R"
exit /b
)
if /i '%app%' equ 'b234abe3-0857-4f9c-b05a-4dc314f85557' (
call :CheckOffice "%1" "16VisioProXC2RVL_MAKC2R" "Visio Pro 2016 C2R"
exit /b
)
if /i '%app%' equ '361fe620-64f4-41b5-ba77-84f8e079b1f7' (
call :CheckOffice "%1" "16VisioStdXC2RVL_MAKC2R" "Visio Standard 2016 C2R"
exit /b
)
call :SelectKey %1
exit /b
::=============================================================
:CheckOffice15
if /i '%app%' equ 'dc981c6b-fc8e-420f-aa43-f8f33e5c0923' (
call :CheckOffice "%1" "MondoVL_MAK" "Office Mondo 2013"
exit /b
)
if /i '%app%' equ 'b322da9c-a2e2-4058-9e4e-f59a6970bd69' (
call :CheckOffice "%1" "ProPlusVL_MAK" "Office ProPlus 2013"
exit /b
)
if /i '%app%' equ 'b13afb38-cd79-4ae5-9f7f-eed058d750ca' (
call :CheckOffice "%1" "StandardVL_MAK" "Office Standard 2013"
exit /b
)
if /i '%app%' equ '4a5d124a-e620-44ba-b6ff-658961b33b9a' (
call :CheckOffice "%1" "ProjectProVL_MAK" "Project Pro 2013"
exit /b
)
if /i '%app%' equ '427a28d1-d17c-4abf-b717-32c780ba6f07' (
call :CheckOffice "%1" "ProjectStdVL_MAK" "Project Standard 2013"
exit /b
)
if /i '%app%' equ 'e13ac10e-75d0-4aff-a0cd-764982cf541c' (
call :CheckOffice "%1" "VisioProVL_MAK" "Visio Pro 2013"
exit /b
)
if /i '%app%' equ 'ac4efaf0-f81f-4f61-bdf7-ea32b02ab117' (
call :CheckOffice "%1" "VisioStdVL_MAK" "Visio Standard 2013"
exit /b
)
call :SelectKey %1
exit /b
::=============================================================
:CheckOffice14
set "vPrem="
set "vPro="
for /f "tokens=2 delims==" %%G in ('"wmic path %_MicrosoftProduct% where (Name like '%%OfficeVisioPrem-MAK%%') get LicenseStatus /value" %_Nul_2e%') do (
set /a _vPrem=%%G
)
for /f "tokens=2 delims==" %%G in ('"wmic path %_MicrosoftProduct% where (Name like '%%OfficeVisioPro-MAK%%') get LicenseStatus /value" %_Nul_2e%') do (
set /a _vPro=%%G
)
if /i '%app%' equ '09ed9640-f020-400a-acd8-d7d867dfd9c2' (
call :CheckOffice "%1" "Mondo-MAK" "Office Mondo 2010"
exit /b
)
if /i '%app%' equ '6f327760-8c5c-417c-9b61-836a98287e0c' (
call :CheckOffice "%1" "ProPlus-MAK" "Office ProPlus 2010" "ProPlusAcad-MAK" "Office Professional Academic 2010"
exit /b
)
if /i '%app%' equ '9da2a678-fb6b-4e67-ab84-60dd6a9c819a' (
call :CheckOffice "%1" "Standard-MAK" "Office Standard 2010"
exit /b
)
if /i '%app%' equ 'ea509e87-07a1-4a45-9edc-eba5a39f36af' (
call :CheckOffice "%1" "SmallBusBasics-MAK" "Office Home and Business 2010"
exit /b
)
if /i '%app%' equ 'df133ff7-bf14-4f95-afe3-7b48e7e331ef' (
call :CheckOffice "%1" "ProjectPro-MAK" "Project Pro 2010"
exit /b
)
if /i '%app%' equ '5dc7bf61-5ec9-4996-9ccb-df806a2d0efe' (
call :CheckOffice "%1" "ProjectStd-MAK" "Project Standard 2010"
exit /b
)
if /i '%app%' equ '92236105-bb67-494f-94c7-7f7a607929bd' (
call :CheckOffice "%1" "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 :CheckOffice "%1" "VisioPro-MAK" "Visio Pro 2010" "VisioStd-MAK" "Visio Standard 2010"
exit /b
)
if defined _vPro exit /b
if /i '%app%' equ '9ed833ff-4f92-4f36-b370-8683a4f13275' (
call :CheckOffice "%1" "VisioStd-MAK" "Visio Standard 2010"
exit /b
)
call :SelectKey %1
exit /b
::=============================================================
:CheckOffice
set ls=0
set ls2=0
for /f "tokens=2 delims==" %%G in ('"wmic path %_MicrosoftProduct% where (Name like '%%Office%~2%%') get LicenseStatus /VALUE" %_Nul_2e%') do (
set /a ls=%%G
)
if "%~4" NEQ "" (
for /f "tokens=2 delims==" %%G in ('"wmic path %_MicrosoftProduct% where (Name like '%%Office%~4%%') get LicenseStatus /VALUE" %_Nul_2e%') do (
set /a ls2=%%G
)
if "!ls2!" EQU "1" (
echo Detected %5 is permanently MAK activated.
exit /b
)
)
if "!ls!" EQU "1" (
echo Detected %3 is permanently MAK activated.
exit /b
)
:: If Office product is not permanently activated, Install GVLK and Activate
call :SelectKey %1
exit /b
::=============================================================
:OfficeDetect
set _Office%1=0
for /f "tokens=2*" %%G in ('"reg query HKLM\SOFTWARE\Microsoft\Office\%1.0\Common\InstallRoot /v Path" %_Nul_2e%') do if exist "%%H\OSPP.VBS" (
set _Office%1=1
)
for /f "tokens=2*" %%G in ('"reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\%1.0\Common\InstallRoot /v Path" %_Nul_2e%') do if exist "%%H\OSPP.VBS" (
set _Office%1=1
)
if exist "%ProgramFiles%\Microsoft Office\Office%1\OSPP.VBS" (
set _Office%1=1
)
if exist "%ProgramFiles(x86)%\Microsoft Office\Office%1\OSPP.VBS" (
set _Office%1=1
)
exit /b
::=============================================================
:VisualStudio
:: Clear variable to avoid confliction if multiple Visual Studio versions installed
set "_VS="
if "%_OSarch%" EQU "64-bit" (
set "_H64=SOFTWARE\WOW6432Node"
) else (
set "_H64=SOFTWARE"
)
for /f "skip=2 tokens=2*" %%G in ('"reg query HKLM\%_H64%\Microsoft\VisualStudio\%~1 /v %~2" %_Nul_2e%') do (
set "_VS=%%H%~3"
)
if not exist "%_VS%\StorePID.exe" (
exit /b
)
start "" /b "%_VS%\StorePID.exe" %~4 %~5 && (
echo Visual Studio %~6 activated successfully.
echo.
) || (
echo Visual Studio %~6 activation failed.
echo.
)
exit /b
::=============================================================
:Activate
:: Clear any manually set KMSHostIP and KMSPort with /skms or /sethst; Since they override KMSHostIP and KMSPort values set for SLS/OSPS
wmic path %_MicrosoftProduct% where ID='%1' call ClearKeyManagementServiceMachine %_Nul_1_2%
wmic path %_MicrosoftProduct% where ID='%1' call ClearKeyManagementServicePort %_Nul_1_2%
::===================
:: Call Activate method of the corresponding KMS Client
for /f "tokens=2 delims==" %%G in ('"wmic path %_MicrosoftProduct% where ID='%1' get Name /value"') do (
echo.
echo Attempting to activate %%G
)
wmic path %_MicrosoftProduct% where ID='%1' call Activate %_Nul_1_2%
SET ERRORCODE=%ERRORLEVEL%
::===================
:: Get Remaining Grace Period of the KMS Client
for /f "tokens=2 delims==" %%G in ('"wmic path %_MicrosoftProduct% where ID='%1' get GracePeriodRemaining /value"') do (
set /a _gprMinutes=%%G
set /a _gprDays=%%G/1440
)
::===================
if %_gprMinutes% EQU 43200 (
if %_WinBuild% EQU 9200 (
echo Windows 8 Core/ProfessionalWMC Activation Successful
echo Remaining Period: %_gprDays% days ^(%_gprMinutes% minutes^)
exit /b
)
)
if %_gprMinutes% EQU 64800 (
echo Windows Core/ProfessionalWMC Activation Successful
echo Remaining Period: %_gprDays% days ^(%_gprMinutes% minutes^)
exit /b
)
if %_gprMinutes% EQU 216000000 (
if %_WinBuild% GEQ 15063 (
echo Windows 10 Enterprise G/GN Activation Successful
echo Remaining Period: %_gprDays% days ^(%_gprMinutes% minutes^)
exit /b
)
)
if %_gprMinutes% EQU 259200 (
echo Activation Successful
) else (
call cmd /c exit /b %ERRORCODE%
echo Activation Failed: 0x%=ExitCode%
)
echo Remaining Period: %_gprDays% days ^(%_gprMinutes% minutes^)
exit /b
::=============================================================
:SelectKey
:: Select GenericVolumeLicenseKey based on Activation-ID (SKU-ID) and Install it, if found
for /f "tokens=2 delims==" %%G in ('"wmic path %_MicrosoftProduct% where ID='%1' get Name /value"') do (
set "_Name=%%G"
echo.
echo Searching GenericVolumeLicenseKey for %%G
goto :%1 %_Nul_2% || goto :KeyNotFound
)
::=============================================================
:: Office 2019 Professional Plus C2R-P
:0bc88885-718c-491d-921f-6f214349e79c
set "_key=VQ9DP-NVHPH-T9HJC-J9PDT-KTQRG"
goto :InstallKey
:: Project 2019 Professional C2R-P
:fc7c4d0c-2e85-4bb9-afd4-01ed1476b5e9
set "_key=XM2V9-DN9HH-QB449-XDGKC-W2RMW"
goto :InstallKey
:: Visio 2019 Professional C2R-P
:500f6619-ef93-4b75-bcb4-82819998a3ca
set "_key=N2CG9-YD3YK-936X4-3WR82-Q3X4H"
goto :InstallKey
::=============================================================
:: Office 2016 Mondo
:9caabccb-61b1-4b4b-8bec-d10a3c3ac2ce
set "_key=HFTND-W9MK4-8B7MJ-B6C4G-XQBR2"
goto :InstallKey
:: Office 2016 Professional Plus
:d450596f-894d-49e0-966a-fd39ed4c4c64
set "_key=XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99"
goto :InstallKey
:: Office 2016 Standard
:dedfa23d-6ed1-45a6-85dc-63cae0546de6
set "_key=JNRGM-WHDWX-FJJG3-K47QV-DRTFM"
goto :InstallKey
:: Project 2016 Professional
:4f414197-0fc2-4c01-b68a-86cbb9ac254c
set "_key=YG9NW-3K39V-2T3HJ-93F3Q-G83KT"
goto :InstallKey
:: Project 2016 Standard
:da7ddabc-3fbe-4447-9e01-6ab7440b4cd4
set "_key=GNFHQ-F6YQM-KQDGJ-327XX-KQBVC"
goto :InstallKey
:: Visio 2016 Professional
:6bf301c1-b94a-43e9-ba31-d494598c47fb
set "_key=PD3PC-RHNGV-FXJ29-8JK7D-RJRJK"
goto :InstallKey
:: Visio 2016 Standard
:aa2a7821-1827-4c2c-8f1d-4513a34dda97
set "_key=7WHWN-4T7MP-G96JF-G33KR-W8GF4"
goto :InstallKey
:: Access 2016
:67c0fc0c-deba-401b-bf8b-9c8ad8395804
set "_key=GNH9Y-D2J4T-FJHGG-QRVH7-QPFDW"
goto :InstallKey
:: Excel 2016
:c3e65d36-141f-4d2f-a303-a842ee756a29
set "_key=9C2PK-NWTVB-JMPW8-BFT28-7FTBF"
goto :InstallKey
:: OneNote 2016
:d8cace59-33d2-4ac7-9b1b-9b72339c51c8
set "_key=DR92N-9HTF2-97XKM-XW2WJ-XW3J6"
goto :InstallKey
:: Outlook 2016
:ec9d9265-9d1e-4ed0-838a-cdc20f2551a1
set "_key=R69KK-NTPKF-7M3Q4-QYBHW-6MT9B"
goto :InstallKey
:: PowerPoint 2016
:d70b1bba-b893-4544-96e2-b7a318091c33
set "_key=J7MQP-HNJ4Y-WJ7YM-PFYGF-BY6C6"
goto :InstallKey
:: Publisher 2016
:041a06cb-c5b8-4772-809f-416d03d16654
set "_key=F47MM-N3XJP-TQXJ9-BP99D-8K837"
goto :InstallKey
:: Skype for Business 2016
:83e04ee1-fa8d-436d-8994-d31a862cab77
set "_key=869NQ-FJ69K-466HW-QYCP2-DDBV6"
goto :InstallKey
:: Word 2016
:bb11badf-d8aa-470e-9311-20eaf80fe5cc
set "_key=WXY84-JN2Q9-RBCCQ-3Q3J3-3PFJ6"
goto :InstallKey
:: Project 2016 Professional C2R-P
:829b8110-0e6f-4349-bca4-42803577788d
set "_key=WGT24-HCNMF-FQ7XH-6M8K7-DRTW9"
goto :InstallKey
:: Project 2016 Standard C2R-P
:cbbaca45-556a-4416-ad03-bda598eaa7c8
set "_key=D8NRQ-JTYM3-7J2DX-646CT-6836M"
goto :InstallKey
:: Visio 2016 Professional C2R-P
:b234abe3-0857-4f9c-b05a-4dc314f85557
set "_key=69WXN-MBYV6-22PQG-3WGHK-RM6XC"
goto :InstallKey
:: Visio 2016 Standard C2R-P
:361fe620-64f4-41b5-ba77-84f8e079b1f7
set "_key=NY48V-PPYYH-3F4PX-XJRKJ-W4423"
goto :InstallKey