KB5034912: Sysprep error 0x80073cf2 after installing the November 30, 2023 update or later for Windows 10, version 22H2

Applies To
Windows 10 Home and Pro, version 22H2 Windows 10 Enterprise and Education, version 22H2 Windows 10 Enterprise Multi-Session, version 22H2 Windows 10 IoT Enterprise, version 22H2

Note

NOTE If you install the update mentioned in the "Resolution" section, you do not need to use the "Workaround" section.

Scenario

After you install an update released on or after November 30, 2023 for Windows 10, version 22H2 and then run the System Preparation Tool (Sysprep.exe) in Audit mode, you might receive an error message. On devices with an affected configuration, you might receive the following error message:

Error dialog box Error message text
Sysprep error Sysprep was not able to validate your Windows installation. Review the log file at %WINDIR%\system32\Sysprep\Panther\setupact.log for details. After resolving the issue, use Sysprep to validate your installation again.”

To verify that you are affected by this issue, open the setupact.log file listed in the above error message and find an entry with the error 0x80073cf2 that resembles the following:

Note

SYSPRP Package Microsoft.MicrosoftEdge_44.19041.3636.0_neutral___8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep SYSPRP Failed to remove apps for the current user: 0x80073cf2

Take note of the name of the package listed in the log file for the workaround below. In the above example, “Microsoft.MicrosoftEdge” is the package name needed for the following work around.

Workaround

To mitigate this issue, follow these steps:

  1. Open PowerShell as an Administrator, type the following command, replacing <PackageFullName> with the name observed in the log file. For this example you would use Microsoft.MicrosoftEdge. Then press Enter to run the command.

    Note

    Get-AppxPackage -AllUsers | Where-Object { $_.PackageFullName -like '<PackageFullName>' } | Format-List -Property Name, PackageFullName, PackageUserInformation, InstallLocation, SignatureKind

  2. In the output, look for PackageUserInformation. If your Windows image is affected by this issue, Installed(pending removal) will be appended to the line and should resemble the following:

    Note

    PackageUserInformation : {S-1-5-21-1115194164-3625103809-2169974439-1002
                                                            [S-1-5-21-1115194164-3625103809-2169974439-1002]: Installed(pending removal)}  

  3. If your Windows image is affected by this issue, type the following command, replacing <PackageFullName> with the name observed in the log file. For this example, you would use Microsoft.MicrosoftEdge. and then press Enter:

    Note

    Get-Appxpackage <PackageFullName> -AllUsers | Remove-Appxpackage -AllUsers

  4. To exit PowerShell, type Exit and then press Enter.

  5. Resume Sysprep steps. Open Sysprep under System Cleanup Action, and select Out-of-Box Experience (OOBE).

  6. Select the Generalize check box.

  7. Under Shutdown Options, select Reboot and then click Ok.

Resolution

This issue is resolved in updates released on and after March 26, 2024 (KB5035941). We recommend you install the latest security update for your device. It contains important improvements and issue resolutions, including this one.

References

Sysprep (System Preparation) Overview

Sysprep Command-Line Options