Skip to content

Refactor win11creator#4553

Open
GabiNun2 wants to merge 85 commits into
ChrisTitusTech:mainfrom
GabiNun2:refactor-win11creator
Open

Refactor win11creator#4553
GabiNun2 wants to merge 85 commits into
ChrisTitusTech:mainfrom
GabiNun2:refactor-win11creator

Conversation

@GabiNun2
Copy link
Copy Markdown
Contributor

@GabiNun2 GabiNun2 commented May 25, 2026

Type of Change

  • New feature
  • Bug fix
  • Documentation update
  • UI/UX improvement

Chris you need to read every word out loud otherwise your adhd brain wont understand it

Before Installing windows

Before Merging

  • Modify autounattend.xml to point the download command to the main branch.
    https://github.com/ChrisTitusTech/winutil/raw/main/tools/FirstLogon.ps1

Description

This PR refactors the deployment process by shifting registry modifications and AppX package removal out of the initial ISO build phase and into the Post-OOBE (Out-of-Box Experience) phase. It also includes comprehensive script refactoring, asynchronous runspace handling for image operations, and major optimizations to the build pipeline.


Key Architectural Changes & Rationale

  • Asynchronous Threading & UI Responsiveness: Ported intensive disk and image-handling tasks (like Mount-DiskImage, Dismount-WindowsImage, and Export-WindowsImage) into isolated background runspaces (STA). This prevents the main WPF thread from freezing, ensuring a responsive user interface during heavy operations.
  • Efficient Environment Staging: Injecting registry tweaks and removing AppX packages directly inside the offline ISO image is inefficient. Executing these changes post-OOBE is significantly faster, reduces complexity, and simplifies long-term codebase maintenance.
  • Streamlined User Experience: A PowerShell script now executes during the final post-OOBE setup phase (the blue "This might take a few minutes" screen). Upon completion, the machine reboots directly into a clean, fully configured desktop environment.
  • Dynamic Script Execution: Because FirstLogon.ps1 is fetched dynamically during setup, script updates can now be pushed directly to the repository without requiring an entirely new ISO build from scratch.
  • Removed Update-Disabling Logic: Disabling updates prior to OOBE has been removed because Windows natively allows users to skip updates during this stage. (Note: Mandatory update checks still occur, which the previous pre-OOBE method did not prevent anyway).

Optimizations & Cleanup

  • Remove /Resetbase: This operation takes a long time and only removes about 20 mb so i decided to remove it
  • Log Display Adjustments: Simplified the logger layout behavior; logs no longer append to a massive new-line string, allowing the interface to display a cleaner, singular current status message at a time.
  • Code Simplification: Removed redundant metadata handling functions (such as Get-DismImageInfoMap and the previous Hydration WIM fix), as testing indicated they introduced unnecessary overhead without resolving underlying issues.
  • Native File Operations: Replaced external robocopy calls with native Copy-Item configurations to better leverage PowerShell integration and improve local file duplication performance.
  • Console Noise Reduction: Suppressed verbose output for oscdimg commands to keep the processing logs clean, focused, and legible.
  • Boot.wim Driver Injection Fix: Stopped incorrect driver injection paths from leaking into boot.wim during the Windows 11 image creation process.
  • Clean & Reset Optimization: Re-architected the "Clean & Reset" workspace routine to explicitly delete targeted files and paths directly instead of passively scanning for them, drastically reducing execution and cleanup turnaround time.

Issues Related to PR

@GabiNun2 GabiNun2 requested a review from ChrisTitusTech as a code owner May 25, 2026 18:29
@GabiNun2 GabiNun2 marked this pull request as draft May 25, 2026 18:30
@github-actions github-actions Bot added bug Something isn't working new feature New feature or request labels May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working new feature New feature or request

Projects

None yet

1 participant