Microsoft Activation Scripts (MAS) is an open-source Windows activation toolkit distributed as batch scripts that orchestrate multiple activation methods for Windows and Office products. The system provides four primary activation approaches—HWID, Ohook, TSforge, and Online KMS—along with diagnostic utilities and edition management tools.
This page provides a high-level technical overview of the MAS architecture, activation methods, and core components. For detailed installation procedures, see Installation Guide. For information about individual activation methods, see Activation Methods. For troubleshooting and support tools, see Support Tools.
Sources: README.md1-5 MAS/All-In-One-Version-KL/MAS_AIO.cmd1-10
MAS is a collection of batch and PowerShell scripts that manipulate Windows licensing subsystems to activate Windows operating systems, Microsoft Office applications, and Extended Security Updates (ESU). The system operates by interfacing with the Software Protection Platform (sppsvc), Client License Service (ClipSVC), and Office Software Protection Platform (osppsvc) to install product keys, generate activation tickets, and manage licensing states.
The project is distributed under GNU GPLv3 and maintained across three Git platforms (GitHub, Azure DevOps, and self-hosted Gitea) for redundancy. Current version is 3.10 (released 28-Jan-2026).
Sources: README.md65-68 LICENSE1-2 README.md91-106
MAS follows a hub-and-spoke architecture where MAS_AIO.cmd (importance score: 251.77) serves as the central orchestration script. This All-In-One interface provides both interactive menu-driven operation and unattended command-line execution modes.
Sources: MAS/All-In-One-Version-KL/MAS_AIO.cmd420-504 MAS/All-In-One-Version-KL/MAS_AIO.cmd387-397 MAS/All-In-One-Version-KL/MAS_AIO.cmd1167-1217
The MAS_AIO.cmd script performs the following initialization sequence:
Sources: MAS/All-In-One-Version-KL/MAS_AIO.cmd1-400
MAS provides two installation methods that accommodate different security policies and network environments.
The project maintains three redundant Git repositories:
github.com/massgravel/Microsoft-Activation-Scripts)git.activated.win)Sources: MAS/All-In-One-Version-KL/MAS_AIO.cmd68-71 README.md91-103
The web-based method downloads and executes the script directly from get.activated.win:
The script performs a version check by pinging updatecheck[version].[domain] and warns if an outdated version is detected.
Sources: README.md11-28 MAS/All-In-One-Version-KL/MAS_AIO.cmd347-381
Users can download MAS_AIO.cmd directly or as a ZIP archive, then execute locally. The script validates that it's not running from a temporary folder to prevent execution directly from archive files:
Sources: README.md37-42 MAS/All-In-One-Version-KL/MAS_AIO.cmd199-208
MAS provides four primary activation methods, each with different characteristics and implementation approaches. The methods are invoked as subroutines within MAS_AIO.cmd (lines 644-2300+) or can be run as standalone scripts.
| Method | Standalone Script | Target Products | Activation Period | Internet Required |
|---|---|---|---|---|
| HWID | HWID_Activation.cmd | Windows 10/11 | Permanent (digital license) | Yes (initial only) |
| Ohook | Ohook_Activation_AIO.cmd | Office 2010–2024 / M365 | Permanent | No |
| TSforge | TSforge_Activation.cmd | Windows / Office / ESU | Permanent | No |
| Online KMS | Online_KMS_Activation.cmd | Windows Vista+ / Office 2010–2024 | 180 days, renewable via scheduled task | Yes (periodic) |
For detailed documentation of each method, see page 2.
Sources: MAS/Separate-Files-Version/Activators/_ReadMe.txt1-12 MAS/All-In-One-Version-KL/MAS_AIO.cmd460-476 README.md5 </old_str> <new_str>
| Method | Standalone Script | Target Products | Activation Period | Internet Required |
|---|---|---|---|---|
| HWID | HWID_Activation.cmd | Windows 10/11 | Permanent (digital license) | Yes (initial only) |
| Ohook | Ohook_Activation_AIO.cmd | Office 2010–2024 / M365 | Permanent | No |
| TSforge | TSforge_Activation.cmd | Windows / Office / ESU | Permanent | No |
| Online KMS | Online_KMS_Activation.cmd | Windows Vista+ / Office 2010–2024 | 180 days, renewable via scheduled task | Yes (periodic) |
For detailed documentation of each method, see page 2.
Sources: MAS/Separate-Files-Version/Activators/_ReadMe.txt1-12 MAS/All-In-One-Version-KL/MAS_AIO.cmd460-476 README.md5
Diagram: Method-to-Subsystem Mapping
Sources: MAS/All-In-One-Version-KL/MAS_AIO.cmd730-737 MAS/All-In-One-Version-KL/MAS_AIO.cmd806-815 MAS/All-In-One-Version-KL/MAS_AIO.cmd460-476
The :MainMenu label in MAS_AIO.cmd dynamically highlights available activation methods based on the detected Windows edition and installed products. Variables _hwidgo, _ohookgo, and _tsforgego are set based on build number, server edition presence, evaluation edition flags, and detected Office installations. Methods highlighted in green in the menu are recommended for the current system. See page 1.2 for full details on the interactive menu.
Sources: MAS/All-In-One-Version-KL/MAS_AIO.cmd427-476
MAS batch scripts invoke PowerShell (powershell.exe -nop -c, stored in the %psc% variable) for operations that batch alone cannot perform: .NET reflection to call native Windows DLLs via P/Invoke, WMI queries against SoftwareLicensingService / SoftwareLicensingProduct, and SPP token file manipulation.
Key native DLLs accessed through P/Invoke reflection at runtime include sppc.dll, slc.dll, pkeyhelper.dll, pidgenx.dll, and DismApi.dll. Data is persisted to the SPP token store (%SysPath%\spp\store\), the WPA registry hive, and .xrm-ms license files under %SysPath%\spp\tokens\skus\.
For full details on the internal architecture, shared dk_ subroutines, and Windows component integration, see pages 5.2 and 5.3.
Sources: MAS/All-In-One-Version-KL/MAS_AIO.cmd1169-1170 MAS/All-In-One-Version-KL/MAS_AIO.cmd1480-1518
MAS supports Windows Vista through Windows 11 and corresponding Server editions:
Build number validation:
Sources: MAS/All-In-One-Version-KL/MAS_AIO.cmd156-166 README.md37
MAS requires PowerShell 2.0 or later with FullLanguage mode:
For Windows Vista RTM, PowerShell must be installed separately (it cannot be installed on RTM, requires SP1+).
Sources: MAS/All-In-One-Version-KL/MAS_AIO.cmd226-256 MAS/All-In-One-Version-KL/MAS_AIO.cmd160-164 MAS/All-In-One-Version-KL/MAS_AIO.cmd168-178
The following Windows services must be functional:
sppsvc / SLsvc - Software Protection Platform (detected automatically based on version)ClipSVC - Client License Service (for HWID method)wlidsvc - Microsoft Account Sign-in Assistant (for HWID method)KeyIso - CNG Key IsolationLicenseManager - Windows License Manager ServiceWinmgmt - Windows Management InstrumentationSources: MAS/All-In-One-Version-KL/MAS_AIO.cmd806-815 MAS/All-In-One-Version-KL/MAS_AIO.cmd1174-1177
MAS supports two execution modes:
/HWID, /Ohook, /K-Windows, /Z-Windows)For command-line automation details, see page 4.2.
Sources: MAS/All-In-One-Version-KL/MAS_AIO.cmd111-130 MAS/All-In-One-Version-KL/MAS_AIO.cmd388-397
All activation methods invoke the shared :dk_errorcheck subroutine and :dk_chkmal (malware/conflicting-activator check) before attempting activation. Failures are reported with links to massgrave.dev/troubleshoot. The standalone Troubleshoot.cmd utility provides menu-driven repair actions (DISM RestoreHealth, SFC, Fix WMI, Fix Licensing).
For full error handling documentation, see page 5.4. For the troubleshooting utility, see page 3.2.
Sources: MAS/All-In-One-Version-KL/MAS_AIO.cmd1522-1563 MAS/All-In-One-Version-KL/MAS_AIO.cmd800-815
MAS is distributed under the GNU General Public License version 3 (GPL-3.0), which grants users the freedom to use, modify, and distribute the software while ensuring derivative works remain open source. The complete license text is available in the repository root directory.
The project maintains active development and community support through multiple platforms including GitHub, Discord, and Reddit. Official project resources and documentation are available at https://massgrave.dev/.
Sources: LICENSE1-2 README.md76-112
Refresh this wiki
This wiki was recently refreshed. Please wait 4 days to refresh again.