mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2026-04-25 08:48:36 +00:00
Compare commits
359 Commits
962f7e326a
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1c0050718 | ||
|
|
2a4fe194fb | ||
|
|
1baa4e18ed | ||
|
|
33b0ac9cc7 | ||
|
|
97602941e5 | ||
|
|
773b758f4d | ||
|
|
c07796e405 | ||
|
|
3e3fe2ca52 | ||
|
|
d33dfc9ce6 | ||
|
|
a5435a349b | ||
|
|
4fdefbc0d5 | ||
|
|
63da908027 | ||
|
|
146d828b46 | ||
|
|
d7302ee41b | ||
|
|
72cd62552e | ||
|
|
8d8ed5d098 | ||
|
|
f0d13cb216 | ||
|
|
a93b4b3f4b | ||
|
|
a353813814 | ||
|
|
da9358e4d8 | ||
|
|
3024b1ca98 | ||
|
|
31a79148b1 | ||
|
|
da0b2800d9 | ||
|
|
54a1ec3d54 | ||
|
|
5f40fb4a79 | ||
|
|
541364642b | ||
|
|
2bc48bfd4d | ||
|
|
f69e4ff432 | ||
|
|
f8f37b38fe | ||
|
|
3c7178aaf6 | ||
|
|
41783f7a23 | ||
|
|
e7e73a8fbc | ||
|
|
7327f3b445 | ||
|
|
27f21a13d5 | ||
|
|
7f3372d778 | ||
|
|
4958ddf474 | ||
|
|
eeae1dd931 | ||
|
|
d16661cc87 | ||
|
|
1ee7cd1e60 | ||
|
|
55cc6d95d1 | ||
|
|
f4e08dac3d | ||
|
|
979dfb750b | ||
|
|
82f7cfe5f4 | ||
|
|
0a35a00266 | ||
|
|
4bf82f576c | ||
|
|
1e444671be | ||
|
|
0aee35e673 | ||
|
|
77c4bacde6 | ||
|
|
117ccae4ed | ||
|
|
470d3b900e | ||
|
|
b064fc628a | ||
|
|
c9789e9aa3 | ||
|
|
0d4ab4b435 | ||
|
|
8c440c5c48 | ||
|
|
233c9d1b29 | ||
|
|
4953ed82b5 | ||
|
|
b627d74f5a | ||
|
|
07fd04ea10 | ||
|
|
e5ed8c2487 | ||
|
|
c37609eabe | ||
|
|
4e06a401b5 | ||
|
|
b74d1155b9 | ||
|
|
d940db1e60 | ||
|
|
ab6b572af9 | ||
|
|
75a4d2e3a7 | ||
|
|
fd2cecb4ec | ||
|
|
a9c2f58741 | ||
|
|
79012c7db0 | ||
|
|
caffa62abe | ||
|
|
a8f6d051a6 | ||
|
|
6022b6de10 | ||
|
|
4ea26906cd | ||
|
|
564aad78b4 | ||
|
|
d5e382e763 | ||
|
|
793550725a | ||
|
|
3917497c82 | ||
|
|
28c2264d89 | ||
|
|
a51ae62332 | ||
|
|
ffcb641f17 | ||
|
|
53a2747338 | ||
|
|
3a99ea4eeb | ||
|
|
e6eaeaa682 | ||
|
|
e2c52b4ac8 | ||
|
|
31c47b9538 | ||
|
|
904e96d748 | ||
|
|
5e2cc4f5cf | ||
|
|
c619a2c381 | ||
|
|
9c09432b01 | ||
|
|
e476ac66a4 | ||
|
|
dba7213a91 | ||
|
|
0f38fa3cef | ||
|
|
2dd41cc2c5 | ||
|
|
d78e262f5b | ||
|
|
fd1e146753 | ||
|
|
bc781ad079 | ||
|
|
43cceb366e | ||
|
|
39bcefa02b | ||
|
|
2b37400aa8 | ||
|
|
1fb65d4f9c | ||
|
|
10b6e8b6dc | ||
|
|
cb36c19f01 | ||
|
|
4aa811dd5e | ||
|
|
5d37a99966 | ||
|
|
64a726202c | ||
|
|
c3e70173e4 | ||
|
|
c817ae8bd9 | ||
|
|
ef411e14ca | ||
|
|
5aa7d4f3de | ||
|
|
409c4f71ad | ||
|
|
d7a6994363 | ||
|
|
5ad6226f37 | ||
|
|
ae9f4e34ff | ||
|
|
67abcd0c89 | ||
|
|
faf3bf3a08 | ||
|
|
482600c890 | ||
|
|
dc90e1ff0f | ||
|
|
f969378f6b | ||
|
|
c89bebdee8 | ||
|
|
be7d101df5 | ||
|
|
55b6fce50a | ||
|
|
6566bb53c1 | ||
|
|
2e44a4a77b | ||
|
|
9073a35fe0 | ||
|
|
9f244ddc17 | ||
|
|
8ed0c6874b | ||
|
|
a99acbb025 | ||
|
|
be867f6616 | ||
|
|
fc80735dac | ||
|
|
69c469a997 | ||
|
|
6e74d49721 | ||
|
|
ae93f547f5 | ||
|
|
830755f6b6 | ||
|
|
a149fc5f20 | ||
|
|
b75ba72bc5 | ||
|
|
206c31ece5 | ||
|
|
133d3b9720 | ||
|
|
fc2348bf53 | ||
|
|
966fbd14f6 | ||
|
|
691e6088d5 | ||
|
|
74b7c74218 | ||
|
|
4c53e6231b | ||
|
|
2d00dfa704 | ||
|
|
bf28e4fbdd | ||
|
|
2a2352428e | ||
|
|
be9215b728 | ||
|
|
93cf3864f5 | ||
|
|
d47a750bad | ||
|
|
817bfe84de | ||
|
|
2b40259b33 | ||
|
|
a514a99d0e | ||
|
|
2a806c2e0c | ||
|
|
b3aaff5110 | ||
|
|
bcc4214e8a | ||
|
|
9e80556df5 | ||
|
|
b24bb9bde1 | ||
|
|
dfebdefeba | ||
|
|
1bdee1ce6f | ||
|
|
4e702068be | ||
|
|
6945236590 | ||
|
|
5872b7df53 | ||
|
|
b8ad749bac | ||
|
|
5090cde0a0 | ||
|
|
af18bd773c | ||
|
|
52ba9f138f | ||
|
|
98ef9db3ce | ||
|
|
172fd7b1c5 | ||
|
|
372eb73a02 | ||
|
|
a1614e1283 | ||
|
|
e8bf344f74 | ||
|
|
70162c4130 | ||
|
|
294837dfe0 | ||
|
|
f5a0a63165 | ||
|
|
0d61475468 | ||
|
|
c316b42e5c | ||
|
|
3b739d7e2b | ||
|
|
8673fbbfda | ||
|
|
60dd549a49 | ||
|
|
1e3c0aaedf | ||
|
|
fe001e6c39 | ||
|
|
c4f33e96c4 | ||
|
|
313f240448 | ||
|
|
69f1a206fb | ||
|
|
ab0cd24f89 | ||
|
|
55afa30fcd | ||
|
|
5e7e42a446 | ||
|
|
a9eda8f572 | ||
|
|
a5bcfdd3e6 | ||
|
|
8d67d62c15 | ||
|
|
6adb247334 | ||
|
|
6c8732dd06 | ||
|
|
9765e7d05f | ||
|
|
60c99742ce | ||
|
|
8f3f392517 | ||
|
|
af69d79c5c | ||
|
|
63045afc70 | ||
|
|
19c6612a47 | ||
|
|
9e6f386819 | ||
|
|
b5ba36c033 | ||
|
|
d10b6d691e | ||
|
|
de812acdc5 | ||
|
|
75c34cbf50 | ||
|
|
0d533338a1 | ||
|
|
411f387705 | ||
|
|
be44b2d887 | ||
|
|
0c88f6bc2c | ||
|
|
d31e4ab0cb | ||
|
|
9fd5a661ab | ||
|
|
b732e2c8d7 | ||
|
|
8e2677b1f9 | ||
|
|
f2e40bf88e | ||
|
|
a4f9b219ab | ||
|
|
7262a44ba2 | ||
|
|
37ec96504a | ||
|
|
051b4f673f | ||
|
|
3ef6d7292e | ||
|
|
0d9ffd2052 | ||
|
|
9f00df5aee | ||
|
|
d6aa8b97d1 | ||
|
|
c00b076a86 | ||
|
|
8fff2ccb9c | ||
|
|
5638898eaf | ||
|
|
22ed7a7a07 | ||
|
|
f1ddb83df0 | ||
|
|
4dd0215ccc | ||
|
|
ec259dfbd7 | ||
|
|
bbdc9bdfd8 | ||
|
|
7d036f57fd | ||
|
|
ab90514b0a | ||
|
|
25abc1f457 | ||
|
|
873c4bc4d8 | ||
|
|
0b402d9afe | ||
|
|
5141866f0a | ||
|
|
f0618824a4 | ||
|
|
03cc88193d | ||
|
|
897a9db808 | ||
|
|
9bbd02cc91 | ||
|
|
d1dca45710 | ||
|
|
5e71252993 | ||
|
|
1db017f1f1 | ||
|
|
d06ba7fc4c | ||
|
|
99954a9056 | ||
|
|
fcb710a48a | ||
|
|
0cbaa141c3 | ||
|
|
9d1964ceda | ||
|
|
0477cf13e1 | ||
|
|
9b568d4b4e | ||
|
|
1c9fe0815e | ||
|
|
a5dd99ac00 | ||
|
|
1849dd3075 | ||
|
|
8fe0b24945 | ||
|
|
7c69c471c5 | ||
|
|
f32cb934dc | ||
|
|
7a6e63a462 | ||
|
|
d76b2ea57e | ||
|
|
1f0e04519a | ||
|
|
d059952ecd | ||
|
|
6efb5d50fe | ||
|
|
b2831795a4 | ||
|
|
4e8ebecd3d | ||
|
|
d929cd8fa0 | ||
|
|
d384c5f2f7 | ||
|
|
643d4f077f | ||
|
|
db26b75b64 | ||
|
|
07ad5a208d | ||
|
|
b80a502086 | ||
|
|
104d0b0dda | ||
|
|
db218720f3 | ||
|
|
b8504cc21e | ||
|
|
2e6bfa94c2 | ||
|
|
a1244dcb3b | ||
|
|
06695612a8 | ||
|
|
323c6808af | ||
|
|
841d856a29 | ||
|
|
52d4c52dba | ||
|
|
c75cd29b9f | ||
|
|
b1b5299c47 | ||
|
|
652092e985 | ||
|
|
b06c83622a | ||
|
|
ce669809bf | ||
|
|
0afb09cbd1 | ||
|
|
5d8a463475 | ||
|
|
7044f37b44 | ||
|
|
08443039aa | ||
|
|
fd8b81411c | ||
|
|
213bc50b49 | ||
|
|
00e81be52f | ||
|
|
2443e1e471 | ||
|
|
ec31fef9b9 | ||
|
|
84f5516632 | ||
|
|
f9f386a896 | ||
|
|
8e3b4135f5 | ||
|
|
bacb32f4a1 | ||
|
|
86c86c179a | ||
|
|
445a74ccea | ||
|
|
69e6c9bf71 | ||
|
|
0ced0f5d8e | ||
|
|
19be25c029 | ||
|
|
d372b62280 | ||
|
|
9e5062e7cc | ||
|
|
ed3dace78f | ||
|
|
1f50e4ba98 | ||
|
|
af7d204c96 | ||
|
|
0d26ba046e | ||
|
|
3fd1666926 | ||
|
|
bf814304c6 | ||
|
|
1dfd3f6626 | ||
|
|
79bc7b0242 | ||
|
|
ae48118ddb | ||
|
|
b983bd41da | ||
|
|
d55b9fa78c | ||
|
|
fb113c7c24 | ||
|
|
9efc3e49b9 | ||
|
|
a62c3ac36d | ||
|
|
73eabbff59 | ||
|
|
bc5efae19d | ||
|
|
deb74ab9b8 | ||
|
|
d08ed1bd38 | ||
|
|
5f5a51322d | ||
|
|
fd0e25f477 | ||
|
|
b33dcb2f72 | ||
|
|
117ba004f0 | ||
|
|
b0d898973f | ||
|
|
63b3c5097b | ||
|
|
69430c6458 | ||
|
|
9f57f585d5 | ||
|
|
52decdde18 | ||
|
|
35e044ddc8 | ||
|
|
601bd0e420 | ||
|
|
5e4988a634 | ||
|
|
3a050f2da7 | ||
|
|
31b55fd0e3 | ||
|
|
62d5d5442e | ||
|
|
f2e6e6e389 | ||
|
|
b5a305a14e | ||
|
|
6c71e82ef3 | ||
|
|
66e8cda508 | ||
|
|
98027af16d | ||
|
|
be45752a21 | ||
|
|
a421b12ae4 | ||
|
|
d06185d7f7 | ||
|
|
a46bb78e5e | ||
|
|
2470963537 | ||
|
|
89bff68b28 | ||
|
|
191121c3d4 | ||
|
|
7bf55fc6ee | ||
|
|
816925bfef | ||
|
|
ad45cf0926 | ||
|
|
29eb5bd60d | ||
|
|
70b754657f | ||
|
|
8b58696455 | ||
|
|
5d47723d07 | ||
|
|
2b786e3037 | ||
|
|
4451a25e7f | ||
|
|
886745f103 | ||
|
|
5728ba2686 | ||
|
|
ddccc4025f | ||
|
|
1567903b09 | ||
|
|
f6125eaa5b | ||
|
|
07c4fcdc74 |
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1,3 +1,4 @@
|
||||
# MAS export-ignore
|
||||
# LICENSE export-ignore
|
||||
# README.md export-ignore
|
||||
# .gitattributes export-ignore
|
||||
|
||||
1
LICENSE
1
LICENSE
@@ -672,4 +672,3 @@ may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
|
||||
|
||||
19239
MAS/All-In-One-Version-KL/MAS_AIO.cmd
Normal file
19239
MAS/All-In-One-Version-KL/MAS_AIO.cmd
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,12 +0,0 @@
|
||||
--------------------------------------------------------------------------------------
|
||||
Activation Type Supported Product Activation Period
|
||||
--------------------------------------------------------------------------------------
|
||||
|
||||
HWID - Windows 10-11 - Permanent
|
||||
Ohook - Office - Permanent
|
||||
KMS38 - Windows 10-11-Server - Till the Year 2038
|
||||
Online KMS - Windows / Office - 180 Days. Lifetime With Renewal Task
|
||||
|
||||
--------------------------------------------------------------------------------------
|
||||
|
||||
For more details, use the respective docs section here https://massgrave.dev/
|
||||
9793
MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd
Normal file
9793
MAS/Separate-Files-Version/Activators/TSforge_Activation.cmd
Normal file
File diff suppressed because it is too large
Load Diff
13
MAS/Separate-Files-Version/Activators/_ReadMe.txt
Normal file
13
MAS/Separate-Files-Version/Activators/_ReadMe.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
--------------------------------------------------------------------------------------
|
||||
Activation Type Supported Product Activation Period
|
||||
--------------------------------------------------------------------------------------
|
||||
|
||||
HWID - Windows 10-11 - Permanent
|
||||
Ohook - Office - Permanent
|
||||
TSforge - Windows / ESU / Office - Permanent
|
||||
Online KMS - Windows / Office - 180 Days. Lifetime With Renewal Task
|
||||
|
||||
--------------------------------------------------------------------------------------
|
||||
|
||||
Check the below link for more details:
|
||||
https://massgrave.dev/chart
|
||||
File diff suppressed because it is too large
Load Diff
1680
MAS/Separate-Files-Version/Change_Office_Edition.cmd
Normal file
1680
MAS/Separate-Files-Version/Change_Office_Edition.cmd
Normal file
File diff suppressed because it is too large
Load Diff
1451
MAS/Separate-Files-Version/Change_Windows_Edition.cmd
Normal file
1451
MAS/Separate-Files-Version/Change_Windows_Edition.cmd
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1587
MAS/Separate-Files-Version/Check_Activation_Status.cmd
Normal file
1587
MAS/Separate-Files-Version/Check_Activation_Status.cmd
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,11 @@
|
||||
@set masver=2.6
|
||||
@setlocal DisableDelayedExpansion
|
||||
@set masver=3.10
|
||||
@echo off
|
||||
|
||||
|
||||
|
||||
::============================================================================
|
||||
::
|
||||
:: This script is a part of 'Microsoft-Activation-Scripts' (MAS) project.
|
||||
::
|
||||
:: Homepage: mass grave[.]dev
|
||||
:: Email: windowsaddict@protonmail.com
|
||||
:: Homepage: m{}assgrave{dot}dev
|
||||
::
|
||||
::============================================================================
|
||||
|
||||
@@ -17,44 +13,55 @@
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Set Path variable, it helps if it is misconfigured in the system
|
||||
:: Set environment variables, it helps if they are misconfigured in the system
|
||||
|
||||
set "PATH=%SystemRoot%\System32;%SystemRoot%\System32\wbem;%SystemRoot%\System32\WindowsPowerShell\v1.0\"
|
||||
setlocal EnableExtensions
|
||||
setlocal DisableDelayedExpansion
|
||||
|
||||
set "PathExt=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC"
|
||||
|
||||
set "SysPath=%SystemRoot%\System32"
|
||||
set "Path=%SystemRoot%\System32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SystemRoot%\System32\WindowsPowerShell\v1.0\"
|
||||
if exist "%SystemRoot%\Sysnative\reg.exe" (
|
||||
set "PATH=%SystemRoot%\Sysnative;%SystemRoot%\Sysnative\wbem;%SystemRoot%\Sysnative\WindowsPowerShell\v1.0\;%PATH%"
|
||||
set "SysPath=%SystemRoot%\Sysnative"
|
||||
set "Path=%SystemRoot%\Sysnative;%SystemRoot%;%SystemRoot%\Sysnative\Wbem;%SystemRoot%\Sysnative\WindowsPowerShell\v1.0\;%Path%"
|
||||
)
|
||||
|
||||
set "ComSpec=%SysPath%\cmd.exe"
|
||||
set "PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;%SysPath%\WindowsPowerShell\v1.0\Modules"
|
||||
|
||||
set re1=
|
||||
set re2=
|
||||
set "_cmdf=%~f0"
|
||||
for %%# in (%*) do (
|
||||
if /i "%%#"=="re1" set re1=1
|
||||
if /i "%%#"=="re2" set re2=1
|
||||
if /i "%%#"=="-qedit" (set re1=1&set re2=1)
|
||||
)
|
||||
|
||||
:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows
|
||||
:: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows
|
||||
|
||||
set "_cmdf=%~f0"
|
||||
for %%# in (%*) do (
|
||||
if /i "%%#"=="r1" set r1=1
|
||||
if /i "%%#"=="r2" set r2=1
|
||||
if /i "%%#"=="-qedit" (
|
||||
reg add HKCU\Console /v QuickEdit /t REG_DWORD /d "1" /f %nul1%
|
||||
rem check the code below admin elevation to understand why it's here
|
||||
)
|
||||
)
|
||||
|
||||
if exist %SystemRoot%\Sysnative\cmd.exe if not defined r1 (
|
||||
if exist %SystemRoot%\Sysnative\cmd.exe if not defined re1 (
|
||||
setlocal EnableDelayedExpansion
|
||||
start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* r1"
|
||||
start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* re1"
|
||||
exit /b
|
||||
)
|
||||
|
||||
:: Re-launch the script with ARM32 process if it was initiated by x64 process on ARM64 Windows
|
||||
|
||||
if exist %SystemRoot%\SysArm32\cmd.exe if %PROCESSOR_ARCHITECTURE%==AMD64 if not defined r2 (
|
||||
if exist %SystemRoot%\SysArm32\cmd.exe if %PROCESSOR_ARCHITECTURE%==AMD64 if not defined re2 (
|
||||
setlocal EnableDelayedExpansion
|
||||
start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %* r2"
|
||||
start %SystemRoot%\SysArm32\cmd.exe /c ""!_cmdf!" %* re2"
|
||||
exit /b
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
set "blank="
|
||||
set "mas=ht%blank%tps%blank%://mass%blank%grave.dev/"
|
||||
set "mas=ht%blank%tps%blank%://m%blank%ass%blank%grave.dev/"
|
||||
set "github=ht%blank%tps%blank%://github.com/m%blank%assgra%blank%vel/Micro%blank%soft-Acti%blank%vation-Scripts"
|
||||
set "selfgit=ht%blank%tps%blank%://git.acti%blank%vated.win/Micr%blank%osoft-Act%blank%ivation-Scripts"
|
||||
|
||||
:: Check if Null service is working, it's important for the batch script
|
||||
|
||||
@@ -64,10 +71,10 @@ echo:
|
||||
echo Null service is not running, script may crash...
|
||||
echo:
|
||||
echo:
|
||||
echo Help - %mas%troubleshoot.html
|
||||
echo Check this webpage for help - %mas%fix_service
|
||||
echo:
|
||||
echo:
|
||||
ping 127.0.0.1 -n 10
|
||||
ping 127.0.0.1 -n 20
|
||||
)
|
||||
cls
|
||||
|
||||
@@ -76,9 +83,13 @@ cls
|
||||
pushd "%~dp0"
|
||||
>nul findstr /v "$" "%~nx0" && (
|
||||
echo:
|
||||
echo Error: Script either has LF line ending issue or an empty line at the end of the script is missing.
|
||||
echo Error - Script either has LF line ending issue or an empty line at the end of the script is missing.
|
||||
echo:
|
||||
ping 127.0.0.1 -n 6 >nul
|
||||
echo:
|
||||
echo Check this webpage for help - %mas%troubleshoot
|
||||
echo:
|
||||
echo:
|
||||
ping 127.0.0.1 -n 20 >nul
|
||||
popd
|
||||
exit /b
|
||||
)
|
||||
@@ -88,13 +99,16 @@ popd
|
||||
|
||||
cls
|
||||
color 07
|
||||
title Extract $OEM$ Folder %masver%
|
||||
title Extract $OEM$ Folder %masver%
|
||||
|
||||
set _args=
|
||||
set _elev=
|
||||
set _unattended=0
|
||||
|
||||
set _args=%*
|
||||
if defined _args set _args=%_args:"=%
|
||||
if defined _args set _args=%_args:re1=%
|
||||
if defined _args set _args=%_args:re2=%
|
||||
if defined _args (
|
||||
for %%A in (%_args%) do (
|
||||
if /i "%%A"=="-el" set _elev=1
|
||||
@@ -106,54 +120,57 @@ set "nul2=2>nul"
|
||||
set "nul6=2^>nul"
|
||||
set "nul=>nul 2>&1"
|
||||
|
||||
set psc=powershell.exe
|
||||
set winbuild=1
|
||||
for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G
|
||||
|
||||
set _NCS=1
|
||||
if %winbuild% LSS 10586 set _NCS=0
|
||||
if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0)
|
||||
|
||||
if %_NCS% EQU 1 (
|
||||
for /F %%a in ('echo prompt $E ^| cmd') do set "esc=%%a"
|
||||
set "Red="41;97m""
|
||||
set "Gray="100;97m""
|
||||
set "Green="42;97m""
|
||||
set "Blue="44;97m""
|
||||
set "_White="40;37m""
|
||||
set "_Green="40;92m""
|
||||
set "_Yellow="40;93m""
|
||||
) else (
|
||||
set "Red="Red" "white""
|
||||
set "Gray="Darkgray" "white""
|
||||
set "Green="DarkGreen" "white""
|
||||
set "Blue="Blue" "white""
|
||||
set "_White="Black" "Gray""
|
||||
set "_Green="Black" "Green""
|
||||
set "_Yellow="Black" "Yellow""
|
||||
)
|
||||
|
||||
set "nceline=echo: &echo ==== ERROR ==== &echo:"
|
||||
set "eline=echo: &call :ex_color %Red% "==== ERROR ====" &echo:"
|
||||
call :dk_setvar
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
if %winbuild% LSS 7600 (
|
||||
if %winbuild% EQU 1 (
|
||||
%eline%
|
||||
echo Failed to detect Windows build number.
|
||||
echo:
|
||||
setlocal EnableDelayedExpansion
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto done2
|
||||
)
|
||||
|
||||
if exist "%Systemdrive%\Users\WDAGUtilityAccount" (
|
||||
sc query gcs | find /i "RUNNING" %nul% && (
|
||||
%eline%
|
||||
echo Windows Sandbox detected.
|
||||
echo The script cannot run due to missing licensing components. Aborting...
|
||||
echo:
|
||||
goto done2
|
||||
)
|
||||
)
|
||||
|
||||
if %winbuild% LSS 6001 (
|
||||
%nceline%
|
||||
echo Unsupported OS version detected [%winbuild%].
|
||||
echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalent.
|
||||
echo MAS only supports Windows Vista/7/8/8.1/10/11 and their Server equivalents.
|
||||
if %winbuild% EQU 6000 (
|
||||
echo:
|
||||
echo Windows Vista RTM is not supported because Powershell cannot be installed.
|
||||
echo Upgrade to Windows Vista SP1 or SP2.
|
||||
)
|
||||
goto done2
|
||||
)
|
||||
|
||||
for %%# in (powershell.exe) do @if "%%~$PATH:#"=="" (
|
||||
if %winbuild% LSS 7600 if not exist "%SysPath%\WindowsPowerShell\v1.0\Modules" (
|
||||
%nceline%
|
||||
echo Unable to find powershell.exe in the system.
|
||||
if not exist %ps% (
|
||||
echo PowerShell is not installed in your system.
|
||||
)
|
||||
echo Install PowerShell 2.0 using the following URL.
|
||||
echo:
|
||||
echo https://www.catalog.update.microsoft.com/Search.aspx?q=KB968930
|
||||
if %_unattended%==0 start https://www.catalog.update.microsoft.com/Search.aspx?q=KB968930
|
||||
goto done2
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Fix special characters limitation in path name
|
||||
:: Fix special character limitations in path name
|
||||
|
||||
set "_work=%~dp0"
|
||||
if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%"
|
||||
@@ -162,6 +179,8 @@ set "_batf=%~f0"
|
||||
set "_batp=%_batf:'=''%"
|
||||
|
||||
set _PSarg="""%~f0""" -el %_args%
|
||||
set _PSarg=%_PSarg:'=''%
|
||||
|
||||
set "_ttemp=%userprofile%\AppData\Local\Temp"
|
||||
|
||||
setlocal EnableDelayedExpansion
|
||||
@@ -171,8 +190,8 @@ setlocal EnableDelayedExpansion
|
||||
echo "!_batf!" | find /i "!_ttemp!" %nul1% && (
|
||||
if /i not "!_work!"=="!_ttemp!" (
|
||||
%eline%
|
||||
echo Script is launched from the temp folder,
|
||||
echo Most likely you are running the script directly from the archive file.
|
||||
echo The script was launched from the temp folder.
|
||||
echo You are most likely running the script directly from the archive file.
|
||||
echo:
|
||||
echo Extract the archive file and launch the script from the extracted folder.
|
||||
goto done2
|
||||
@@ -184,53 +203,168 @@ goto done2
|
||||
:: Elevate script as admin and pass arguments and preventing loop
|
||||
|
||||
%nul1% fltmc || (
|
||||
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg:'=''!\"' -verb runas" && exit /b
|
||||
if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b
|
||||
%eline%
|
||||
echo This script needs admin rights.
|
||||
echo To do so, right click on this script and select 'Run as administrator'.
|
||||
echo Right click on this script and select 'Run as administrator'.
|
||||
goto done2
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: This code disables QuickEdit for this cmd.exe session only without making permanent changes to the registry
|
||||
:: It is added because clicking on the script window pauses the operation and leads to the confusion that script stopped due to an error
|
||||
:: Check PowerShell
|
||||
|
||||
for %%# in (%_args%) do (if /i "%%#"=="-qedit" set quedit=1)
|
||||
::pstst $ExecutionContext.SessionState.LanguageMode :pstst
|
||||
|
||||
reg query HKCU\Console /v QuickEdit %nul2% | find /i "0x0" %nul1% || if not defined quedit (
|
||||
reg add HKCU\Console /v QuickEdit /t REG_DWORD /d "0" /f %nul1%
|
||||
for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[System.IO.File]::ReadAllText('!_batp!') -split ':pstst';. ([scriptblock]::Create($f[1]))}" %nul6%') do (set tstresult=%%a)
|
||||
|
||||
if /i not "%tstresult%"=="FullLanguage" (
|
||||
%eline%
|
||||
for /f "delims=" %%a in ('%psc% "$ExecutionContext.SessionState.LanguageMode" %nul6%') do (set tstresult2=%%a)
|
||||
echo Test 1 - %tstresult%
|
||||
echo Test 2 - !tstresult2!
|
||||
echo:
|
||||
|
||||
REM check LanguageMode
|
||||
|
||||
echo: !tstresult2! | findstr /i "ConstrainedLanguage RestrictedLanguage NoLanguage" %nul1% && (
|
||||
echo FullLanguage mode not found in PowerShell. Aborting...
|
||||
echo If you have applied restrictions on Powershell then undo those changes.
|
||||
set fixes=%fixes% %mas%fix_powershell
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%fix_powershell"
|
||||
goto done2
|
||||
)
|
||||
|
||||
REM check Powershell core version
|
||||
|
||||
cmd /c "%psc% "$PSVersionTable.PSEdition"" | find /i "Core" %nul1% && (
|
||||
echo Windows Powershell is needed for MAS but it seems to be replaced with Powershell core. Aborting...
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto done2
|
||||
)
|
||||
|
||||
REM check for Mal-ware that may cause issues with Powershell
|
||||
|
||||
for /r "%ProgramFiles%\" %%f in (secureboot.exe) do if exist "%%f" (
|
||||
echo "%%f"
|
||||
echo Mal%blank%ware found, PowerShell is not working properly.
|
||||
set fixes=%fixes% %mas%remove_mal%w%ware
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%remove_mal%w%ware"
|
||||
goto done2
|
||||
)
|
||||
|
||||
REM check if .NET is working properly
|
||||
|
||||
if /i "!tstresult2!"=="FullLanguage" (
|
||||
cmd /c "%psc% ""try {[System.AppDomain]::CurrentDomain.GetAssemblies(); [System.Math]::Sqrt(144)} catch {Exit 3}""" %nul%
|
||||
if !errorlevel!==3 (
|
||||
echo Windows Powershell failed to load .NET command. Aborting...
|
||||
set fixes=%fixes% %mas%in-place_repair_upgrade
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%in-place_repair_upgrade"
|
||||
goto done2
|
||||
)
|
||||
)
|
||||
|
||||
REM check antivirus and other errors
|
||||
|
||||
echo PowerShell is not working properly. Aborting...
|
||||
|
||||
if /i "!tstresult2!"=="FullLanguage" (
|
||||
echo:
|
||||
echo Your antivirus software might be blocking the script.
|
||||
echo:
|
||||
sc query sense | find /i "RUNNING" %nul% && (
|
||||
echo Installed Antivirus - Microsoft Defender for Endpoint
|
||||
)
|
||||
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 ', '))}"""
|
||||
)
|
||||
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
call :dk_color2 %Blue% "Check this webpage for help - " %_Yellow% " %mas%troubleshoot"
|
||||
goto done2
|
||||
)
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Disable QuickEdit and launch from conhost.exe to avoid Terminal app
|
||||
|
||||
if %winbuild% GEQ 17763 (
|
||||
set terminal=1
|
||||
) else (
|
||||
set terminal=
|
||||
)
|
||||
|
||||
:: Check if script is running in Terminal app
|
||||
|
||||
if defined terminal (
|
||||
set lines=0
|
||||
for /f "skip=3 tokens=* delims=" %%A in ('mode con') do if "!lines!"=="0" (
|
||||
for %%B in (%%A) do set lines=%%B
|
||||
)
|
||||
if !lines! GEQ 100 set terminal=
|
||||
)
|
||||
|
||||
if %_unattended%==1 goto :skipQE
|
||||
for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE)
|
||||
|
||||
:: Relaunch to disable QuickEdit in the current session and use conhost.exe instead of the Terminal app
|
||||
:: This code disables QuickEdit for the current cmd.exe session without making permanent registry changes
|
||||
:: It is included because clicking on the script window can pause execution, causing confusion that the script has stopped due to an error
|
||||
|
||||
set resetQE=1
|
||||
reg query HKCU\Console /v QuickEdit %nul2% | find /i "0x0" %nul1% && set resetQE=0
|
||||
reg add HKCU\Console /v QuickEdit /t REG_DWORD /d 0 /f %nul1%
|
||||
|
||||
if defined terminal (
|
||||
start conhost.exe "!_batf!" %_args% -qedit
|
||||
start reg add HKCU\Console /v QuickEdit /t REG_DWORD /d %resetQE% /f %nul1%
|
||||
exit /b
|
||||
) else if %resetQE% EQU 1 (
|
||||
start cmd.exe /c ""!_batf!" %_args% -qedit"
|
||||
rem quickedit reset code is added at the starting of the script instead of here because it takes time to reflect in some cases
|
||||
start reg add HKCU\Console /v QuickEdit /t REG_DWORD /d %resetQE% /f %nul1%
|
||||
exit /b
|
||||
)
|
||||
|
||||
:skipQE
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Check for updates
|
||||
|
||||
set -=
|
||||
set old=
|
||||
set pingp=
|
||||
set upver=%masver:.=%
|
||||
|
||||
for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck.mass%-%grave.dev') do (
|
||||
if not [%%#]==[] (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1))
|
||||
for %%A in (
|
||||
activ%-%ated.win
|
||||
mass%-%grave.dev
|
||||
) do if not defined pingp (
|
||||
for /f "delims=[] tokens=2" %%B in ('ping -n 1 %%A') do (
|
||||
if not "%%B"=="" (set old=1& set pingp=1)
|
||||
for /f "delims=[] tokens=2" %%C in ('ping -n 1 updatecheck%upver%.%%A') do (
|
||||
if not "%%C"=="" set old=
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
if defined old (
|
||||
echo ________________________________________________
|
||||
%eline%
|
||||
echo You are running outdated version MAS %masver%
|
||||
echo Your version of MAS [%masver%] is outdated.
|
||||
echo ________________________________________________
|
||||
echo:
|
||||
if not %_unattended%==1 (
|
||||
echo [1] Get Latest MAS
|
||||
echo [0] Continue Anyway
|
||||
echo:
|
||||
call :ex_color %_Green% "Enter a menu option in the Keyboard [1,0] :"
|
||||
call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==2 rem
|
||||
if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b)
|
||||
if !errorlevel!==1 (start %selfgit% & start %github% & start %mas% & exit /b)
|
||||
)
|
||||
)
|
||||
cls
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
@@ -247,7 +381,7 @@ set "_dir=%desktop%\$OEM$\$$\Setup\Scripts"
|
||||
|
||||
if exist "!desktop!\" (
|
||||
%eline%
|
||||
echo Desktop location was not detected, aborting...
|
||||
echo Unable to detect Desktop location, aborting...
|
||||
goto done2
|
||||
)
|
||||
|
||||
@@ -255,28 +389,28 @@ setlocal EnableDelayedExpansion
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
mode con cols=78 lines=30
|
||||
if not defined terminal mode 78, 30
|
||||
|
||||
if exist "!desktop!\$OEM$\" (
|
||||
echo _____________________________________________________
|
||||
%eline%
|
||||
echo $OEM$ folder already exists on the Desktop.
|
||||
echo The $OEM$ folder already exists on your Desktop.
|
||||
echo _____________________________________________________
|
||||
goto done2
|
||||
)
|
||||
|
||||
set HWID_Activation.cmd=Activators\HWID_Activation.cmd
|
||||
set KMS38_Activation.cmd=Activators\KMS38_Activation.cmd
|
||||
set Online_KMS_Activation.cmd=Activators\Online_KMS_Activation.cmd
|
||||
set Ohook_Activation_AIO.cmd=Activators\Ohook_Activation_AIO.cmd
|
||||
set TSforge_Activation.cmd=Activators\TSforge_Activation.cmd
|
||||
pushd "!_work!"
|
||||
|
||||
set _nofile=
|
||||
for %%# in (
|
||||
%HWID_Activation.cmd%
|
||||
%KMS38_Activation.cmd%
|
||||
%Online_KMS_Activation.cmd%
|
||||
%Ohook_Activation_AIO.cmd%
|
||||
%TSforge_Activation.cmd%
|
||||
) do (
|
||||
if not exist "%%#" set _nofile=1
|
||||
)
|
||||
@@ -296,42 +430,38 @@ goto done2
|
||||
:Menu
|
||||
|
||||
cls
|
||||
mode con cols=78 lines=30
|
||||
if not defined terminal mode 78, 30
|
||||
echo:
|
||||
echo:
|
||||
echo:
|
||||
echo:
|
||||
echo: Extract $OEM$ folder on the desktop
|
||||
echo: ________________________________________________________
|
||||
echo: ____________________________________________________________
|
||||
echo:
|
||||
echo: [1] HWID
|
||||
echo: [2] Ohook
|
||||
echo: [3] KMS38
|
||||
echo: [4] Online KMS
|
||||
echo: [1] HWID [Windows]
|
||||
echo: [2] Ohook [Office]
|
||||
echo: [3] TSforge [Windows / ESU / Office]
|
||||
echo: [4] Online KMS [Windows / Office]
|
||||
echo:
|
||||
echo: [5] HWID ^(Windows^) ^+ Ohook ^(Office^)
|
||||
echo: [6] HWID ^(Windows^) ^+ Online KMS ^(Office^)
|
||||
echo: [7] KMS38 ^(Windows^) ^+ Ohook ^(Office^)
|
||||
echo: [8] KMS38 ^(Windows^) ^+ Online KMS ^(Office^)
|
||||
echo: [9] Online KMS ^(Windows^) ^+ Ohook ^(Office^)
|
||||
echo: [5] HWID [Windows] ^+ Ohook [Office]
|
||||
echo: [6] HWID [Windows] ^+ Ohook [Office] ^+ TSforge [ESU]
|
||||
echo: [7] TSforge [Windows / ESU] ^+ Ohook [Office]
|
||||
echo:
|
||||
call :ex_color2 %_White% " [R] " %_Green% "ReadMe"
|
||||
echo: [0] Exit
|
||||
echo: ________________________________________________________
|
||||
call :dk_color2 %_White% " [R] " %_Green% "ReadMe"
|
||||
echo: [0] Exit
|
||||
echo: ____________________________________________________________
|
||||
echo:
|
||||
call :ex_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard :"
|
||||
choice /C:123456789R0 /N
|
||||
call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard :"
|
||||
choice /C:1234567R0 /N
|
||||
set _erl=%errorlevel%
|
||||
|
||||
if %_erl%==11 exit /b
|
||||
if %_erl%==10 start %mas%oem-folder.html &goto :Menu
|
||||
if %_erl%==9 goto:kms_ohook
|
||||
if %_erl%==8 goto:kms38_kms
|
||||
if %_erl%==7 goto:kms38_ohook
|
||||
if %_erl%==6 goto:hwid_kms
|
||||
if %_erl%==9 exit /b
|
||||
if %_erl%==8 start %mas%oem-folder &goto :Menu
|
||||
if %_erl%==7 goto:tsforge_ohook
|
||||
if %_erl%==6 goto:hwid_ohook_tsforge
|
||||
if %_erl%==5 goto:hwid_ohook
|
||||
if %_erl%==4 goto:kms
|
||||
if %_erl%==3 goto:kms38
|
||||
if %_erl%==3 goto:tsforge
|
||||
if %_erl%==2 goto:ohook
|
||||
if %_erl%==1 goto:hwid
|
||||
goto :Menu
|
||||
@@ -398,33 +528,33 @@ cd \
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:kms38
|
||||
:tsforge
|
||||
|
||||
cls
|
||||
md "!desktop!\$OEM$\$$\Setup\Scripts"
|
||||
pushd "!_work!"
|
||||
copy /y /b "%KMS38_Activation.cmd%" "!_dir!\KMS38_Activation.cmd" %nul%
|
||||
copy /y /b "%TSforge_Activation.cmd%" "!_dir!\TSforge_Activation.cmd" %nul%
|
||||
popd
|
||||
call :export kms38_setup
|
||||
call :export tsforge_setup
|
||||
|
||||
set _error=
|
||||
if not exist "!_dir!\KMS38_Activation.cmd" set _error=1
|
||||
if not exist "!_dir!\TSforge_Activation.cmd" set _error=1
|
||||
if not exist "!_dir!\SetupComplete.cmd" set _error=1
|
||||
if defined _error goto errorfound
|
||||
|
||||
set oem=KMS38
|
||||
set oem=TSforge
|
||||
goto done
|
||||
|
||||
:kms38_setup:
|
||||
:tsforge_setup:
|
||||
@echo off
|
||||
|
||||
fltmc >nul || exit /b
|
||||
|
||||
call "%~dp0KMS38_Activation.cmd" /KMS38
|
||||
call "%~dp0TSforge_Activation.cmd" /Z-WindowsESUOffice
|
||||
|
||||
cd \
|
||||
(goto) 2>nul & (if "%~dp0"=="%SystemRoot%\Setup\Scripts\" rd /s /q "%~dp0")
|
||||
:kms38_setup:
|
||||
:tsforge_setup:
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
@@ -450,7 +580,7 @@ goto done
|
||||
|
||||
fltmc >nul || exit /b
|
||||
|
||||
call "%~dp0Online_KMS_Activation.cmd" /KMS-ActAndRenewalTask /KMS-WindowsOffice
|
||||
call "%~dp0Online_KMS_Activation.cmd" /K-WindowsOffice
|
||||
|
||||
cd \
|
||||
(goto) 2>nul & (if "%~dp0"=="%SystemRoot%\Setup\Scripts\" rd /s /q "%~dp0")
|
||||
@@ -496,26 +626,28 @@ cd \
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:hwid_kms
|
||||
:hwid_ohook_tsforge
|
||||
|
||||
cls
|
||||
md "!desktop!\$OEM$\$$\Setup\Scripts"
|
||||
pushd "!_work!"
|
||||
copy /y /b "%HWID_Activation.cmd%" "!_dir!\HWID_Activation.cmd" %nul%
|
||||
copy /y /b "%Online_KMS_Activation.cmd%" "!_dir!\Online_KMS_Activation.cmd" %nul%
|
||||
copy /y /b "%Ohook_Activation_AIO.cmd%" "!_dir!\Ohook_Activation_AIO.cmd" %nul%
|
||||
copy /y /b "%TSforge_Activation.cmd%" "!_dir!\TSforge_Activation.cmd" %nul%
|
||||
popd
|
||||
call :export hwid_kms_setup
|
||||
call :export hwid_ohook_tsforge_setup
|
||||
|
||||
set _error=
|
||||
if not exist "!_dir!\HWID_Activation.cmd" set _error=1
|
||||
if not exist "!_dir!\Online_KMS_Activation.cmd" set _error=1
|
||||
if not exist "!_dir!\Ohook_Activation_AIO.cmd" set _error=1
|
||||
if not exist "!_dir!\TSforge_Activation.cmd" set _error=1
|
||||
if not exist "!_dir!\SetupComplete.cmd" set _error=1
|
||||
if defined _error goto errorfound
|
||||
|
||||
set oem=HWID [Windows] + Online KMS [Office]
|
||||
set oem=HWID [Windows] + Ohook [Office] + TSforge [ESU]
|
||||
goto done
|
||||
|
||||
:hwid_kms_setup:
|
||||
:hwid_ohook_tsforge_setup:
|
||||
@echo off
|
||||
|
||||
fltmc >nul || exit /b
|
||||
@@ -525,41 +657,45 @@ call "%~dp0HWID_Activation.cmd" /HWID
|
||||
endlocal
|
||||
|
||||
setlocal
|
||||
call "%~dp0Online_KMS_Activation.cmd" /KMS-ActAndRenewalTask /KMS-Office
|
||||
call "%~dp0Ohook_Activation_AIO.cmd" /Ohook
|
||||
endlocal
|
||||
|
||||
setlocal
|
||||
call "%~dp0TSforge_Activation.cmd" /Z-ESU
|
||||
endlocal
|
||||
|
||||
cd \
|
||||
(goto) 2>nul & (if "%~dp0"=="%SystemRoot%\Setup\Scripts\" rd /s /q "%~dp0")
|
||||
:hwid_kms_setup:
|
||||
:hwid_ohook_tsforge_setup:
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:kms38_ohook
|
||||
:tsforge_ohook
|
||||
|
||||
cls
|
||||
md "!desktop!\$OEM$\$$\Setup\Scripts"
|
||||
pushd "!_work!"
|
||||
copy /y /b "%KMS38_Activation.cmd%" "!_dir!\KMS38_Activation.cmd" %nul%
|
||||
copy /y /b "%TSforge_Activation.cmd%" "!_dir!\TSforge_Activation.cmd" %nul%
|
||||
copy /y /b "%Ohook_Activation_AIO.cmd%" "!_dir!\Ohook_Activation_AIO.cmd" %nul%
|
||||
popd
|
||||
call :export kms38_ohook_setup
|
||||
call :export tsforge_ohook_setup
|
||||
|
||||
set _error=
|
||||
if not exist "!_dir!\KMS38_Activation.cmd" set _error=1
|
||||
if not exist "!_dir!\TSforge_Activation.cmd" set _error=1
|
||||
if not exist "!_dir!\Ohook_Activation_AIO.cmd" set _error=1
|
||||
if not exist "!_dir!\SetupComplete.cmd" set _error=1
|
||||
if defined _error goto errorfound
|
||||
|
||||
set oem=KMS38 [Windows] + Ohook [Office]
|
||||
set oem=TSforge [Windows / ESU] + Ohook [Office]
|
||||
goto done
|
||||
|
||||
:kms38_ohook_setup:
|
||||
:tsforge_ohook_setup:
|
||||
@echo off
|
||||
|
||||
fltmc >nul || exit /b
|
||||
|
||||
setlocal
|
||||
call "%~dp0KMS38_Activation.cmd" /KMS38
|
||||
call "%~dp0TSforge_Activation.cmd" /Z-Windows /Z-ESU
|
||||
endlocal
|
||||
|
||||
setlocal
|
||||
@@ -568,110 +704,98 @@ endlocal
|
||||
|
||||
cd \
|
||||
(goto) 2>nul & (if "%~dp0"=="%SystemRoot%\Setup\Scripts\" rd /s /q "%~dp0")
|
||||
:kms38_ohook_setup:
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:kms38_kms
|
||||
|
||||
cls
|
||||
md "!desktop!\$OEM$\$$\Setup\Scripts"
|
||||
pushd "!_work!"
|
||||
copy /y /b "%KMS38_Activation.cmd%" "!_dir!\KMS38_Activation.cmd" %nul%
|
||||
copy /y /b "%Online_KMS_Activation.cmd%" "!_dir!\Online_KMS_Activation.cmd" %nul%
|
||||
popd
|
||||
call :export kms38_kms_setup
|
||||
|
||||
set _error=
|
||||
if not exist "!_dir!\KMS38_Activation.cmd" set _error=1
|
||||
if not exist "!_dir!\Online_KMS_Activation.cmd" set _error=1
|
||||
if not exist "!_dir!\SetupComplete.cmd" set _error=1
|
||||
if defined _error goto errorfound
|
||||
|
||||
set oem=KMS38 [Windows] + Online KMS [Office]
|
||||
goto done
|
||||
|
||||
:kms38_kms_setup:
|
||||
@echo off
|
||||
|
||||
fltmc >nul || exit /b
|
||||
|
||||
setlocal
|
||||
call "%~dp0KMS38_Activation.cmd" /KMS38
|
||||
endlocal
|
||||
|
||||
setlocal
|
||||
call "%~dp0Online_KMS_Activation.cmd" /KMS-ActAndRenewalTask /KMS-Office
|
||||
endlocal
|
||||
|
||||
cd \
|
||||
(goto) 2>nul & (if "%~dp0"=="%SystemRoot%\Setup\Scripts\" rd /s /q "%~dp0")
|
||||
:kms38_kms_setup:
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:kms_ohook
|
||||
|
||||
cls
|
||||
md "!desktop!\$OEM$\$$\Setup\Scripts"
|
||||
pushd "!_work!"
|
||||
copy /y /b "%Online_KMS_Activation.cmd%" "!_dir!\Online_KMS_Activation.cmd" %nul%
|
||||
copy /y /b "%Ohook_Activation_AIO.cmd%" "!_dir!\Ohook_Activation_AIO.cmd" %nul%
|
||||
popd
|
||||
call :export kms_ohook_setup
|
||||
|
||||
set _error=
|
||||
if not exist "!_dir!\Online_KMS_Activation.cmd" set _error=1
|
||||
if not exist "!_dir!\Ohook_Activation_AIO.cmd" set _error=1
|
||||
if not exist "!_dir!\SetupComplete.cmd" set _error=1
|
||||
if defined _error goto errorfound
|
||||
|
||||
set oem=Online KMS [Windows] + Ohook [Office]
|
||||
goto done
|
||||
|
||||
:kms_ohook_setup:
|
||||
@echo off
|
||||
|
||||
fltmc >nul || exit /b
|
||||
|
||||
setlocal
|
||||
call "%~dp0Online_KMS_Activation.cmd" /KMS-ActAndRenewalTask /KMS-Windows
|
||||
endlocal
|
||||
|
||||
setlocal
|
||||
call "%~dp0Ohook_Activation_AIO.cmd" /Ohook
|
||||
endlocal
|
||||
|
||||
cd \
|
||||
(goto) 2>nul & (if "%~dp0"=="%SystemRoot%\Setup\Scripts\" rd /s /q "%~dp0")
|
||||
:kms_ohook_setup:
|
||||
:tsforge_ohook_setup:
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:errorfound
|
||||
|
||||
%eline%
|
||||
echo $OEM$ Folder was not created successfully...
|
||||
echo The script failed to create the $OEM$ folder.
|
||||
goto :done2
|
||||
|
||||
:done
|
||||
|
||||
echo ______________________________________________________________
|
||||
echo:
|
||||
call :ex_color %Blue% "%oem%"
|
||||
call :ex_color %Green% "$OEM$ folder is successfully created on the Desktop."
|
||||
echo "%oem%" | find /i "38" %nul% && (
|
||||
echo:
|
||||
echo To KMS38 activate Server Cor/Acor editions ^(No GUI Versions^),
|
||||
echo Check this page %mas%oem-folder
|
||||
)
|
||||
call :dk_color %Blue% "%oem%"
|
||||
call :dk_color %Green% "$OEM$ folder was successfully created on your Desktop."
|
||||
echo ______________________________________________________________
|
||||
|
||||
:done2
|
||||
|
||||
echo:
|
||||
call :ex_color %_Yellow% "Press any key to exit..."
|
||||
if defined fixes (
|
||||
call :dk_color %White% "Follow ALL the ABOVE blue lines. "
|
||||
call :dk_color2 %Blue% "Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore"
|
||||
choice /C:10 /N
|
||||
if !errorlevel!==2 exit /b
|
||||
if !errorlevel!==1 (start %selfgit% & start %github% & for %%# in (%fixes%) do (start %%#))
|
||||
)
|
||||
|
||||
if defined terminal (
|
||||
call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..."
|
||||
choice /c 0 /n
|
||||
) else (
|
||||
call :dk_color %_Yellow% "Press any key to %_exitmsg%..."
|
||||
pause %nul1%
|
||||
)
|
||||
exit /b
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Set variables
|
||||
|
||||
:dk_setvar
|
||||
|
||||
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
||||
set psc=%ps% -nop -c
|
||||
set winbuild=1
|
||||
for /f "tokens=2 delims=[]" %%G in ('ver') do for /f "tokens=2,3,4 delims=. " %%H in ("%%~G") do set "winbuild=%%J"
|
||||
|
||||
set _slexe=sppsvc.exe& set _slser=sppsvc
|
||||
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||
if %winbuild% LSS 7600 if exist "%SysPath%\SLsvc.exe" (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||
if %_slexe%==SLsvc.exe set _vis=1
|
||||
|
||||
set _NCS=1
|
||||
if %winbuild% LSS 10586 set _NCS=0
|
||||
if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0)
|
||||
|
||||
echo "%PROCESSOR_ARCHITECTURE% %PROCESSOR_ARCHITEW6432%" | find /i "ARM64" %nul1% && (if %winbuild% LSS 21277 set ps32onArm=1)
|
||||
|
||||
if %_NCS% EQU 1 (
|
||||
for /F %%a in ('echo prompt $E ^| cmd') do set "esc=%%a"
|
||||
set "Red="41;97m""
|
||||
set "Gray="100;97m""
|
||||
set "Green="42;97m""
|
||||
set "Blue="44;97m""
|
||||
set "White="107;91m""
|
||||
set "_Red="40;91m""
|
||||
set "_White="40;37m""
|
||||
set "_Green="40;92m""
|
||||
set "_Yellow="40;93m""
|
||||
) else (
|
||||
set "Red="Red" "white""
|
||||
set "Gray="Darkgray" "white""
|
||||
set "Green="DarkGreen" "white""
|
||||
set "Blue="Blue" "white""
|
||||
set "White="White" "Red""
|
||||
set "_Red="Black" "Red""
|
||||
set "_White="Black" "Gray""
|
||||
set "_Green="Black" "Green""
|
||||
set "_Yellow="Black" "Yellow""
|
||||
)
|
||||
|
||||
set "nceline=echo: &echo ==== ERROR ==== &echo:"
|
||||
set "eline=echo: &call :dk_color %Red% "==== ERROR ====" &echo:"
|
||||
if %~z0 GEQ 200000 (
|
||||
set "_exitmsg=Go back"
|
||||
set "_fixmsg=Go back to Main Menu, select Troubleshoot and run Fix Licensing option."
|
||||
) else (
|
||||
set "_exitmsg=Exit"
|
||||
set "_fixmsg=In MAS folder, run Troubleshoot script and select Fix Licensing option."
|
||||
)
|
||||
exit /b
|
||||
|
||||
::========================================================================================================================================
|
||||
@@ -680,26 +804,30 @@ exit /b
|
||||
|
||||
:export
|
||||
|
||||
%psc% "$f=[io.file]::ReadAllText('!_batp!') -split \":%~1\:.*`r`n\"; [io.file]::WriteAllText('!_pdesk!\$OEM$\$$\Setup\Scripts\SetupComplete.cmd',$f[1].Trim(),[System.Text.Encoding]::ASCII);"
|
||||
%psc% "$f=[System.IO.File]::ReadAllText('!_batp!') -split \":%~1\:.*`r`n\"; [io.file]::WriteAllText('!_pdesk!\$OEM$\$$\Setup\Scripts\SetupComplete.cmd',$f[1].Trim(),[System.Text.Encoding]::ASCII);"
|
||||
exit /b
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:ex_color
|
||||
:dk_color
|
||||
|
||||
if %_NCS% EQU 1 (
|
||||
echo %esc%[%~1%~2%esc%[0m
|
||||
) else (
|
||||
if not exist %psc% (echo %~3) else (%psc% write-host -back '%1' -fore '%2' '%3')
|
||||
) else if exist %ps% (
|
||||
%psc% write-host -back '%1' -fore '%2' '%3'
|
||||
) else if not exist %ps% (
|
||||
echo %~3
|
||||
)
|
||||
exit /b
|
||||
|
||||
:ex_color2
|
||||
:dk_color2
|
||||
|
||||
if %_NCS% EQU 1 (
|
||||
echo %esc%[%~1%~2%esc%[%~3%~4%esc%[0m
|
||||
) else (
|
||||
if not exist %psc% (echo %~3%~6) else (%psc% write-host -back '%1' -fore '%2' '%3' -NoNewline; write-host -back '%4' -fore '%5' '%6')
|
||||
) else if exist %ps% (
|
||||
%psc% write-host -back '%1' -fore '%2' '%3' -NoNewline; write-host -back '%4' -fore '%5' '%6'
|
||||
) else if not exist %ps% (
|
||||
echo %~3 %~6
|
||||
)
|
||||
exit /b
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
146
README.md
146
README.md
@@ -1,62 +1,84 @@
|
||||
<p align="center"><img src="https://massgrave.dev/img/logo_small.png" alt="MAS Logo"></p>
|
||||
|
||||
<h1 align="center">Microsoft Activation Scripts (MAS)</h1>
|
||||
|
||||
<p align="center">A Windows and Office activator using HWID / Ohook / KMS38 / Online KMS activation methods, with a focus on open-source code and fewer antivirus detections.</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://discord.gg/tVFN4N84PP"><img src="https://img.shields.io/badge/Chat%20with%20us%20on%20Discord--blue?style=social&logo=discord" alt="Chat with us without signup" title="Chat with us without signup"></a>
|
||||
<a href="https://www.reddit.com/r/MAS_Activator"><img src="https://img.shields.io/badge/MAS%20on%20Reddit--orange?style=social&logo=reddit" alt="MAS on Reddit" title="MAS on Reddit"></a>
|
||||
<a href="https://twitter.com/massgravel"><img src="https://img.shields.io/twitter/follow/massgravel" alt="Follow us on X" title="Follow us on X"></a>
|
||||
</p>
|
||||
|
||||
<hr>
|
||||
|
||||
## Download / How to use it?
|
||||
|
||||
### Method 1 - PowerShell (Recommended)
|
||||
|
||||
- Right-click on the Windows start menu and select PowerShell or Terminal (Not CMD).
|
||||
- Copy and paste the code below and press enter
|
||||
```
|
||||
irm https://get.activated.win | iex
|
||||
```
|
||||
or (deprecated, will be retired on Aug 31 2024, use above instead)
|
||||
```
|
||||
irm https://massgrave.dev/get | iex
|
||||
```
|
||||
- You will see the activation options. Follow the on-screen instructions.
|
||||
- That's all.
|
||||
|
||||
---
|
||||
|
||||
- On older Windows builds you may need to run the below command before,
|
||||
`[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12`
|
||||
- The Powershell method does not work on Windows 7. Use the Method 2 - Traditional instead.
|
||||
- The URL get.activated.win may be blocked by some DNS services because it is a new domain.
|
||||
|
||||
### Method 2 - Traditional
|
||||
|
||||
- Download the file under the code button from [GitHub](https://github.com/massgravel/Microsoft-Activation-Scripts) or [Bitbucket](https://bitbucket.org/WindowsAddict/microsoft-activation-scripts)
|
||||
- Right-click on the downloaded zip file and extract
|
||||
- In the extracted folder, find the folder named `All-In-One-Version`
|
||||
- Run the file named `MAS_AIO-CRC32_XXXXXXXX.cmd`
|
||||
- You will see the activation options, follow the on-screen instructions.
|
||||
- That's all.
|
||||
|
||||
To run the scripts in unattended mode, check [here](https://massgrave.dev/command_line_switches)
|
||||
|
||||
</br>
|
||||
|
||||
```
|
||||
Latest Version: 2.6
|
||||
Release date: 20-Apr-2024
|
||||
```
|
||||
|
||||
### [Troubleshooting / Help](https://massgrave.dev/troubleshoot)
|
||||
### [Download Original Windows & Office](https://massgrave.dev/genuine-installation-media)
|
||||
### Homepage - [https://massgrave.dev/](https://massgrave.dev/)
|
||||
|
||||
---
|
||||
|
||||
<p align="center">Made with Love ❤️</p>
|
||||
<p align="center"><img src="https://massgrave.dev/img/logo_small.png" alt="MAS Logo"></p>
|
||||
|
||||
<h1 align="center">Microsoft Activation Scripts (MAS)</h1>
|
||||
|
||||
<p align="center">Open-source Windows and Office activator featuring HWID, Ohook, TSforge, and Online KMS activation methods, along with advanced troubleshooting.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
## How to Activate Windows / Office / Extended Security Updates (ESU)?
|
||||
|
||||
### Method 1 - PowerShell ❤️
|
||||
|
||||
1. Click the **Start Menu**, type `PowerShell`, and open it.
|
||||
|
||||
2. Copy and paste the code below and press **Enter.**
|
||||
- For **Windows 8.1, 10 and 11**:
|
||||
```
|
||||
irm https://get.activated.win | iex
|
||||
```
|
||||
If the above is blocked (by ISP/DNS), try this (needs updated Windows 10 or 11):
|
||||
```
|
||||
iex (curl.exe -s --doh-url https://1.1.1.1/dns-query https://get.activated.win | Out-String)
|
||||
```
|
||||
- **Script not launching? Use the below-listed Method 2.**
|
||||
|
||||
3. In the menu that appears, type the number corresponding to one of the **Green** options.
|
||||
|
||||
---
|
||||
|
||||
### Method 2 - Traditional (Windows Vista and later)
|
||||
|
||||
1. Download the script:
|
||||
* [**MAS_AIO.cmd**](https://dev.azure.com/massgrave/Microsoft-Activation-Scripts/_apis/git/repositories/Microsoft-Activation-Scripts/items?path=/MAS/All-In-One-Version-KL/MAS_AIO.cmd&download=true) (Direct script)
|
||||
* [**MAS_AIO.zip**](https://dev.azure.com/massgrave/Microsoft-Activation-Scripts/_apis/git/repositories/Microsoft-Activation-Scripts/items?$format=zip) (If the direct script is blocked by your browser)
|
||||
2. Run the `MAS_AIO.cmd` file.
|
||||
3. In the menu that appears, type the number corresponding to one of the **Green** options.
|
||||
|
||||
---
|
||||
|
||||
> [!TIP]
|
||||
> - Some ISPs/DNS providers block access to our domains. You can bypass this by enabling [DNS-over-HTTPS (DoH)](https://developers.cloudflare.com/1.1.1.1/encryption/dns-over-https/encrypted-dns-browsers/) in your browser.
|
||||
> - **Having trouble**? Visit our [troubleshooting page](https://massgrave.dev/troubleshoot) or raise an issue on [GitHub](https://github.com/massgravel/Microsoft-Activation-Scripts/issues).
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> - The `irm` command in PowerShell downloads a script from a specified URL, and the `iex` command executes it.
|
||||
> - Always double-check the URL before executing the command and verify the source is trustworthy when manually downloading files.
|
||||
> - Be cautious of third parties spreading malware disguised as MAS by altering the URL in the PowerShell command.
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
|
||||
### Homepage - [https://massgrave.dev/](https://massgrave.dev/)
|
||||
|
||||
[![1.1]][1]
|
||||
[![1.2]][2]
|
||||
[![1.3]][3]
|
||||
[![1.4]][4]
|
||||
[![1.5]][5]
|
||||
[![1.6]][6]
|
||||
[![1.7]][7]
|
||||
|
||||
[1.1]: https://massgrave.dev/img/logo_discord.png (Chat with us without signup)
|
||||
[1.2]: https://massgrave.dev/img/logo_reddit.png (Reddit)
|
||||
[1.3]: https://massgrave.dev/img/logo_bluesky.png (Bluesky)
|
||||
[1.4]: https://massgrave.dev/img/logo_x.png (Twitter)
|
||||
|
||||
[1.5]: https://massgrave.dev/img/logo_github.png (GitHub)
|
||||
[1.6]: https://massgrave.dev/img/logo_azuredevops.png (AzureDevOps)
|
||||
[1.7]: https://massgrave.dev/img/logo_gitea.png (Self-hosted Git)
|
||||
|
||||
[1]: https://discord.gg/j2yFsV5ZVC
|
||||
[2]: https://www.reddit.com/r/MAS_Activator
|
||||
[3]: https://bsky.app/profile/massgrave.dev
|
||||
[4]: https://twitter.com/massgravel
|
||||
[5]: https://github.com/massgravel/Microsoft-Activation-Scripts
|
||||
[6]: https://dev.azure.com/massgrave/_git/Microsoft-Activation-Scripts
|
||||
[7]: https://git.activated.win/Microsoft-Activation-Scripts
|
||||
|
||||
---
|
||||
|
||||
Latest Version: 3.10
|
||||
Release date: 28-Jan-2026
|
||||
|
||||
Reference in New Issue
Block a user