$ show Raphire/Win11Debloat
Win11Debloat is a PowerShell-based Windows 10/11 debloating and configuration utility. It provides both a WPF graphical interface and a command-line interface, allowing users to remove pre-installed bloatware, disable telemetry and AI features, customize the taskbar, Start menu, File Explorer, and apply numerous registry tweaks. The tool is data-driven: feature definitions, app catalogs, and localization strings are stored in JSON files, while registry modifications are applied via `.reg` files. It supports undo operations, registry backup/restore, system restore points, and multi-user or Sysprep deployment scenarios. The architecture is modular, with dot-sourced PowerShell scripts organized into functional directories (Features, Helpers, GUI, AppRemoval, FileIO, Threading) and a comprehensive Pester test suite. External dependencies include PowerShell 5.1, winget, and standard Windows command-line tools. The codebase demonstrates high craftsmanship with reusable patterns for registry file parsing, non-blocking execution, user profile resolution, and localization.
The LLM identified 4 files worth highlighting for reuse:
Parses `.reg` files into structured operation objects (set/delete values, delete keys). This is a self-contained utility that can be extracted and reused in any PowerShell project that needs to apply registry changes from `.reg` files without invoking `reg.exe`. It handles comments, escape sequences, and multiple value types, returning a clean list of operations that can be validated or applied programmatically.
Captures the current state of selected registry keys before modifications, storing them as a normalized JSON snapshot. The companion `Restore-RegistryApplyState.ps1` can revert changes by comparing the snapshot with the current state. This pattern is reusable for any system that needs safe undo functionality for registry changes, and the snapshot format is validated by `Registry-BackupValidation.ps1`.
Executes a script block in a background runspace while pumping WPF dispatcher messages to keep the UI responsive. Includes a timeout mechanism and returns results. This is a clean, reusable pattern for any PowerShell GUI application that needs to run long operations without freezing the interface, and it is used throughout the codebase for winget calls, restore points, and scheduled tasks.
Provides functions to load and unload user registry hives (NTUSER.DAT) for offline modification, supporting Sysprep and other-user scenarios. It handles privilege elevation, path resolution, and proper cleanup. This is a self-contained module that can be reused in any PowerShell tool that needs to modify another user's registry settings without that user being logged in.