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