Microsoft small business knowledge base

Article ID: 2769827 - Last Review: April 17, 2013 - Revision: 1.2


Several Windows Store Apps come built-in with the Windows 8 image (Mail, Maps, Messaging, Bing, Travel, News and others), these are called provisioned apps. Provisioned apps are staged in the image and are scheduled to be installed for every user of the Windows image at the first logon. In addition to the built-in apps, you can also side-load your own Line of Business Windows Store Apps into the Windows image without having to publish them to the Windows Store. You can sideload appx packages using online or offline servicing commands available in DISM.exe or through the DISM Powershell module.

This article discusses an issue when you remove a provisioned Windows Store app, or update a Windows Store app by using the Windows Store and then run sysprep on the machine.


Consider the following scenarios:

Scenario 1
  • You are creating a custom Windows 8 reference machine that you want to sysprep and capture.
  • You want to remove some of the provisioned Windows Store apps (Appx packages) from this reference machine.
  • You run dism -online /Remove-ProvisionedAppxPackage /PackageName:<packagename> to un-provision the Appx Packages.
In this scenario, when you run sysprep operation, the operation may fail with the following error message:

System Preparation Tool 3.14
A fatal error occurred while trying to sysprep the machine

Scenario 2
  • You have an existing Windows image with several Windows Store apps side-loaded in the image.
  • You want to remove some of the side-loaded appx packages from your image and customize it further.
  • You boot into the reference machine and run one of the following Powershell commands to remove the provisioning of the Appx package.
    • Remove-AppxProvisionedPackage –PackageName <PackageName>
    • Remove-ProvisionedAppxPackage –PackageName <PackageName>

In this scenario, when you run sysprep operation, the operation may fail with the following error message:

System Preparation Tool 3.14
A fatal error occurred while trying to sysprep the machine

Scenario 3
  • You are creating a Windows 8 reference image
  • You connect to the Windows 8 Store and update the built-in Windows Store apps by using the Windows Store
In this scenario, when you run sysprep operation, the operation may fail with the following error message:

System Preparation tool 3.14
A fatal error occurred while trying to sysprep the machine

Additionally, in the SetupErr.log, you may notice the following error entries:

<Date> <Time>, Error SYSPRP Package <PackageFullName> was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
<Date> <Time>, Error SYSPRP Failed to remove apps for the current user: 0x80073cf2.
<Date> <Time>, Error SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.
<Date> <Time>, Error [0x0f0082] SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SysprepGeneralize' from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2
<Date> <Time>, Error SYSPRP ActionPlatform::ExecuteAction: Error in executing action; dwRet = 0x3cf2
<Date> <Time>, Error SYSPRP ActionPlatform::ExecuteActionList: Error in execute actions; dwRet = 0x3cf2
<Date> <Time>, Error SYSPRP SysprepSession::Execute: Error in executing actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2
<Date> <Time>, Error SYSPRP RunPlatformActions:Failed while executing SysprepSession actions; dwRet = 0x3cf2
<Date> <Time>, Error [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2
<Date> <Time>, Error [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep generalize internal providers; hr = 0x80073cf2


Sysprep has an additional provider that is added in Windows 8 to clean appx packages and generalize the image. The provider will only work if the Appx package is a per-user package or an all-user provisioned package. 
  • Per-user package means that the Appx package is installed for a particular user account and is not available for the other users of the machine.
  • All-user package means that the Appx has been provisioned into the image so that all users who use this image will get the App.

If an All-user package provisioned into the image was un-provisioned manually from the image, but not removed for a particular user, then during sysprep, the provider will run into an error cleaning out this package. The provider will also fail if an All-user package provisioned into the image, was updated by one of the users on this reference machine.


The correct way of removing the package is to remove the package for the user running sysprep and also remove the provisioning. This can be done using the following Powershell cmdlets:

  1. Import-Module Appx
  2. Import-Module Dism
  3. Get-AppxPackage -AllUser | Where PublisherId -eq 8wekyb3d8bbwe |  Format-List -Property PackageFullName,PackageUserInformation

    • From the output of the above command, check the users for whom the package is showing up as Installed. Delete these user accounts from the reference machine, or log in to the machine using these user accounts and run Step 4 to remove the Appx Package.
    • The above command lists all packages that were published by Microsoft and installed by any user of that reference machine. Since the machine is to be sysprepped, we assume that these user profiles no longer need the package.
    • If you have manually provisioned apps belonging to other publishers, then use the command below to list them:

      Get-AppxPackage -AllUser | Format-List -Property PackageFullName,PackageUserInformation
  4. Remove-AppxPackage -Package <packagefullname>
  5. Remove the Provisioning using the following cmdlet: Remove-AppxProvisionedPackage -Online -PackageName <packagefullname>
Note: The issue will not occur if you are servicing an offline image since then the provisioning is automatically cleared for all users, including the user who runs the command.

More information

Refer to the following TechNet articles on How to Add and Remove Apps: ( (

Appx Cmdlets: (

Dism Appx Servicing Cmdlets: (

Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use ( for other considerations.

Applies to
  • Windows 8
  • Windows 8 Enterprise
  • Windows 8 Pro
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support