The activation status checker provides detailed information about Windows and Office licensing states. The primary data retrieval mechanism is P/Invoke to native Windows SL (Software Licensing) APIs — specifically sppc.dll / slc.dll for Windows and osppc.dll for Office — rather than WMI. WMI is only used for subscription-specific queries via SoftwareLicensingService.
The activation status checker can be accessed in two ways:
| Method | Path | Description |
|---|---|---|
| Main Menu | MAS_AIO.cmd → Option [5] | Calls :check_actstatus function |
| Standalone | Check_Activation_Status.cmd | Direct execution of status checker |
Both methods execute the same PowerShell-based checking system embedded in the :sppmgr: section of the script.
Script Entry Point and Execution Flow
Sources: MAS/All-In-One-Version-KL/MAS_AIO.cmd498 MAS/Separate-Files-Version/Check_Activation_Status.cmd1-51 MAS/Separate-Files-Version/Check_Activation_Status.cmd1505-1587
The checker uses P/Invoke to call native SL API functions directly, building its output without relying on WMI for the core license queries. WMI is only used in DetectSubscription to read SoftwareLicensingService subscription fields.
P/Invoke API Layer (InitializePInvoke)
Sources: MAS/Separate-Files-Version/Check_Activation_Status.cmd206-249 MAS/Separate-Files-Version/Check_Activation_Status.cmd470-519 MAS/Separate-Files-Version/Check_Activation_Status.cmd1134-1304 MAS/Separate-Files-Version/Check_Activation_Status.cmd1438-1513
The checker displays Windows licensing information by querying SoftwareLicensingProduct where ApplicationID='55c92734-d682-4d71-983e-d6ec3f16059f' (Windows Application ID).
Windows License Data Fields
All fields are retrieved via P/Invoke, not WMI. propPrd is fetched using SlGetInfoSku (SLGetProductSkuInformation), key fields using SlGetInfoPKey (SLGetPKeyInformation), and status using SlGetInfoLicensing (SLGetLicensingStatusInformation).
| Field | P/Invoke Source | Description |
|---|---|---|
| Name | SLGetProductSkuInformation("Name") | Windows edition name |
| Description | SLGetProductSkuInformation("Description") | Product description; contains activation type tags |
| Activation ID | SLGetSLIDList → list entry id | GUID identifying the license (SKU ID) |
| Extended PID | SLGetPKeyInformation("DigitalPID") | Extended Product ID |
| Product ID | SLGetPKeyInformation("DigitalPID2") | Product ID (shown with -Dlv) |
| Partial Product Key | SLGetPKeyInformation("PartialProductKey") | Last 5 characters of installed key |
| Product Key Channel | SLGetPKeyInformation("Channel") | Key type (Retail, OEM, Volume:GVLK, etc.) |
| License Status | SLGetLicensingStatusInformation → dwStatus | Numeric status code (see table below) |
| Grace Period Remaining | SLGetLicensingStatusInformation → dwGrace | Minutes remaining in grace period |
| Evaluation End Date | SLGetLicensingStatusInformation → qwValidity | Evaluation expiry as file time |
Digital License Detection
On Windows 10 build 14393+, PrintDigitalLicenseStatus checks for a digital license by instantiating the COM object EditionUpgradeManagerObj.EditionUpgradeManager (from EditionUpgradeManagerObj.dll) and calling AcquireModernLicenseForWindows on interface F2DCB80D-0670-44BC-9002-CD18688730AF. The return code indicates digital license presence.
Subscription status (Windows 10+) is reported separately by PrintSubscriptionStatus, which calls SLGetWindowsInformationDWORD and ClipGetSubscriptionStatus from Clipc.dll.
Digital License and Subscription Check Flow
Sources: MAS/Separate-Files-Version/Check_Activation_Status.cmd1134-1304 MAS/Separate-Files-Version/Check_Activation_Status.cmd1390-1424
KMS Client Information
DetectKmsClient is triggered when VOLUME_KMSCLIENT appears in the Description field. Fields are retrieved via SlGetInfoSku / SlGetInfoService (SLGetProductSkuInformation / SLGetServiceInformation). Registry fallbacks read from SPKeyPath or OPKeyPath for caching and port settings.
| Field | SL API Property | Description |
|---|---|---|
| Client Machine ID | ClientMachineID (service) | Unique KMS client identifier (CMID) |
| KMS machine name from DNS | DiscoveredKeyManagementServiceName | Auto-discovered KMS server hostname |
| Discovered KMS port | DiscoveredKeyManagementServicePort | Auto-discovered KMS server port |
| KMS machine IP address | DiscoveredKeyManagementServiceIpAddress | IP of discovered KMS (Win10 1703+) |
| Registered KMS machine | KeyManagementServiceName | Manually configured KMS server |
| Registered KMS port | KeyManagementServicePort | Manually configured port (default 1688) |
| KMS extended PID | CustomerPID | KMS host's extended PID |
| Activation interval | VLActivationInterval | Minutes between activation attempts |
| Renewal interval | VLRenewalInterval | Minutes between renewal attempts |
| KMS host caching | Registry: DisableKeyManagementServiceHostCaching | Whether KMS host caching is enabled |
| KMS SRV lookup domain | KeyManagementServiceLookupDomain | Custom DNS domain for KMS SRV records |
Sources: MAS/Separate-Files-Version/Check_Activation_Status.cmd624-688 MAS/Separate-Files-Version/Check_Activation_Status.cmd559-613 MAS/Separate-Files-Version/Check_Activation_Status.cmd1453-1459
Office licensing information is retrieved via two paths: through the Windows sppsvc service (for Office 2013+ licenses registered with the Windows SLP) and through osppsvc (the Office Software Protection service, using osppc.dll). The script tries both and aggregates results.
| Variable | AppID | Service | Description |
|---|---|---|---|
$o15App | 0ff1ce15-a989-479d-af46-f275c6370663 | sppsvc / osppsvc | Office 2013/2016/2019/2021/2024/M365 |
$o14App | 59a52881-a989-479d-af46-f275c6370663 | osppsvc | Office 2010 |
The string identifiers $wslp = "SoftwareLicensingProduct" and $oslp = "OfficeSoftwareProtectionProduct" are passed through ParseList to GetResult to control Vista-specific behavior and property lookups, but the actual data retrieval is still via P/Invoke — not WMI queries to those class names.
Office License Data Flow
Sources: MAS/Separate-Files-Version/Check_Activation_Status.cmd1438-1444 MAS/Separate-Files-Version/Check_Activation_Status.cmd1505-1587 MAS/Separate-Files-Version/Check_Activation_Status.cmd133-199
Ohook Detection
CheckOhook scans for sppc*dll files in Office installation directories across all Program Files paths (ProgramFiles, ProgramW6432, ProgramFiles(x86)):
...\Microsoft Office\Office15\sppc*dll...\Microsoft Office\Office16\sppc*dll...\Microsoft Office\root\vfs\System\sppc*dll...\Microsoft Office\root\vfs\SystemX86\sppc*dll...\Microsoft Office 15\root\vfs\System\sppc*dllWhen detected, the output displays (in yellow):
Ohook for permanent Office activation is installed.
You can ignore the below mentioned Office activation status.
Sources: MAS/Separate-Files-Version/Check_Activation_Status.cmd165-199
vNext Subscription Licensing
vNextDiagRun runs on Windows 7+ ($NT7) and reports Office 365 / Microsoft 365 subscription state. It calls three sub-functions:
| Function | Registry / Path | Description |
|---|---|---|
PrintModePerPridFromRegistry | HKCU:\SOFTWARE\Microsoft\Office\16.0\Common\Licensing\LicensingNext | Per-ProductReleaseId activation mode: Legacy, vNext, or Device |
PrintSharedComputerLicensing | HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration + HKLM:\SOFTWARE\Microsoft\Office\16.0\Common\Licensing | Shared Computer Licensing status and auth tokens in %LOCALAPPDATA%\Microsoft\Office\16.0\Licensing |
PrintLicensesInformation "NUL" | %LOCALAPPDATA%\Microsoft\Office\Licenses | User-based vNext license files (JSON, base64 decoded) |
PrintLicensesInformation "Device" | %PROGRAMDATA%\Microsoft\Office\Licenses | Device-based license files |
License file fields shown: File, Version, Type, Product, Acid, LicenseState, EntitlementStatus, EntitlementExpiration, NotBefore, NotAfter, NextRenewal, TenantId.
Sources: MAS/Separate-Files-Version/Check_Activation_Status.cmd943-1105
The raw status is obtained from SLGetLicensingStatusInformation → dwStatus. GetResult remaps certain values before display based on hrReason:
Internal remapping in GetResult:
Raw dwStatus | Condition (hrReason) | Displayed as |
|---|---|---|
| 3 | (any) | 5 (Notification) |
| 2 | 0x4004F00D | 3 (Additional grace) |
| 2 | 0x4004F065 | 4 (Non-genuine grace) |
| 2 | 0x4004FC06 | 6 (Extended grace) |
| 2 | (other) | 2 (Initial grace) |
Final display values:
| Internal Code | Status Text | Description |
|---|---|---|
| 0 | Unlicensed | No valid license installed |
| 1 | Licensed | Product successfully activated |
| 2 | Initial grace period | In initial grace after installation |
| 3 | Additional grace period (KMS license expired or hardware out of tolerance) | KMS grace or hardware change |
| 4 | Non-genuine grace period | Failed genuine validation |
| 5 | Notification | Activation notification showing (reason code displayed) |
| 6 | Extended grace period | Extended grace (not shown on Vista/NT5) |
Known notification reasons (LicenseReason):
| Hex Code | Meaning |
|---|---|
0xC004F00F | KMS license expired (if KMS client) or hardware out of tolerance |
0xC004F200 | Non-genuine |
0xC004F009 / 0xC004F064 | Grace time expired |
Status Code Flow
Sources: MAS/Separate-Files-Version/Check_Activation_Status.cmd403-427 MAS/Separate-Files-Version/Check_Activation_Status.cmd739-790
Grace periods provide temporary product functionality when activation is pending or has expired.
Grace Period Types and Durations
| Grace Type | Trigger Condition | Duration | Status Code |
|---|---|---|---|
| Initial (OOBGrace) | Fresh installation, no key installed | 30 days (Windows) 5-30 days (Office) | 2 |
| Additional (OOTGrace) | KMS license expired Hardware change detected | 30 days (Windows) 7 days (Office KMS) | 3 |
| Non-Genuine Grace | Failed genuine validation | 30 days | 4 |
| Extended Grace | Special licensing scenarios | Varies | 6 |
Grace Period Countdown
The GracePeriodRemaining WMI property contains remaining time in minutes. The checker converts this to days/hours:
Grace Period Remaining: 43200 minutes (30 days)
When grace period expires (GracePeriodRemaining = 0), the product status depends on LicenseStatus:
Sources: MAS/Separate-Files-Version/Check_Activation_Status.cmd443-491
The checker identifies the activation method by analyzing license properties and system state.
Activation Method Detection Logic
Sources: MAS/Separate-Files-Version/Check_Activation_Status.cmd361-413 MAS/Separate-Files-Version/Check_Activation_Status.cmd803-850
HWID activation is reported as Licensed with GracePeriodRemaining = 0 and Channel = OEM:DM or similar. The PrintDigitalLicenseStatus function (in ClicRun) provides the explicit IsDigitalLicense field by calling AcquireModernLicenseForWindows on the EditionUpgradeManagerObj.EditionUpgradeManager COM object. A non-error, non-1 return code indicates a digital license.
Output in the main listing displays: "The machine is permanently activated."
KMS activation is identified by the Description field containing VOLUME_KMSCLIENT. Key channel (Channel) will be Volume:GVLK. DetectKmsClient is called to display KMS-specific details retrieved via SlGetInfoSku and SlGetInfoService.
| Property | SL API Field | Default Value |
|---|---|---|
| Client Machine ID | ClientMachineID (service) | Random GUID per machine |
| KMS machine name from DNS | DiscoveredKeyManagementServiceName | Auto-discovered hostname |
| Registered KMS machine | KeyManagementServiceName | Manually configured server |
| KMS port | KeyManagementServicePort | 1688 |
| Activation interval | VLActivationInterval | 120 minutes (2 hours) |
| Renewal interval | VLRenewalInterval | 10080 minutes (7 days) |
KMS activations expire after 180 days without renewal. See page 2.3 for the renewal task mechanism.
Windows Subscription is detected via DetectSubscription, which queries SoftwareLicensingService WMI for SubscriptionType, SubscriptionStatus, SubscriptionEdition, and SubscriptionExpiry. Additionally, PrintSubscriptionStatus (in ClicRun) reads ClipGetSubscriptionStatus from Clipc.dll and reports SubscriptionEnabled, SubscriptionSku, and SubscriptionState.
Office 365 subscription (vNext) is detected by vNextDiagRun by checking for license JSON files under %LOCALAPPDATA%\Microsoft\Office\Licenses and %PROGRAMDATA%\Microsoft\Office\Licenses, and registry keys under HKCU:\SOFTWARE\Microsoft\Office\16.0\Common\Licensing\LicensingNext.
Sources: MAS/Separate-Files-Version/Check_Activation_Status.cmd470-519 MAS/Separate-Files-Version/Check_Activation_Status.cmd1248-1304 MAS/Separate-Files-Version/Check_Activation_Status.cmd1079-1105
This message indicates that Office is permanently activated using the Ohook method, regardless of what other license status information says. Office will remain activated permanently.
For Windows, this message indicates successful permanent activation, typically using a digital license (HWID method).
KMS activations are temporary and need to renew periodically. This message shows when the current activation will expire if not renewed. KMS clients automatically try to renew before expiration.
Windows or Office is in the initial trial period after installation. Activation is needed before this date.
Sources: MAS/Separate-Files-Version/Check_Activation_Status.cmd443-491
The "Client Licensing Check information" block is produced by two separate functions depending on Windows version:
| Function | Windows Version | Source DLL |
|---|---|---|
ClcRun | Vista / Windows 7 (NT6, not NT8) | slc.dll |
ClicRun | Windows 8+ (NT8) | sppc.dll |
ClicRun output fields (Windows 8+):
| Field | Source Function | Description |
|---|---|---|
StateData | PrintStateData via SLGetWindowsInformation("Security-SPP-Action-StateData") | SPP state key-value pairs |
LastActivationHResult | PrintLastActivationHResult via SLGetWindowsInformation("Security-SPP-LastWindowsActivationHResult") | HResult of last activation attempt |
LastActivationTime | PrintLastActivationTime via SLGetWindowsInformation("Security-SPP-LastWindowsActivationTime") | File time of last activation |
IsWindowsGenuine | PrintIsWindowsGenuine via SLIsWindowsGenuineLocal | One of SL_GEN_STATE_IS_GENUINE, SL_GEN_STATE_INVALID_LICENSE, SL_GEN_STATE_TAMPERED, SL_GEN_STATE_OFFLINE, SL_GEN_STATE_LAST |
IsDigitalLicense | PrintDigitalLicenseStatus via COM EditionUpgradeManagerObj | TRUE/FALSE |
| Subscription fields | PrintSubscriptionStatus via Clipc.dll | SubscriptionEnabled, SubscriptionSku, SubscriptionState |
ClcRun output fields (Vista/7):
| Field | Source Function |
|---|---|
AppId | Hard-coded $winApp |
GraceEndDate | From $primary[0].ged (grace minutes from SlGetInfoLicensing) |
KernelTimebombDate | clcGetExpireKrn via SLGetWindowsInformation("Kernel-ExpirationDate") or clcGetExpireSys |
LastConsumptionReason | From $primary[0].lcr (hrReason from SlGetInfoLicensing) |
LicenseState | clcGetLicensingState → maps to ppwszLicensingStates[] |
IsWindowsGenuine | clcGetGenuineState via SLIsWindowsGenuineLocal or SLIsGenuineLocal |
Sources: MAS/Separate-Files-Version/Check_Activation_Status.cmd1148-1304 MAS/Separate-Files-Version/Check_Activation_Status.cmd1390-1424 MAS/Separate-Files-Version/Check_Activation_Status.cmd1461-1474
The Checking Activation Status feature is a powerful diagnostic tool that helps you verify and troubleshoot Windows and Office activations. By understanding the information it provides, you can determine whether your products are properly activated and what type of activation is being used.
If activation is not working as expected, use the information provided by this tool to guide your next steps, whether that's selecting a different activation method from the MAS main menu or troubleshooting specific activation issues.
Refresh this wiki
This wiki was recently refreshed. Please wait 4 days to refresh again.