Skip to content

Commit be7d101

Browse files
committed
Merge branch 'dev'
2 parents a149fc5 + 55b6fce commit be7d101

12 files changed

+2525
-549
lines changed

.gitattributes

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MAS export-ignore
2-
# LICENSE export-ignore
3-
# README.md export-ignore
1+
MAS export-ignore
2+
LICENSE export-ignore
3+
README.md export-ignore
44
.gitattributes export-ignore

MAS/All-In-One-Version-KL/MAS_AIO.cmd

Lines changed: 1101 additions & 174 deletions
Large diffs are not rendered by default.

MAS/Separate-Files-Version/Activators/HWID_Activation.cmd

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@set masver=3.2
1+
@set masver=3.3
22
@echo off
33

44

@@ -100,6 +100,8 @@ set "nul="
100100

101101
set "blank="
102102
set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/"
103+
set "github=ht%blank%tps%blank%://github.com/massgra%blank%vel/Micro%blank%soft-Acti%blank%vation-Scripts"
104+
set "selfgit=ht%blank%tps%blank%://git.acti%blank%vated.win/massg%blank%rave/Micr%blank%osoft-Act%blank%ivation-Scripts"
103105

104106
:: Check if Null service is working, it's important for the batch script
105107

@@ -239,12 +241,14 @@ for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[
239241

240242
if /i not "%tstresult%"=="FullLanguage" (
241243
%eline%
242-
echo: %tstresult%
243-
cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode"
244+
for /f "delims=" %%a in ('%psc% "$ExecutionContext.SessionState.LanguageMode" %nul6%') do (set tstresult2=%%a)
245+
echo Test 1 - %tstresult%
246+
echo Test 2 - !tstresult2!
247+
echo:
244248

245249
REM check LanguageMode
246250

247-
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
251+
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
248252
echo FullLanguage mode not found in PowerShell. Aborting...
249253
echo If you have applied restrictions on Powershell then undo those changes.
250254
echo:
@@ -274,7 +278,13 @@ goto dk_done
274278
REM check antivirus and other errors
275279

276280
echo PowerShell is not working properly. Aborting...
277-
cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }"""
281+
282+
if /i "!tstresult2!"=="FullLanguage" (
283+
echo:
284+
echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted.
285+
cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}"""
286+
)
287+
278288
echo:
279289
set fixes=%fixes% %mas%troubleshoot
280290
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
@@ -356,7 +366,7 @@ echo:
356366
call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :"
357367
choice /C:10 /N
358368
if !errorlevel!==2 rem
359-
if !errorlevel!==1 (start %mas% & exit /b)
369+
if !errorlevel!==1 (start %selfgit% & start %github% & start %mas% & exit /b)
360370
)
361371
)
362372

@@ -1171,7 +1181,7 @@ if not exist %SysPath%\%_slexe% if not exist %SysPath%\alg.exe (set "results=%re
11711181
if not "%results%%pupfound%"=="" (
11721182
if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]"
11731183
if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..."
1174-
if defined results call :dk_color %Red% "%results%"
1184+
if defined results (call :dk_color %Red% "%results%"&set showfix=1)
11751185
set fixes=%fixes% %mas%remove_mal%w%ware
11761186
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
11771187
echo:
@@ -1310,7 +1320,7 @@ call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option
13101320
)
13111321

13121322

1313-
:: https://learn.microsoft.com/windows-hardware/manufacture/desktop/windows-setup-states
1323+
:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states
13141324

13151325
for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B)
13161326

@@ -1581,7 +1591,7 @@ set "permerror=Error Found In SPP Registries"
15811591
)
15821592
)
15831593

1584-
REM https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application
1594+
REM https://learn.microsoft.com/en-us/office/troubleshoot/activation/license-issue-when-start-office-application
15851595

15861596
if not defined permerror (
15871597
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && (
@@ -1707,7 +1717,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. "
17071717
call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore"
17081718
choice /C:10 /N
17091719
if !errorlevel!==2 exit /b
1710-
if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
1720+
if !errorlevel!==1 (start %selfgit% & start %github% & for %%# in (%fixes%) do (start %%#))
17111721
)
17121722

17131723
if defined terminal (

MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@set masver=3.2
1+
@set masver=3.3
22
@echo off
33

44

@@ -103,6 +103,8 @@ set "nul="
103103

104104
set "blank="
105105
set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/"
106+
set "github=ht%blank%tps%blank%://github.com/massgra%blank%vel/Micro%blank%soft-Acti%blank%vation-Scripts"
107+
set "selfgit=ht%blank%tps%blank%://git.acti%blank%vated.win/massg%blank%rave/Micr%blank%osoft-Act%blank%ivation-Scripts"
106108

107109
:: Check if Null service is working, it's important for the batch script
108110

@@ -242,12 +244,14 @@ for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[
242244

243245
if /i not "%tstresult%"=="FullLanguage" (
244246
%eline%
245-
echo: %tstresult%
246-
cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode"
247+
for /f "delims=" %%a in ('%psc% "$ExecutionContext.SessionState.LanguageMode" %nul6%') do (set tstresult2=%%a)
248+
echo Test 1 - %tstresult%
249+
echo Test 2 - !tstresult2!
250+
echo:
247251

248252
REM check LanguageMode
249253

250-
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
254+
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
251255
echo FullLanguage mode not found in PowerShell. Aborting...
252256
echo If you have applied restrictions on Powershell then undo those changes.
253257
echo:
@@ -277,7 +281,13 @@ goto dk_done
277281
REM check antivirus and other errors
278282

279283
echo PowerShell is not working properly. Aborting...
280-
cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }"""
284+
285+
if /i "!tstresult2!"=="FullLanguage" (
286+
echo:
287+
echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted.
288+
cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}"""
289+
)
290+
281291
echo:
282292
set fixes=%fixes% %mas%troubleshoot
283293
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
@@ -359,7 +369,7 @@ echo:
359369
call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :"
360370
choice /C:10 /N
361371
if !errorlevel!==2 rem
362-
if !errorlevel!==1 (start %mas% & exit /b)
372+
if !errorlevel!==1 (start %selfgit% & start %github% & start %mas% & exit /b)
363373
)
364374
)
365375
cls
@@ -1314,7 +1324,7 @@ if not exist %SysPath%\%_slexe% if not exist %SysPath%\alg.exe (set "results=%re
13141324
if not "%results%%pupfound%"=="" (
13151325
if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]"
13161326
if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..."
1317-
if defined results call :dk_color %Red% "%results%"
1327+
if defined results (call :dk_color %Red% "%results%"&set showfix=1)
13181328
set fixes=%fixes% %mas%remove_mal%w%ware
13191329
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
13201330
echo:
@@ -1453,7 +1463,7 @@ call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option
14531463
)
14541464

14551465

1456-
:: https://learn.microsoft.com/windows-hardware/manufacture/desktop/windows-setup-states
1466+
:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states
14571467

14581468
for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B)
14591469

@@ -1724,7 +1734,7 @@ set "permerror=Error Found In SPP Registries"
17241734
)
17251735
)
17261736

1727-
REM https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application
1737+
REM https://learn.microsoft.com/en-us/office/troubleshoot/activation/license-issue-when-start-office-application
17281738

17291739
if not defined permerror (
17301740
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && (
@@ -1850,7 +1860,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. "
18501860
call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore"
18511861
choice /C:10 /N
18521862
if !errorlevel!==2 exit /b
1853-
if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
1863+
if !errorlevel!==1 (start %selfgit% & start %github% & for %%# in (%fixes%) do (start %%#))
18541864
)
18551865

18561866
if defined terminal (

MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@set masver=3.2
1+
@set masver=3.3
22
@echo off
33

44

@@ -100,6 +100,8 @@ set "nul="
100100

101101
set "blank="
102102
set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/"
103+
set "github=ht%blank%tps%blank%://github.com/massgra%blank%vel/Micro%blank%soft-Acti%blank%vation-Scripts"
104+
set "selfgit=ht%blank%tps%blank%://git.acti%blank%vated.win/massg%blank%rave/Micr%blank%osoft-Act%blank%ivation-Scripts"
103105

104106
:: Check if Null service is working, it's important for the batch script
105107

@@ -247,12 +249,14 @@ for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[
247249

248250
if /i not "%tstresult%"=="FullLanguage" (
249251
%eline%
250-
echo: %tstresult%
251-
cmd /c "%psc% $ExecutionContext.SessionState.LanguageMode"
252+
for /f "delims=" %%a in ('%psc% "$ExecutionContext.SessionState.LanguageMode" %nul6%') do (set tstresult2=%%a)
253+
echo Test 1 - %tstresult%
254+
echo Test 2 - !tstresult2!
255+
echo:
252256

253257
REM check LanguageMode
254258

255-
cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
259+
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
256260
echo FullLanguage mode not found in PowerShell. Aborting...
257261
echo If you have applied restrictions on Powershell then undo those changes.
258262
echo:
@@ -282,7 +286,13 @@ goto dk_done
282286
REM check antivirus and other errors
283287

284288
echo PowerShell is not working properly. Aborting...
285-
cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { if ($i.displayName -notlike '*windows*') { $n += $i.displayName } }; if ($n) { Write-Host ('Installed 3rd party Antivirus might be blocking the script - ' + ($n -join ', ')) -ForegroundColor White -BackgroundColor Blue }"""
289+
290+
if /i "!tstresult2!"=="FullLanguage" (
291+
echo:
292+
echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted.
293+
cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}"""
294+
)
295+
286296
echo:
287297
set fixes=%fixes% %mas%troubleshoot
288298
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
@@ -364,7 +374,7 @@ echo:
364374
call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :"
365375
choice /C:10 /N
366376
if !errorlevel!==2 rem
367-
if !errorlevel!==1 (start %mas% & exit /b)
377+
if !errorlevel!==1 (start %selfgit% & start %github% & start %mas% & exit /b)
368378
)
369379
)
370380
cls
@@ -529,7 +539,7 @@ call :dk_color %Red% "Checking Installed Office [Not Found]"
529539

530540
if defined ohub (
531541
echo:
532-
echo You only have the Office dashboard app installed, you need to install the full version of Office.
542+
echo You only have the Office Dashboard app installed. You need to install the full version of Office.
533543
)
534544
echo:
535545
call :dk_color %Blue% "Download and install Office from the below URL and then try again."
@@ -671,12 +681,12 @@ call :oh_hookinstall
671681

672682
::========================================================================================================================================
673683

674-
:: Old version (16.0.9xxxx and below) of Office with subscription license key may show a banner to sign in to fix license issue.
684+
:: Old version of Office with subscription license key may show a banner to sign in to fix license issue.
675685
:: Although script applies a Resiliency registry entry to fix that but it doesn't work on old office versions.
676686
:: Below code checks that condition and informs the user to update the Office.
677687

678688
if defined _sublic (
679-
if not exist "%_oLPath%\Word2019VL_KMS_Client_AE*.xrm-ms" (
689+
if not exist "%_oLPath%\Word2021VL_KMS_Client_AE*.xrm-ms" (
680690
call :dk_color %Gray% "Checking Old Office With Sub License [Found. Update Office, otherwise, it may show a licensing issue-related banner.]"
681691
)
682692
)
@@ -1356,7 +1366,7 @@ exit /b
13561366
:oh_clearblock
13571367

13581368
:: Find remnants of Office vNext/shared/device license block and remove it because it stops other licenses from appearing
1359-
:: https://learn.microsoft.com/office/troubleshoot/activation/reset-office-365-proplus-activation-state
1369+
:: https://learn.microsoft.com/en-us/office/troubleshoot/activation/reset-office-365-proplus-activation-state
13601370

13611371
set _sidlist=
13621372
for /f "tokens=* delims=" %%a in ('%psc% "$p = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList'; Get-ChildItem $p | ForEach-Object { $pi = (Get-ItemProperty """"$p\$($_.PSChildName)"""").ProfileImagePath; if ($pi -like '*\Users\*' -and (Test-Path """"$pi\NTUSER.DAT"""") -and -not ($_.PSChildName -match '\.bak$')) { Split-Path $_.PSPath -Leaf } }" %nul6%') do (if defined _sidlist (set _sidlist=!_sidlist! %%a) else (set _sidlist=%%a))
@@ -1452,12 +1462,12 @@ reg delete HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\Configuration /v Share
14521462
)
14531463

14541464
:: Clear device-based-licensing
1455-
:: https://learn.microsoft.com/deployoffice/device-based-licensing
1465+
:: https://learn.microsoft.com/en-us/deployoffice/device-based-licensing
14561466

14571467
for /f %%# in ('reg query "%o16c2r_reg%\Configuration" /f *.DeviceBasedLicensing %nul6% ^| findstr REG_') do reg delete "%o16c2r_reg%\Configuration" /v %%# /f %nul%
14581468

14591469
:: Remove OEM registry key
1460-
:: https://support.microsoft.com/office/office-repeatedly-prompts-you-to-activate-on-a-new-pc-a9a6b05f-f6ce-4d1f-8d49-eb5007b64ba1
1470+
:: https://support.microsoft.com/en-us/office/office-repeatedly-prompts-you-to-activate-on-a-new-pc-a9a6b05f-f6ce-4d1f-8d49-eb5007b64ba1
14611471

14621472
for %%# in (15 16) do (
14631473
reg delete "HKLM\SOFTWARE\Microsoft\Office\%%#.0\Common\OEM" /f %nul%
@@ -1701,9 +1711,9 @@ if %_wmic% EQU 0 set "chkapp=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISE
17011711

17021712
if defined allapps if %1==0ff1ce15-a989-479d-af46-f275c6370663 (
17031713
set len=0
1704-
echo:!allapps!> %SystemRoot%\Temp\chklen
1705-
for %%A in (%SystemRoot%\Temp\chklen) do (set len=%%~zA)
1706-
del %SystemRoot%\Temp\chklen %nul%
1714+
echo:!allapps!> "!_ttemp!\chklen"
1715+
for %%A in ("!_ttemp!\chklen") do (set len=%%~zA)
1716+
del "!_ttemp!\chklen" %nul%
17071717

17081718
if !len! GTR 6000 (
17091719
%eline%
@@ -1832,7 +1842,7 @@ if not exist %SysPath%\%_slexe% if not exist %SysPath%\alg.exe (set "results=%re
18321842
if not "%results%%pupfound%"=="" (
18331843
if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]"
18341844
if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..."
1835-
if defined results call :dk_color %Red% "%results%"
1845+
if defined results (call :dk_color %Red% "%results%"&set showfix=1)
18361846
set fixes=%fixes% %mas%remove_mal%w%ware
18371847
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
18381848
echo:
@@ -1971,7 +1981,7 @@ call :dk_color2 %Red% "Checking Boot Mode [%safeboot_option
19711981
)
19721982

19731983

1974-
:: https://learn.microsoft.com/windows-hardware/manufacture/desktop/windows-setup-states
1984+
:: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-states
19751985

19761986
for /f "skip=2 tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState') do (set imagestate=%%B)
19771987

@@ -2242,7 +2252,7 @@ set "permerror=Error Found In SPP Registries"
22422252
)
22432253
)
22442254

2245-
REM https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application
2255+
REM https://learn.microsoft.com/en-us/office/troubleshoot/activation/license-issue-when-start-office-application
22462256

22472257
if not defined permerror (
22482258
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && (
@@ -2368,7 +2378,7 @@ call :dk_color %White% "Follow ALL the ABOVE blue lines. "
23682378
call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore"
23692379
choice /C:10 /N
23702380
if !errorlevel!==2 exit /b
2371-
if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#))
2381+
if !errorlevel!==1 (start %selfgit% & start %github% & for %%# in (%fixes%) do (start %%#))
23722382
)
23732383

23742384
if defined terminal (

0 commit comments

Comments
 (0)