This section covers the four utility scripts bundled with MAS that operate on activation state, system health, and product edition management. These tools are not activation methods: they do not install product keys or modify the Software Protection Platform (SPP) to activate a product. For documentation of the activation methods themselves, see Activation Methods.
The four tools correspond to menu options [5]–[8] in the MAS main menu and are available both through MAS_AIO.cmd and as standalone scripts in Separate-Files-Version/.
| Menu Option | Tool Name | Standalone Script | Internal Label (AIO) | Details |
|---|---|---|---|---|
[5] | Check Activation Status | Check_Activation_Status.cmd | :check_actstatus | 3.1 |
[6] | Change Windows Edition | Change_Windows_Edition.cmd | :change_winedition | 3.3 |
[7] | Change Office Edition | Change_Office_Edition.cmd | :change_offedition | 3.4 |
[8] | Troubleshoot | Troubleshoot.cmd | :troubleshoot | 3.2 |
Sources: MAS/All-In-One-Version-KL/MAS_AIO.cmd477-503
Diagram: MAS Main Menu → Support Tool Dispatch
Sources: MAS/All-In-One-Version-KL/MAS_AIO.cmd492-503
Check_Activation_Status.cmd is a batch wrapper that launches an embedded PowerShell script delimited by :sppmgr: markers. The PowerShell code queries the Windows and Office Software Protection Platform APIs directly using P/Invoke rather than WMI or slmgr.vbs, which makes it resilient in environments where WMI is degraded.
| Section | Triggered by | Key Output |
|---|---|---|
| Windows license status | cW1nd0ws list from SlGetInfoSLID $winApp | Product name, license state, grace period, partial product key, channel |
| KMS client info | DetectKmsClient (if VOLUME_KMSCLIENT in description) | CMID, KMS machine name/IP, activation/renewal intervals |
| KMS host info | DetectKmsHost (if VOLUME_KMS and no VOLUME_KMSCLIENT) | Current count, listening port, DNS publishing state |
| Digital license / genuine state | ClicRun (Vista/7) or ClicRun (Win 8+) | IsWindowsGenuine, IsDigitalLicense, last activation HResult and time |
| Office Ohook | CheckOhook | Detects sppc*dll in Office directories; warns to ignore SPP-reported Office status |
| Office SPP status (15/16) | c0ff1ce15 / c0ff1ce14 from SlGetInfoSLID $o15App | Same fields as Windows |
| Office OSPP status (14/15) | ospp15 / ospp14 via osppc.dll | OSPP-registered products |
| M365/vNext licenses | vNextDiagRun | LicensingNext registry, shared computer licensing, device/NUL license files |
Diagram: Check_Activation_Status.cmd Internal Structure
Sources: MAS/Separate-Files-Version/Check_Activation_Status.cmd1-51 MAS/Separate-Files-Version/Check_Activation_Status.cmd53-200 MAS/Separate-Files-Version/Check_Activation_Status.cmd1427-1587
| Variable | GUID | Scope |
|---|---|---|
$winApp | 55c92734-d682-4d71-983e-d6ec3f16059f | Windows (SPP) |
$o15App | 0ff1ce15-a989-479d-af46-f275c6370663 | Office 15/16 (SPP and OSPP) |
$o14App | 59a52881-a989-479d-af46-f275c6370663 | Office 14 (SPP and OSPP) |
Sources: MAS/Separate-Files-Version/Check_Activation_Status.cmd1438-1445
Troubleshoot.cmd provides a menu-driven repair interface. It is invoked from the MAS main menu as option [8] or run standalone. Its internal menu label is :at_menu.
| Option | Label | Internal Label | What it does |
|---|---|---|---|
[2] | Dism RestoreHealth | :dism_rest | Runs dism /english /online /cleanup-image /restorehealth; copies CBS and DISM logs to desktop as .cab files via compresslog |
[3] | SFC Scannow | :sfcscan | Runs sfc /scannow; copies CBS log to desktop |
[4] | Fix WMI | :fixwmi | Attempts winmgmt /salvagerepository; if WMI still broken, stops service, deletes %SysPath%\wbem\repository\, re-enables service, then calls registerobj to re-register WMI DLLs and recompile .mof/.mfl files |
[5] | Fix Licensing | :retokens | Multi-phase rebuild of ClipSVC, SPP, and OSPP token stores (see below) |
[6] | Fix WPA Registry | (opens webpage) | Navigates browser to massgrave.dev/fix-wpa-registry |
Sources: MAS/Separate-Files-Version/Troubleshoot.cmd390-428
:retokens) detailThis is the most invasive repair option. It deactivates Windows and Office and rebuilds licensing state from scratch. It runs in three phases:
Diagram: Fix Licensing Phase Sequence (:retokens)
Sources: MAS/Separate-Files-Version/Troubleshoot.cmd563-1068
:fixwmi) detailThe checkwmi subroutine validates WMI by running Get-WmiObject -Class Win32_ComputerSystem, winmgmt /verifyrepository, and a test query against SoftwareLicensingService. If any of those fail, fixwmi proceeds through these steps in order, stopping early if WMI recovers:
winmgmt /salvagerepository — non-destructive repairsc config Winmgmt start= disabled → stop service → rmdir /s /q %SysPath%\wbem\repository\ → sc config Winmgmt start= autoregisterobj — calls regsvr32 on all .dll files in %SysPath%\wbem\, recompiles all .mof and .mfl files with mofcomp, then runs winmgmt /salvagerepository and winmgmt /resetrepositorySources: MAS/Separate-Files-Version/Troubleshoot.cmd1097-1235
Both DISM RestoreHealth and SFC Scannow copy their CBS/DISM logs to %USERPROFILE%\Desktop\AT_Logs\ using the compresslog subroutine, which creates .cab archives using makecab. The timestamp format is yyyyMMdd-HHmmssfff.
Sources: MAS/Separate-Files-Version/Troubleshoot.cmd1271-1299
The edition-changing tools are standalone utilities that do not affect activation state directly but change the Windows or Office product variant installed.
Change Windows Edition (Change_Windows_Edition.cmd, internal label :change_winedition): Supports edition upgrade and downgrade paths using slmgr, DISM API (DismApi.dll), or CBS XML. Documented in detail at 3.3.
Change Office Edition (Change_Office_Edition.cmd, internal label :change_offedition): Adds or removes Office product editions and can change the Office update channel by invoking OfficeClickToRun.exe. Documented in detail at 3.4.
Sources: MAS/All-In-One-Version-KL/MAS_AIO.cmd477-503 MAS/Separate-Files-Version/Troubleshoot.cmd390-428 MAS/Separate-Files-Version/Check_Activation_Status.cmd1-51
Refresh this wiki
This wiki was recently refreshed. Please wait 4 days to refresh again.