How w4rh4wk/debloat-windows-10 works
Project Type and Purpose
• This is an open-source, CLI-based Windows system-administration tool (“Debloat Windows 10”).
• It provides a collection of PowerShell scripts (.ps1) and helper modules (.psm1) to automate the removal or disabling of unwanted Windows components and to apply common system tweaks.
• Utility files (.bat, .reg, additional .ps1) live in a separate folder and can be invoked directly or by the main scripts.
File Structure Analysis
• Top-level folders:
• lib/ – PowerShell modules (New-FolderForced.psm1, take-own.psm1) exporting reusable functions.
• scripts/ – Main .ps1 scripts for debloating tasks (disable-windows-defender.ps1, remove-default-apps.ps1, etc.).
• utils/ – Batch files and registry‐import scripts for one-off tweaks (dark-theme.reg, ssd-tune.ps1, etc.).
• No frontend/backend separation—instead a modular, script‐centric structure.
• No build/deploy configs; it runs directly on Windows PowerShell with Administrator rights.
README Insights
• Emphasizes non-interactive execution (scripts must be pre-edited).
• Requires Windows 10 Pro 64-bit.
• Modules must be unblocked and execution policy set to Unrestricted.
• No external cloud or third-party APIs—only Windows OS internals (Registry, Services, AppX packages).
a. Main Components
• User / Administrator invoking PowerShell CLI
• PowerShell Host (Engine)
• scripts/ folder (individual .ps1 task scripts)
• lib/ folder (PowerShell modules providing shared functions)
• utils/ folder (batch, registry, helper scripts)
• Windows OS subsystems:
– Registry
– Service Manager (SC.exe)
– AppX Package Manager
– File System & NTFS permissions
b. Relationships & Data Flow
1. User launches a .ps1 script from scripts/
2. Script imports functions from lib/*.psm1
3. Script executes commands against Windows subsystems (e.g., Set-Service, Remove-AppxPackage, reg import)
4. Scripts may invoke utils/* files directly or call them via Start-Process
c. Architectural Patterns & Principles
• Modularization: common tasks abstracted into .psm1 modules for reuse.
• Single-responsibility: one script = one tweak or removal job.
• Plain-text, idempotent commands—no hidden state or database.
d. Key Technologies
• Windows PowerShell (v5+)
• PowerShell Modules (.psm1)
• Windows Registry (.reg)
• Batch files (.bat)
• Windows Service Control (SC.exe)
• AppX Package Manager (Get-AppxPackage / Remove-AppxPackage)
Detail
• Major interactions: scripts → modules → OS.