Windows install failed after sysprep on 24H2

adi 0 Reputation points
2025-07-03T21:06:45.3733333+00:00

Hello everyone,

I have an issue on Windows during installation with sysprep.

To give you some context, I created a Windows 11 24H2 VM, then from audit mode, I updated it to the latest version with build 26100.4484, KB5060829.

I then performed a sysprep with the command:

sysprep.exe /generalize /oobe /shutdown

Once done, I booted from the ISO, ran a DISM, then captured an image of the C drive, and used the generated install.wim file to replace the default one in the Windows ISO and created a new ISO.

The problem I’m facing is that when the installation starts, towards the end, I get an error message: "Windows installation failed."

Here are the logs I found in setuperr.log under X: $WINDOWSBT\sources\panther

Does anyone have an idea on how to solve this issue?

Thanks everyone.

Windows for home | Windows 11 | Install and upgrade
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ami2025 390 Reputation points Microsoft External Staff Moderator
    2025-07-04T04:25:51.7366667+00:00

    Hello adi,

    Welcome to Microsoft Q&A.

    I understand your situation, and your description is very clear. You created a Windows 11 24H2 virtual machine, used Audit Mode to customize the system, and installed the latest updates. Then you ran Sysprep and used DISM to capture the C: drive (install.wim), replacing the default image in the original ISO. During installation on the target machine, an error occurred: “Windows installation failed.”

    The main error codes are: 0x80072EE7, 0x80070002, and a failure in GetWuIdFromRegistry. These indicate that the installation process failed to initialize “OneSettings”, likely due to issues such as network connectivity, missing UWP apps, or missing Windows Update components or registry entries.

    Recommended next steps:

    • Isolate network-related issues: On the virtual machine where you capture the image, disconnect the network before running Sysprep (e.g., disable the virtual network adapter) while still in Audit Mode.
    • Check whether critical UWP apps or update components were removed during the Sysprep preparation. You can run the following command before Sysprep to list all installed packages:

    Get-AppxPackage -AllUsers | Select Name, PackageFullName

     

    Windows OOBE (Out-of-Box Experience) requires the following critical components to be present:

    • Microsoft.AccountsControl
    • Microsoft.OneSettings
    • Microsoft.Windows.CloudExperienceHost
    • Microsoft.Windows.OOBENetworkConnectionFlow
    • Microsoft.Windows.OOBENetworkCaptivePortal

    Other suggestions:

    While in Audit Mode, you can run the following PowerShell commands (as Administrator) to remove Microsoft Store apps for all users:

    Get-AppxPackage -AllUsers | Remove-AppxPackage -AllUsers Get-AppxProvisionedPackage -Online | Remove-AppxProvisionedPackage -Online

    Caution: Removing these apps may affect the end-user experience post-deployment, as new users will need to re-download them. However, this is a known workaround to resolve Sysprep issues.

    Ensure the integrity of your installation source (install.wim is complete):

    Based on your description, it’s unclear exactly how you captured the image. Assuming you used the following DISM command:

    DISM /Capture-Image /ImageFile:D:\install.wim /CaptureDir:C:\ /Name:"Win11Custom"

    Make sure the root C:\ directory includes the following:

    • C:\ProgramData\Microsoft\Windows\StartMenu\Programs
    • C:\Windows\SystemApps\
    • C:\Windows\Panther\
    • C:\Windows\System32\oobe\

    If any of these are missing, the captured image will be incomplete, and the OOBE phase will likely fail.

    Best wishes

    Ami | Microsoft Q&A Support Specialist


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.