Sysprep failing for Windows 11 24H2

Sunil Nair 0 Reputation points
2025-02-27T16:04:18.31+00:00

Sysprep /generalize is failing for windows 11 24H2. At the end of generalize, the window runs into the following error on MDT

image-20241023-064846.png

Setuperr.log file shows the following error

2025-02-27 08:56:51, Error [0x0f0043] SYSPRP WinMain:The sysprep dialog box returned FALSE

2025-02-27 08:57:10, Error SYSPRP BCD: BiUpdateEfiEntry failed c000000d

2025-02-27 08:57:10, Error SYSPRP BCD: BiExportBcdObjects failed c000000d

2025-02-27 08:57:10, Error SYSPRP BCD: BiExportStoreAlterationsToEfi failed c000000d

2025-02-27 08:57:10, Error SYSPRP BCD: Failed to export alterations to firmware. Status: c000000d

If I run the same thing via SCM, it shows a "Why did my PC restart screen".

User's image

I see the same error in Setuperr.log. Here is the unattend.xml file that I am using for sysprep.

unattend.xml

Any help on this will be appreciated!

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2025-03-03T07:01:34.48+00:00

    Hi sunil,

    Thanks for your post. It looks like you're encountering a common issue with Sysprep on Windows 11 version 24H2. Here are some steps you can try to resolve this issue:

    1. Identify the problematic app: Check the Sysprep logs to identify which app is causing the issue. You can find the logs in C:\Windows\System32\Sysprep\Panther\setupact.log.

    2. If this is caused by an app, you can remove the app: If you've identified the problematic app, you can remove it using PowerShell. For example, if the issue is with the Microsoft.WidgetsPlatformRuntime package, you can use the following command:

    Remove-AppxPackage -Package Microsoft.WidgetsPlatformRuntime_1.6.1.0_x64__8wekyb3d8bbw

    Make sure to replace the package name with the one causing the issue on your system.

    3. Retry Sysprep: After removing the problematic app and ensuring it doesn't reinstall, try running Sysprep again.

    Best Regards,

    Ian Xue


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    1 person found this answer helpful.

  2. JHerrera-9319 0 Reputation points
    2025-03-15T05:03:55.3466667+00:00

    From the logs (see snippet), it looks like a problem is coming from the disk.

    The BCD, which stands for Boot Configuration Data, and something in how SysPrep handles this is failing. I am having somewhat similar issues in Windows 11 x64 v24H2 because BitLocker is enabled by default and disabling it damages the BCD so that if you ever try to turn BitLocker on again, the disk fails to boot up.

    Have a look at how you have BitLocker configured and eliminate that. My issue looks different than yours, but eliminate BitLocker and continue.

    I asked Copilot to find a solution regarding this issue, and it gave me very general instructions on what to do. I'd proceed carefully with these steps, but it might be good to eliminate them before you engage with Microsoft. It seems that whether you ask AI or look on Microsoft forums, you're always being asked to follow these steps. So why not?

    The steps:

    1. Open PowerShell as an Admin and run: dism /online /cleanup-image /restorehealth sfc /scannow
    2. Verify Boot Configuration Data. It didn't specify what to look for, but if you have a working good Windows 11, you might want to compare that one to the broken one. bcdedit /enum all If you see corruption (again, no specifics, so I suggest starting here: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/bcd-system-store-settings-for-uefi?view=windows-11), the instructions are to fix it using these commands: bootrec /fixmbr bootrec /fixboot bootrec /scanos bootrec /rebuildbcd If that fails, then the recommendation is to disable Secure Boot (in the system BIOS) and try running SysPrep again. Even if you don't want to go into Production with that, if disabling Secure Boot work, then the problem has been narrowed down further.
    3. Disable Windows Store Apps -- you've already done this. Frankly, I don't understand how AppX stuff would impact the BCD, so the AI is reaching heavily for anything that seems like its similar.

    In addition to the SysPrep Logs, have a look at both Application and System event Logs. Have a look also at the Administrative events.

    When looking at the event logs, its best to first find the point-of-failure in the SysPrep Logs (this is sometyhing you know) like I have below, and try to match the timestamp from the SysPrep logs with your event logs (which is something you don't know). Hopefully, you'll see some warning event or an error that will give you more clues.

    One last thing: since this seems to involve BCD/EFI/SecureBoot and the like, if you end up in the BIOS, many of them have their own event logs. You might want to have a look there for any disk-related errors that the system forces itself past

    Good luck.

    2025-02-27 08:56:51, Error      [0x0f0043] SYSPRP WinMain:The sysprep dialog box returned FALSE
    2025-02-27 08:56:56, Info                  SYSPRP   Name: Microsoft-Windows-ErrorReportingCore, Order: 2560
    2025-02-27 08:57:00, Info                  SYSPRP   Name: Microsoft-Windows-ErrorReportingCore, Order: 4352
    2025-02-27 08:57:10, Error                 SYSPRP BCD: BiUpdateEfiEntry failed c000000d
    2025-02-27 08:57:10, Error                 SYSPRP BCD: BiExportBcdObjects failed c000000d
    2025-02-27 08:57:10, Error                 SYSPRP BCD: BiExportStoreAlterationsToEfi failed c000000d
    2025-02-27 08:57:10, Error                 SYSPRP BCD: Failed to export alterations to firmware. Status: c000000d
    2025-02-27 08:57:11, Info                         [sysprep.exe] Exit WinRE_Generalize returns success with last error: 0x0
    

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.