Skip to content

Commit d4b8f94

Browse files
Added HWID support for Windows 10 LTSC 2019
- Now Microsoft support HWID (Digital License) for Windows 10 LTSC 2019, added key for it in the script. - Some minor improvements.
1 parent 118379f commit d4b8f94

30 files changed

+32915
-0
lines changed

MAS_1.4/All-In-One-Version/MAS_1.4_AIO_CRC32_9A7B5B05.cmd

Lines changed: 24305 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
@setlocal DisableDelayedExpansion
2+
@echo off
3+
@cls
4+
5+
6+
:: ==================================================
7+
:: Check-Activation-Status-Alternative.cmd
8+
:: Written by @abbodi1406 (MDL)
9+
:: https://forums.mydigitallife.net/posts/838808
10+
:: ==================================================
11+
12+
13+
14+
15+
16+
17+
color 07
18+
title Check Activation Status [wmic]
19+
set wspp=SoftwareLicensingProduct
20+
set wsps=SoftwareLicensingService
21+
set ospp=OfficeSoftwareProtectionProduct
22+
set osps=OfficeSoftwareProtectionService
23+
set winApp=55c92734-d682-4d71-983e-d6ec3f16059f
24+
set o14App=59a52881-a989-479d-af46-f275c6370663
25+
set o15App=0ff1ce15-a989-479d-af46-f275c6370663
26+
for %%# in (spp_get,ospp_get,cW1nd0ws,sppw,c0ff1ce15,sppo,osppsvc,ospp14,ospp15) do set "%%#="
27+
for /f "tokens=6 delims=[]. " %%# in ('ver') do set winbuild=%%#
28+
set "spp_get=Description, DiscoveredKeyManagementServiceMachineName, DiscoveredKeyManagementServiceMachinePort, EvaluationEndDate, GracePeriodRemaining, ID, KeyManagementServiceMachine, KeyManagementServicePort, KeyManagementServiceProductKeyID, LicenseStatus, LicenseStatusReason, Name, PartialProductKey, ProductKeyID, VLActivationInterval, VLRenewalInterval"
29+
set "ospp_get=%spp_get%"
30+
if %winbuild% geq 9200 set "spp_get=%spp_get%, DiscoveredKeyManagementServiceMachineIpAddress, KeyManagementServiceLookupDomain, ProductKeyChannel, VLActivationTypeEnabled"
31+
32+
set "SysPath=%Windir%\System32"
33+
if exist "%Windir%\Sysnative\reg.exe" (set "SysPath=%Windir%\Sysnative")
34+
set "Path=%SysPath%;%Windir%;%SysPath%\Wbem;%SysPath%\WindowsPowerShell\v1.0\"
35+
set "line2=************************************************************"
36+
set "line3=____________________________________________________________"
37+
38+
call :casWpkey %wspp% %winApp% cW1nd0ws sppw
39+
if %winbuild% geq 9200 call :casWpkey %wspp% %o15App% c0ff1ce15 sppo
40+
wmic path %osps% get Version 1>nul 2>nul && (
41+
call :casWpkey %ospp% %o14App% osppsvc ospp14
42+
if %winbuild% lss 9200 call :casWpkey %ospp% %o15App% osppsvc ospp15
43+
)
44+
45+
echo %line2%
46+
echo *** Windows Status ***
47+
echo %line2%
48+
if not defined cW1nd0ws (
49+
echo:
50+
echo Error: product key not found.
51+
goto :casWcon
52+
)
53+
set winID=1
54+
for /f "tokens=2 delims==" %%# in ('"wmic path %wspp% where (ApplicationID='%winApp%' and PartialProductKey is not null) get ID /value"') do (
55+
set "chkID=%%#"
56+
call :casWdet "%wspp%" "%wsps%" "%spp_get%"
57+
call :casWout
58+
echo %line3%
59+
echo:
60+
)
61+
62+
:casWcon
63+
set winID=0
64+
set verbose=1
65+
if not defined c0ff1ce15 (
66+
if defined osppsvc goto :casWospp
67+
goto :casWend
68+
)
69+
echo %line2%
70+
echo *** Office Status ***
71+
echo %line2%
72+
for /f "tokens=2 delims==" %%# in ('"wmic path %wspp% where (ApplicationID='%o15App%' and PartialProductKey is not null) get ID /value"') do (
73+
set "chkID=%%#"
74+
call :casWdet "%wspp%" "%wsps%" "%spp_get%"
75+
call :casWout
76+
echo %line3%
77+
echo:
78+
)
79+
set verbose=0
80+
if defined osppsvc goto :casWospp
81+
goto :casWend
82+
83+
:casWospp
84+
if %verbose%==1 (
85+
echo %line2%
86+
echo *** Office Status ***
87+
echo %line2%
88+
)
89+
if defined ospp15 for /f "tokens=2 delims==" %%# in ('"wmic path %ospp% where (ApplicationID='%o15App%' and PartialProductKey is not null) get ID /value"') do (
90+
set "chkID=%%#"
91+
call :casWdet "%ospp%" "%osps%" "%ospp_get%"
92+
call :casWout
93+
echo %line3%
94+
echo:
95+
)
96+
if defined ospp14 for /f "tokens=2 delims==" %%# in ('"wmic path %ospp% where (ApplicationID='%o14App%' and PartialProductKey is not null) get ID /value"') do (
97+
set "chkID=%%#"
98+
call :casWdet "%ospp%" "%osps%" "%ospp_get%"
99+
call :casWout
100+
echo %line3%
101+
echo:
102+
)
103+
goto :casWend
104+
105+
:casWpkey
106+
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)
107+
exit /b
108+
109+
:casWdet
110+
for %%# in (%~3) do set "%%#="
111+
if %~1 equ %ospp% for %%# in (DiscoveredKeyManagementServiceMachineIpAddress, KeyManagementServiceLookupDomain, ProductKeyChannel, VLActivationTypeEnabled) do set "%%#="
112+
set "cKmsClient="
113+
set "cTblClient="
114+
set "cAvmClient="
115+
set "ExpireMsg="
116+
set "_xpr="
117+
for /f "tokens=* delims=" %%# in ('"wmic path %~1 where ID='%chkID%' get %~3 /value" ^| findstr ^=') do set "%%#"
118+
119+
set /a _gpr=(GracePeriodRemaining+1440-1)/1440
120+
echo %Description%| findstr /i VOLUME_KMSCLIENT 1>nul && (set cKmsClient=1&set _mTag=Volume)
121+
echo %Description%| findstr /i TIMEBASED_ 1>nul && (set cTblClient=1&set _mTag=Timebased)
122+
echo %Description%| findstr /i VIRTUAL_MACHINE_ACTIVATION 1>nul && (set cAvmClient=1&set _mTag=Automatic VM)
123+
cmd /c exit /b %LicenseStatusReason%
124+
set "LicenseReason=%=ExitCode%"
125+
set "LicenseMsg=Time remaining: %GracePeriodRemaining% minute(s) (%_gpr% day(s))"
126+
if %_gpr% GEQ 1 for /f "tokens=* delims=" %%# in ('powershell "$([DateTime]::Now.addMinutes(%GracePeriodRemaining%)).ToString('yyyy-MM-dd HH:mm:ss')" 2^>nul') do set "_xpr=%%#"
127+
128+
if %LicenseStatus% EQU 0 (
129+
set "License=Unlicensed"
130+
set "LicenseMsg="
131+
)
132+
if %LicenseStatus% EQU 1 (
133+
set "License=Licensed"
134+
set "LicenseMsg="
135+
if %GracePeriodRemaining% EQU 0 (
136+
if %winID% EQU 1 (set "ExpireMsg=The machine is permanently activated.") else (set "ExpireMsg=The product is permanently activated.")
137+
) else (
138+
set "LicenseMsg=%_mTag% activation expiration: %GracePeriodRemaining% minute(s) (%_gpr% day(s))"
139+
if defined _xpr set "ExpireMsg=%_mTag% activation will expire %_xpr%"
140+
)
141+
)
142+
if %LicenseStatus% EQU 2 (
143+
set "License=Initial grace period"
144+
if defined _xpr set "ExpireMsg=Initial grace period ends %_xpr%"
145+
)
146+
if %LicenseStatus% EQU 3 (
147+
set "License=Additional grace period (KMS license expired or hardware out of tolerance)"
148+
if defined _xpr set "ExpireMsg=Additional grace period ends %_xpr%"
149+
)
150+
if %LicenseStatus% EQU 4 (
151+
set "License=Non-genuine grace period."
152+
if defined _xpr set "ExpireMsg=Non-genuine grace period ends %_xpr%"
153+
)
154+
if %LicenseStatus% EQU 6 (
155+
set "License=Extended grace period"
156+
if defined _xpr set "ExpireMsg=Extended grace period ends %_xpr%"
157+
)
158+
if %LicenseStatus% EQU 5 (
159+
set "License=Notification"
160+
if "%LicenseReason%"=="C004F200" (set "LicenseMsg=Notification Reason: 0xC004F200 (non-genuine)."
161+
) else if "%LicenseReason%"=="C004F009" (set "LicenseMsg=Notification Reason: 0xC004F009 (grace time expired)."
162+
) else (set "LicenseMsg=Notification Reason: 0x%LicenseReason%"
163+
)
164+
)
165+
if %LicenseStatus% GTR 6 (
166+
set "License=Unknown"
167+
set "LicenseMsg="
168+
)
169+
if not defined cKmsClient exit /b
170+
171+
if %KeyManagementServicePort%==0 set KeyManagementServicePort=1688
172+
set "KmsReg=Registered KMS machine name: %KeyManagementServiceMachine%:%KeyManagementServicePort%"
173+
if "%KeyManagementServiceMachine%"=="" set "KmsReg=Registered KMS machine name: KMS name not available"
174+
175+
if %DiscoveredKeyManagementServiceMachinePort%==0 set DiscoveredKeyManagementServiceMachinePort=1688
176+
set "KmsDns=KMS machine name from DNS: %DiscoveredKeyManagementServiceMachineName%:%DiscoveredKeyManagementServiceMachinePort%"
177+
if "%DiscoveredKeyManagementServiceMachineName%"=="" set "KmsDns=DNS auto-discovery: KMS name not available"
178+
179+
for /f "tokens=* delims=" %%# in ('"wmic path %~2 get ClientMachineID, KeyManagementServiceHostCaching /value" ^| findstr ^=') do set "%%#"
180+
if /i %KeyManagementServiceHostCaching%==True (set KeyManagementServiceHostCaching=Enabled) else (set KeyManagementServiceHostCaching=Disabled)
181+
182+
if %winbuild% lss 9200 exit /b
183+
if %~1 equ %ospp% exit /b
184+
185+
if "%DiscoveredKeyManagementServiceMachineIpAddress%"=="" set "DiscoveredKeyManagementServiceMachineIpAddress=not available"
186+
187+
if "%KeyManagementServiceLookupDomain%"=="" set "KeyManagementServiceLookupDomain="
188+
189+
if %VLActivationTypeEnabled% EQU 3 (
190+
set VLActivationType=Token
191+
) else if %VLActivationTypeEnabled% EQU 2 (
192+
set VLActivationType=KMS
193+
) else if %VLActivationTypeEnabled% EQU 1 (
194+
set VLActivationType=AD
195+
) else (
196+
set VLActivationType=All
197+
)
198+
exit /b
199+
200+
:casWout
201+
echo:
202+
echo Name: %Name%
203+
echo Description: %Description%
204+
echo Activation ID: %ID%
205+
echo Extended PID: %ProductKeyID%
206+
if defined ProductKeyChannel echo Product Key Channel: %ProductKeyChannel%
207+
echo Partial Product Key: %PartialProductKey%
208+
echo License Status: %License%
209+
if defined LicenseMsg echo %LicenseMsg%
210+
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
211+
if not defined cKmsClient (
212+
if defined ExpireMsg echo:&echo: %ExpireMsg%
213+
exit /b
214+
)
215+
if defined VLActivationTypeEnabled echo Configured Activation Type: %VLActivationType%
216+
echo:
217+
if not %LicenseStatus%==1 (
218+
echo Please activate the product in order to update KMS client information values.
219+
exit /b
220+
)
221+
echo Most recent activation information:
222+
echo Key Management Service client information
223+
echo: Client Machine ID (CMID): %ClientMachineID%
224+
echo: %KmsDns%
225+
echo: %KmsReg%
226+
if defined DiscoveredKeyManagementServiceMachineIpAddress echo: KMS machine IP address: %DiscoveredKeyManagementServiceMachineIpAddress%
227+
echo: KMS machine extended PID: %KeyManagementServiceProductKeyID%
228+
echo: Activation interval: %VLActivationInterval% minutes
229+
echo: Renewal interval: %VLRenewalInterval% minutes
230+
echo: KMS host caching: %KeyManagementServiceHostCaching%
231+
if defined KeyManagementServiceLookupDomain echo: KMS SRV record lookup domain: %KeyManagementServiceLookupDomain%
232+
if defined ExpireMsg echo:&echo: %ExpireMsg%
233+
exit /b
234+
235+
:casWend
236+
echo:
237+
echo Press any key to exit.
238+
pause >nul
239+
exit /b
Binary file not shown.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
====================================================================================================
2+
File Details:
3+
====================================================================================================
4+
5+
fabb5a0fc1e6a372219711152291339af36ed0b5 *gatherosstate.exe Virus Total = 0/71
6+
ca3a51fdfc8749b8be85f7904b1c238a6dfba135 *slc.dll Virus Total = 0/68
7+
578364cb2319da7999acd8c015b4ce8da8f1b282 *ARM64_gatherosstate.exe Virus Total = 0/69
8+
5dbea3a580cf60391453a04a5c910a3ceca2b810 *ARM64_slc.dll Virus Total = 0/67
9+
48d928b1bec25a56fe896c430c2c034b7866aa7a *ClipUp.exe Virus Total = 0/68
10+
11+
Virus Total Report Date: 2020-01-21
12+
13+
- File Sources:
14+
15+
- ClipUp.exe (Original):
16+
From Windows server 2016 x64 ISO
17+
18+
- gatherosstate.exe (Original):
19+
From Windows 10 x86 14393 ADK
20+
21+
- ARM64_gatherosstate.exe (Original):
22+
From Windows 10 ARM64 18362 ISO
23+
24+
- ARM64_slc.dll and slc.dll:
25+
26+
Original slshim
27+
https://github.com/vyvojar/slshim
28+
29+
Improved by @mspaintmsi
30+
https://www.nsaneforums.com/topic/316668--/?do=findComment&comment=1497887
31+
https://github.com/massgravel/MASSGRAVE
32+
https://gitlab.com/massgrave/massgrave
33+
34+
Source code is included.
35+
slc.dll is based on Integrated_Patcher_2 method.
36+
It is currently in use in HWID/KMS38 Activation script.
37+
38+
____________________________________________________________________________________________________
39+
40+
You can safely delete the following files if it's not required for you.
41+
42+
ClipUp.exe - Required to KMS38 activate Server Cor and Acor editions.
43+
ARM64_gatherosstate.exe and ARM64_slc.dll - Required to activate ARM64 Arch Windows 10.
44+
45+
====================================================================================================
Binary file not shown.

0 commit comments

Comments
 (0)