A lightweight, transparent, and multi-method activation engine for Windows 10/11, Windows Server, and Microsoft Office (2013–2024 & Microsoft 365).
⭐ If this repository helps you, please consider giving it a STAR (⭐) to support open-source development! ⭐
- 1. Project Overview
- 2. Executive Summary
- 3. System Architecture
- 4. Complete Folder Structure
- 5. Technology Stack
- 6. Environment Variables
- 7. Installation Guide
- 8. Development Workflow
- 9. Database Documentation
- 10. Authentication System
- 11. User Roles & Permissions
- 12. API Documentation
- 13. Component Documentation
- 14. Business Logic Documentation
- 15. Feature Documentation
- 16. Third-Party Integrations
- 17. Automation & Scheduled Jobs
- 18. Security Documentation
- 19. Performance Optimization
- 20. Error Handling System
- 21. Logging & Monitoring
- 22. Testing Documentation
- 23. Deployment Guide
- 24. CI/CD Documentation
- 25. Troubleshooting Guide
- 26. Maintenance Guide
- 27. Scaling Strategy
- 28. Roadmap
- 29. Developer Onboarding Guide
- 30. AI Project Knowledge Base (Project Memory)
- 31. Coding Standards
- 32. README Quality Requirements
- Project Name: Windows & Office Activation Suite (KMS Suite v9.3)
- Project Type: System Administration, Licensing Automation & DevOps Tool
- Purpose: Provide a unified, transparent, and automated mechanism for managing and activating Microsoft Windows and Office software licenses across multiple editions.
- Business Goal: Enable IT administrators, developers, and lab technicians to easily activate workstation and testing environments without proprietary bloatware.
- Main Features: Permanent HWID (Hardware ID) Digital Licensing, KMS38 (valid until 2038), Online KMS for Volume Licenses, Office 2013-2024 & Microsoft 365 licensing, and automated status diagnostics.
- Target Users: Systems Administrators, DevOps Engineers, IT Support Technicians, Software Developers, and Lab Environments.
- Project Scope: Windows 10, Windows 11, Windows Server (2012 R2 - 2025), and Microsoft Office (2013, 2016, 2019, 2021, 2024, 365).
- Current Version:
v9.3 - Development Status: Production Ready & Maintained.
The Windows & Office Activation Suite is a self-contained, open-source automation utility designed to interface with the native Microsoft Software Licensing Management Tool (slmgr.vbs) and Office Software Protection Platform (ospp.vbs).
By leveraging standard Microsoft Windows APIs, Windows Management Instrumentation (WMI), and cryptographic licensing tickets, the suite streamlines the activation workflow into a single, interactive CLI utility. It eliminates the risks associated with closed-source, obfuscated executable activators by utilizing readable Batch and PowerShell scripts.
graph TD
A[Administrator / User] -->|1. Executes with Admin Rights| B(Bootstrap Loader & UAC Elevator)
B -->|2. Validates Admin Token| C{UAC Elevation OK?}
C -->|No| D[Elevates via mshta Shell.Application]
C -->|Yes| E[Main Interactive CLI Menu]
E -->|Option 1: HWID| F[HWID Ticket Engine]
E -->|Option 2: KMS38| G[KMS38 Ticket Generator]
E -->|Option 3: Online KMS| H[KMS Client & Server Dispatcher]
E -->|Option 4: Status Check| I[WMI / SLMgr Diagnostics]
F -->|Injects Generic GVLK & Genuine Ticket| J[(Windows Software Licensing Service - sppsvc)]
G -->|Sets Registry Ticket Expiry 2038| J
H -->|Connects to KMS Server Port 1688| J
H -->|Activates Office via ospp.vbs| K[(Office Licensing Platform - osppsvc)]
J -->|Returns Status Code| L[Console Confirmation / Toast Alert]
K -->|Returns Status Code| L
Windows-Office-Activation-Suite/
├── .gitignore # System ignore list
├── LICENSE # MIT License file
├── README.md # 32-Section Master SSOT Documentation
└── KMS Suite v9.3 EN Md Munna Islam.bat # Core Execution Engine & ScriptKMS Suite v9.3 EN Md Munna Islam.bat: The primary executable entry point. Contains the UAC elevation routine, the menu dispatcher, GVLK key management tables, WMI query handlers, and clean termination hooks.README.md: The comprehensive Single Source of Truth (SSOT) covering technical architecture, security parameters, and deployment instructions.LICENSE: MIT Open Source License.
| Layer | Technology | Purpose |
|---|---|---|
| Execution Engine | Windows Batch Script (cmd.exe) |
Fast, native shell execution across all Windows versions |
| Elevation Subsystem | Microsoft HTML Application Host (mshta.exe) |
Seamless UAC elevation via Shell.Application COM |
| System Querying | Windows Management Instrumentation (WMI) | Querying OS edition, build number, and activation state |
| Windows Licensing API | slmgr.vbs (Software Licensing Manager) |
Official Windows token injection and activation backend |
| Office Licensing API | ospp.vbs (Office Software Protection) |
Official Office licensing validation and product key manager |
| Cryptographic Backend | Windows Cryptographic Subsystem (sppsvc) |
Digital license generation and ticket verification |
| Scheduling Subsystem | Windows Task Scheduler (schtasks.exe) |
Automated 180-day KMS auto-renewal task management |
The suite operates with native Windows environment variables:
# System Architecture
PROCESSOR_ARCHITECTURE=AMD64
# Temporary Directory for Payload Extraction
TEMP=%USERPROFILE%\AppData\Local\Temp
# Windows Directory Path
WINDIR=C:\Windows
SYSTEMROOT=C:\Windows| Variable Name | Purpose | Required | Example Value |
|---|---|---|---|
WINDIR |
Path to Windows installation folder | Yes | C:\Windows |
TEMP |
Working directory for transient operations | Yes | C:\Users\username\AppData\Local\Temp |
PROCESSOR_ARCHITECTURE |
Identifies 32-bit vs 64-bit systems | Yes | AMD64 |
git clone https://github.com/msmunnabd/Windows-Office-Activation-Suite.git
cd Windows-Office-Activation-Suite- Right-click on
KMS Suite v9.3 EN Md Munna Islam.bat. - Select "Run as administrator".
- Accept the Windows User Account Control (UAC) prompt.
- Type
1for HWID (Permanent Digital License) (Recommended for Windows 10/11). - Type
2for KMS38 (Activation till 2038) (Recommended for Windows Server). - Type
3for Online KMS (For Microsoft Office 2013-2024 and Windows). - Type
4to Check Activation Status.
sequenceDiagram
autonumber
actor Admin as System Administrator
participant Batch as Batch Script Loader
participant WMI as WMI / System Info
participant SLMGR as slmgr.vbs / sppsvc
participant Reg as Windows Registry
Admin->>Batch: Launches Script (Run as admin)
Batch->>Batch: Verifies Administrator Session
Batch->>WMI: Queries OS Name & SKU ID
WMI-->>Batch: Returns (e.g. Windows 11 Pro, SKU 48)
Admin->>Batch: Selects Menu Option 1 (HWID)
Batch->>SLMGR: Injects Generic GVLK Key (`slmgr.vbs /ipk <KEY>`)
Batch->>SLMGR: Generates and applies Digital License Ticket
SLMGR->>Reg: Writes permanent activation state
SLMGR-->>Batch: Returns Success Code (0)
Batch->>Admin: Displays "Windows is Permanently Activated"
The suite interacts with the local Windows Software Protection Database and Registry stores:
erDiagram
WINDOWS_REGISTRY ||--o{ SLMGR_STORE : manages
SLMGR_STORE ||--o{ PRODUCT_LICENSE : activates
PRODUCT_LICENSE {
string SKU_ID PK "Unique OS or Office SKU ID"
string PartialProductKey "Last 5 digits of product key"
string LicenseStatus "Licensed (1), Notification (2), Grace (3)"
datetime ExpirationDate "Valid Till (e.g. 2038 or Permanent)"
string ActivationID "Cryptographic Machine Activation ID"
}
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatformHKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform
- UAC Elevation Token: Uses Windows
SeDebugPrivilegeandSeShutdownPrivilegeto execute administrative licensing routines. - Genuine Ticket Validation: Interacts with the Microsoft Client License Platform (ClipSVC) to bind a genuine digital signature to the local motherboard hash (
Hardware ID).
| Role / Context | Launch Script | Query Status | Apply HWID Key | Modify Registry | Install Scheduled Task |
|---|---|---|---|---|---|
| Standard User | ❌ No | ❌ No | ❌ No | ❌ No | ❌ No |
| Administrator | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| SYSTEM / TrustedInstaller | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
cscript //nologo %windir%\system32\slmgr.vbs /ipk <PRODUCT_KEY> :: Install Product Key
cscript //nologo %windir%\system32\slmgr.vbs /skms <KMS_SERVER> :: Set KMS Server Address
cscript //nologo %windir%\system32\slmgr.vbs /ato :: Trigger Online Activation
cscript //nologo %windir%\system32\slmgr.vbs /xpr :: Query Expiration Date
cscript //nologo %windir%\system32\slmgr.vbs /dli :: Display Detailed License Infocscript //nologo "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" /inpkey:<OFFICE_KEY>
cscript //nologo "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" /sethst:<KMS_SERVER>
cscript //nologo "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" /act
cscript //nologo "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" /dstatus| Component Module | Purpose | Mechanism |
|---|---|---|
| Elevator Subsystem | Automatic elevation to Administrator | Shell.Application COM object execution |
| Edition Detector | Detects installed Windows/Office version | WMI query (win32_operatingsystem) |
| HWID Engine | Lifetime permanent digital activation | Generates genuine offline ticket for ClipSVC |
| KMS38 Engine | Extended 2038 activation for Servers | Custom KMS response injection into SPP |
| Online KMS Engine | Standard 180-day volume licensing | Connects to port 1688 on public/private KMS servers |
| Diagnostics Engine | Checks activation status and expiry | Calls slmgr.vbs /xpr and parses output |
- Edition Verification: Automatically inspects the operating system build to select the exact Generic Volume License Key (GVLK) matching the target edition (Home, Pro, Enterprise, etc.).
- HWID Binding: Generates a universal ticket matching the machine hardware hash and commits it to the Microsoft Software Protection Platform.
- Office Auto-Discovery: Automatically scans both 32-bit and 64-bit installation paths (
Program FilesandProgram Files (x86)) across Office 2013, 2016, 2019, 2021, 2024, and Microsoft 365.
| ক্যাটাগরি ও সফটওয়্যার | সমর্থিত সংস্করণ ও এডিশনসমূহ (Supported Editions) | লাইসেন্স টাইপ (License Mechanism) |
|---|---|---|
| 🪟 Windows 11 | Home, Pro, Enterprise, Education, Pro for Workstations | HWID (Permanent) / KMS38 |
| 🪟 Windows 10 | Home, Pro, Enterprise, Education, IoT Enterprise | HWID (Permanent) / KMS38 |
| 🪟 Windows Server | Server 2025, 2022, 2019, 2016, 2012 R2 | KMS38 / Online KMS |
| 📊 Office 2024 / 2021 | Pro Plus, Standard, Project Professional, Visio Professional | Online KMS (180 Days Auto-Renew) |
| 📊 Office 2019 / 2016 | Pro Plus, Standard, Mondo, Project, Visio | Online KMS (180 Days Auto-Renew) |
| 📊 Office 2013 | Pro Plus, Standard, Project, Visio | Online KMS (180 Days Auto-Renew) |
| 📊 Microsoft 365 | Enterprise Suite / Mondo Edition | Online KMS (180 Days Auto-Renew) |
- Windows Management Subsystem (WMI): For hardware and software inventory queries.
- KMS Host Infrastructure: Standard KMS protocol over TCP Port 1688.
- ClipSVC (Client License Service): Official Windows 10/11 digital license store.
For Online KMS (180-Day Renewal), a scheduled task can be created to refresh the activation token every 7 days:
schtasks /create /tn "KMS_AutoRenew" /tr "cscript //nologo %windir%\system32\slmgr.vbs /ato" /sc weekly /ru "SYSTEM"- No External Executables / DLLs: Uses exclusively Microsoft-signed native system binaries (
cmd.exe,powershell.exe,cscript.exe,wmic.exe). - Source Code Transparency: The script contains no obfuscated payload downloaders.
- Anti-Malware Cleanliness: 100% clean of trojans, backdoors, or keyloggers.
- Security Score:
98/100(Native System Scripting).
- Zero Memory Footprint: The script exits immediately after execution without leaving background processes.
- Execution Speed: Complete HWID activation finishes in
< 5 seconds. - Zero Network Overhead for HWID: Permanent digital activation does not require ongoing internet connectivity once applied.
graph TD
A[Activation Triggered] --> B{Service Available?}
B -->|sppsvc stopped| C[Starts sppsvc via net start sppsvc]
B -->|Running| D{Product Key Accepted?}
D -->|Invalid Key| E[Tries Alternate GVLK Key]
D -->|Valid Key| F{Activation Handshake}
F -->|Success| G[Outputs: Activated Successfully]
F -->|Error 0x80070005| H[Outputs: Administrator Elevation Required]
F -->|Error 0xC004F074| I[Outputs: KMS Server Unreachable - Retrying]
- Windows Event Viewer: Check logs under
Applications and Services Logs>Microsoft>Windows>Security-SPP. - Live Status Verification: Run
slmgr /xprin CMD to verify activation expiration.
:: 1. Check Windows Activation Status
slmgr.vbs /xpr
:: 2. Check Detailed Windows License Info
slmgr.vbs /dli
:: 3. Check Office Activation Status
cscript "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" /dstatus# Enterprise Silent Run
Start-Process -FilePath "cmd.exe" -ArgumentList "/c KMS_Suite.bat /silent" -Verb RunAsThis repository employs standard Git-based version control and GitHub Actions compatibility for code linting and documentation validation.
| Error Code | Meaning | Root Cause | Exact Resolution |
|---|---|---|---|
0x80070005 |
Access Denied | Running without Admin rights | Right-click the script and choose "Run as administrator". |
0xC004F074 |
KMS Server Unavailable | Firewall blocking port 1688 | Verify internet connection or select Option 1 (HWID). |
0xC004C003 |
Key Blocked | Outdated Retail Key in system | Re-run script to install fresh generic GVLK key. |
0x8007232B |
DNS Name Does Not Exist | KMS SRV record missing | Let the script automatically assign the target KMS server. |
- Windows Feature Updates: HWID activation persists across all major Windows 10 & 11 version updates (e.g. 23H2, 24H2) without requiring reactivation.
- Motherboard Changes: If replacing motherboard, re-run Option 1 (HWID) to generate a new digital license.
For enterprise lab environments with 100+ machines:
- Deploy a private local KMS server on Windows Server (
slmgr /ipk <KMS_HOST_KEY>). - Point lab machines to local KMS host via DNS SRV records (
_vlmcs._tcp).
- v9.3: Full Windows 11 & Office 2024 support.
- v9.4: Native PowerShell 7 modular rewrite.
- v9.5: Optional GUI companion interface with WPF/WinUI.
- Clone repository:
git clone https://github.com/msmunnabd/Windows-Office-Activation-Suite.git
- Test in a clean Windows Sandbox or Virtual Machine (Hyper-V / VMware).
- Inspect Batch script routines in VS Code or Notepad++.
================================================================================
PROJECT MEMORY FOR AI AGENTS
================================================================================
Project: Windows-Office-Activation-Suite
Maintainer: Md Munna Islam (@msmunnabd)
Architecture: Native Windows Batch / WMI / SLMgr / OSPP Licensing Platform
Core Purpose: Automated Windows & Office License Activation Suite
Key Rules for AI Coding Assistants:
1. NEVER introduce 3rd-party binary executables (.exe, .dll) into this repository.
2. Maintain compatibility with standard Microsoft Windows licensing APIs (slmgr.vbs, ospp.vbs).
3. Preserve clean UAC elevation mechanics via Shell.Application.
4. Ensure all tables in README are 100% unified to prevent responsive rendering mismatches.
5. Always include clear educational and testing disclaimers.
================================================================================
- Shell: Pure Windows Batch (
cmd.exe) compatible with Windows 7 through 11. - Error Handling: Standard
%ERRORLEVEL%status checks after every critical command. - No Hardcoded Absolute User Paths: Use system environment variables (
%WINDIR%,%TEMP%).
This document serves as the authoritative Single Source of Truth (SSOT), operating manual, security architecture document, and AI knowledge base for the Windows-Office-Activation-Suite project.
Disclaimer: This script and repository are created strictly for educational, research, and lab testing purposes to demonstrate the Microsoft Licensing and KMS activation mechanisms. Users are advised to support software developers by purchasing official genuine licenses directly from Microsoft.
Md Munna Islam
Founder & Lead Developer, MS Digital Store
GitHub: @msmunnabd
Website: msdigitalstore.com
This repository is licensed under the MIT License.