When guest OS customization executes Sysprep, the process fails because it cannot remove certain preinstalled applications.
Example from setuperr.log YYYY-MM-DD 20:47:01, Error SYSPRP Package Microsoft.<App name>.<Version> was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.YYYY-MM-DD 20:47:01, Error SYSPRP Failed to remove apps for the current user: 0x80073cf2.YYYY-MM-DD 20:47:01, Error SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.YYYY-MM-DD 20:47:01, Error SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SysprepGeneralizeValidate' from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2YYYY-MM-DD 10:47:01, Error SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2YYYY-MM-DD 20:47:01, Error SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x3cf2YYYY-MM-DD 20:47:01, Error [########] SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2YYYY-MM-DD 20:47:01, Error [########] SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2
VMware vCenter Server
VMware ESXi
This issue occurs because Sysprep fails to generalize the Windows image when certain Microsoft Store (AppX) applications are installed only for specific user accounts, rather than being provisioned for all users on the system.
During the generalize phase of Sysprep — executed as part of VMware guest OS customization — Windows attempts to remove or re-provision user-specific Store apps to create a clean, deployable image.
If any app, such as Microsoft.<AppName>, remains installed for an individual user profile but not provisioned system-wide, Sysprep cannot remove it properly. This triggers the following error:
SYSPRP Package Microsoft.<AppName>.<Version> was installed for a user, but not provisioned for all users.
As a result, Sysprep terminates with error 0x80073cf2, indicating it failed to clean up the per-user app installations.
This issue is caused by a failure in the Sysprep process within the guest operating system when removing certain Microsoft applications.
As the affected applications are developed and managed by Microsoft, please consult the guest OS vendor (Microsoft) for further assistance regarding the underlying Sysprep behavior.
If the specific application is not required in your environment, uninstall it within the guest OS and then reattempt the customization process.
Alternatively, deploy a new virtual machine with the required operating system configuration and no additional applications installed, and then convert it into a template.
When deploying a new virtual machine from this template, apply guest OS customization (using the virtual machine name as the hostname) and verify that the hostname is correctly reflected inside the guest OS after deployment.