Error: "Failed to remove apps for the current user: 0x80073cf2" during guest OS customization
search cancel

Error: "Failed to remove apps for the current user: 0x80073cf2" during guest OS customization

book

Article ID: 414950

calendar_today

Updated On:

Products

VMware vSphere ESXi VMware vCenter Server

Issue/Introduction

  • Guest OS customization fails on Windows during Sysprep execution. The process is interrupted because specific preinstalled Microsoft Store (AppX) applications cannot be removed.
  • The following errors are typically observed in the setuperr.log file located at C:\Windows\System32\Sysprep\Panther\:

YYYY-MM-DD 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 Error SYSPRP Failed to remove apps for the current user: 0x80073cf2.
YYYY-MM-DD Error SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.
YYYY-MM-DD Error SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SysprepGeneralizeValidate' from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2
YYYY-MM-DD Error SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2
YYYY-MM-DD Error SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x3cf2
YYYY-MM-DD Error SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2
YYYY-MM-DD Error  SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2

Environment

  • VMware vCenter Server

  • VMware ESXi

Cause

  • The Sysprep process fails to generalize the Windows image when Microsoft Store (AppX) applications are installed only for specific user accounts rather than being provisioned for all users.
  • During the generalize phase of vCenter guest OS customization, Windows attempts to remove user-specific Store apps to create a clean image. If an app remains installed for an individual profile, the process terminates with error 0x80073cf2.

Resolution

As the affected applications are developed and managed by Microsoft, consult the guest OS vendor (Microsoft) for further assistance regarding the underlying Sysprep behavior.

Workaround:

  • If the problematic application is not needed in the environment, uninstall within the guest OS and reattempt the customization process.

  • Alternatively, deploy a new virtual machine with the required OS configuration ensuring no additional applications are installed and convert it into a template. When deploying a new VM from the clean template, apply guest OS customization (using the VM name as the hostname) and verify that the hostname updates correctly inside the guest OS after deployment.

Additional Information

For detailed troubleshooting steps regarding AppX package removal failures, refer to the Microsoft documentation: Sysprep fails after you remove or update Microsoft Store apps that include built-in Windows images.