Chris Titus Tech's Windows Utility (WinUtil)

repository·main·Indexed 13 days ago

https://github.com/christitustech/winutil

A curated PowerShell-based toolset with a WPF GUI designed to streamline Windows system tasks. It provides capabilities for software installation via WinGet and Chocolatey, system debloating through registry and service tweaks, Windows update configuration, and a specialized Win11 Creator for building customized Windows 11 ISOs with hardware bypasses and privacy optimizations.

Tokens
54K
Snippets
165
Records
224
Agent score
96%

What's inside WinUtil

  1. Overview of Winutil features and capabilities

    main

    Winutil (Chris Titus Tech's Windows Utility) is a PowerShell-based toolkit designed to optimize Windows 11 systems. It provides a centralized interface for several core tasks:

    • Application Installation: One-click installation of popular software.
    • System Tweaks: Optimizations for performance, privacy, and usability via presets or individual settings.
    • Config & Fixes: Troubleshooting tools for network resets, Windows Update repairs, and system file repairs.
    • Update Management: Granular control over Windows Updates (enabling/disabling, security-only, pausing, or managing driver updates).
    • Automation: Scripting configurations for consistent setups across multiple machines.
    • Windows 11 Creator: A tool to build custom, debloated Windows 11 ISOs with telemetry disabled and hardware checks bypassed.
  2. Core Capabilities of WinUtil

    main

    WinUtil provides a centralized control panel for managing Windows setup and maintenance. Its primary functions include:

    • Install Apps without Bloat: Uses WinGet and Chocolatey to install clean builds of applications, avoiding bundled toolbars or unwanted offers.
    • Apply System Tweaks: Provides one-click checkboxes for privacy, performance, and UI behavior tweaks. Most tweaks are reversible through the same panel.
    • Run System Fixes: Includes one-click repairs for networking, Windows Update, and WinGet.
    • Manage Windows Updates: Allows switching between full updates, security-only updates, or pausing updates entirely without using Group Policy.
    • Build Custom ISOs: The Win11 Creator feature allows you to debloat and preconfigure an official Microsoft image before installation.
    • Automation: Supports unattended execution using configuration files and parameters for repeatable deployments.
  3. Understand the WinUtil Docs project structure

    main

    The documentation site follows the Astro/Starlight structure:

    • src/content/docs/: Contains .md or .mdx files. Each file is exposed as a route based on its filename.
    • src/assets/: Place images here to embed them in Markdown using relative links.
    • public/: Contains static assets like favicons.
    • astro.config.mjs: Astro configuration file.
    • docker-compose.yml & Dockerfile: Container orchestration and image definition.
    • package.json: Project dependencies and scripts.
  4. Explore the WinUtil Project Structure

    main

    The project is organized into functional directories:

    • Compile.ps1: The build script used to bundle the entire project into a single winutil.ps1 file.
    • scripts/: Contains the entry point (main.ps1) and startup logic (start.ps1).
    • functions/public/: Contains user-facing PowerShell functions (e.g., Initialize-WPFUI.ps1, Invoke-WPFTweak*).
    • functions/private/: Contains internal helper functions (e.g., Get-WinUtilVariables.ps1, Install-WinUtilWinget.ps1).
    • config/: Holds JSON files defining the utility's capabilities (applications.json, tweaks.json, feature.json, preset.json, dns.json).
    • xaml/: Contains the inputXML.xaml file which defines the GUI layout.
  5. How UI elements and events are wired in WinUtil

    main

    The WinUtil interface is defined in xaml/inputXML.xaml. The connection between the visual UI and the underlying PowerShell logic follows a strict naming convention:

    1. Control Discovery: Named WPF controls are automatically discovered and stored in the $sync object.
    2. Event Mapping: An action or button in the UI named [Name]Button (e.g., WPFThingButton) is mapped to a PowerShell function named Invoke-[Name]Button (e.g., Invoke-WPFThingButton).
  6. Workflow for contributing to WinUtil

    main

    The standard contribution workflow follows these steps:

    1. Fork the WinUtil repository on GitHub.
    2. Clone your fork to your local device (GitHub Desktop is recommended).
    3. Create a new branch with a name related to your changes.
    4. Make changes in your preferred text editor.
    5. Test changes locally using .\Compile.ps1 -run.
    6. Commit changes (ensure you discard any unwanted changes to winutil.ps1 before committing).
    7. Push the branch to your fork on GitHub.
    8. Create a Pull Request to the main branch and fill out the provided template.

    Note: New changes first appear in the /windev build for verification before being merged into the main /win build.

  7. Manage Windows Updates via WinUtil

    main

    WinUtil provides options to control how Windows handles updates via the Updates tab:

    • Security Updates Only: Installs critical security patches but blocks major feature updates.
    • Disable Updates: Blocks all updates, including security (not recommended).
    • Default Updates: To resume normal Windows Update behavior, go to the Updates tab and click Default Updates.
  8. Install applications via WinUtil

    main

    WinUtil automates application installation using WinGet and Chocolatey.

    • Bulk Installation: Check the boxes for all desired applications and click Install Selected to install them sequentially.
    • Updates: Use the Upgrade Selected feature to update installed applications.
    • Cleanliness: Applications are installed from official sources without bundled bloatware.
  9. Windows 11 Modification Features

    main

    The Win11 Creator tool applies several automated modifications to the Windows image:

    App & Component Removal

    • Removes 40+ bloat apps (e.g., Clipchamp, Teams, Copilot, Dev Home, new Outlook, Bing apps, Solitaire).
    • Deletes OneDrive setup from the image.

    System Customization

    • Bypass Hardware Checks: Removes enforcement for TPM, Secure Boot, CPU, RAM, and storage requirements.
    • Local Account Setup: Injects autounattend.xml to skip Microsoft account requirements during OOBE.
    • Disable BitLocker: Removes device encryption and startup overhead.
    • Taskbar/UI: Removes the Chat icon and pins the selected edition during setup to prevent OEM firmware from forcing the wrong product-key path.

    Privacy & Telemetry

    • Disables telemetry (Advertising ID, tailored experiences, etc.) and removes telemetry scheduled tasks (CEIP, Appraiser, WaaSMedic).
    • Disables cloud content features (app suggestions, Store recommendations).
    • Disables OneDrive folder backup.
    • Blocks auto-installation of Teams, DevHome, and new Outlook Mail after OOBE.
    • Disables Windows Update during OOBE (re-enabled automatically on first login).
  10. Understand the WinUtil Build and Runtime Model

    main

    WinUtil is developed as a modular repository of PowerShell scripts, JSON configurations, and XAML markup, but it is distributed as a single, compiled PowerShell script named winutil.ps1.

    Build Model

    The Compile.ps1 script generates the final artifact by:

    1. Processing scripts/start.ps1 (injecting the build date).
    2. Recursively appending all files in functions/.
    3. Converting config/*.json files into embedded $sync.configs objects.
    4. Special-casing config/applications.json by prefixing keys with WPFInstall.
    5. Embedding the WPF UI (xaml/inputXML.xaml) into $inputXML.
    6. Embedding the Windows ISO setup tool (tools/autounattend.xml) into $WinUtilAutounattendXml.
    7. Appending scripts/main.ps1.

    Runtime Model

    • Environment: Runs in PowerShell on Windows using WPF for the UI.
    • State Management: Shared mutable state is managed via a $sync object, which holds configurations, UI element references, runspace state, selections, and progress.
    • Concurrency: Long-running operations use runspaces to keep the UI responsive. UI updates from background tasks must be dispatched back to the WPF UI thread.
  11. Use the Recommended update mode for stability

    main

    The Recommended mode is designed for most users to prioritize stability while maintaining security. It implements the following logic:

    • Feature updates: Delayed by 365 days.
    • Quality updates: Delayed by 4 days.
    • Drivers: Excluded from Windows quality updates.
    • Restarts: Scheduled updates will not automatically restart Windows while a user is signed in (though user-scheduled restarts still take precedence).

    Requirement: This mode requires Windows Pro, Enterprise, or Education editions to function via update deferral policies.