Not Found

The requested URL index.php was not found on this server.


Apache/2.2.22 (Linux) Server at Port 80
1 The Fix – Sysprep Generalize fails owing to app provisioning error(s) – Win10.Guru
Go to ...

RSS Feed

The Fix – Sysprep Generalize fails owing to app provisioning error(s)


Since Windows 10 version 1709, built-in admin account has been able to use UWP and PWA apps. In earlier versions, this was not possible, even Edge browser told users that it can’t be used in built-in admin account. But, as it’s now possible, native Store apps might update in the background while you are customizing image in Audit Mode. Long hours fine-tuning and customizing your perfect deployment image, when it’s time to run Sysprep with Generalize switch, you might get a fatal error:


Checking the log file, you will see that this was caused by app provisioning, because an app was provisioned incorrectly after it was updated:

2019-05-26 18:10:22, Error SYSPRP Package Microsoft.SkypeApp_14.38.138.0_x64__kzf8qxf38zg5c was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.

If you want to, you can remove the issue causing app provisioning problems by running the two following commands in admin PowerShell:

Get-appxpackage -allusers *Microsoft.SkypeApp* | Remove-AppxPackage
Get-appxprovisionedpackage –online | where-object {$_.packagename –like '*Microsoft.SkypeApp*'} | remove-appxprovisionedpackage –online

I do not recommend this solution, simply because if one app has been updated, most probably so have other apps. Running Sysprep will likely fail again, and this time the log file shows the culprit is another Store app instead.

Much better way, and what I use when building deployment images in Audit Mode, is to simply remove each and every app except Store itself, letting end users then decided which Store apps to install when image has been deployed to their devices. The two following commands will do this:

Get-AppxPackage -AllUsers | where-object {$_.name –notlike '*store*'} | Remove-AppxPackage
Get-appxprovisionedpackage –online | where-object {$_.packagename –notlike '*store*'} | Remove-AppxProvisionedPackage -online

Be prepared to see a lot of red error messages when running the first of those two commands. Don’t panic, it’s totally normal and OK:


Sysprep with the Generalize switch will now run without issues:

The Fix – Method One

Install Windows 10 normally on a reference machine, without network connection. If the reference machine is a physical machine, unplug the Ethernet cable. If it’s a virtual machine, set it to as “Not Connected” while installing. Reboot to Audit Mode from the Region selection screen when OOBE starts with SHIFT + CTRL + F3.

When on the desktop in Audit Mode, open an admin Command Prompt and run the following command:

reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore /v AutoDownload /t REG_DWORD /d 2 /f

This prevents Store apps from updating automatically in the background. You can now re-connect the reference machine to the network. Do your customizations, install software (not Store apps!), and just before running Sysprep, run the following command to restore app auto-updates:

reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore /v AutoDownload /f
The Fix – Method Two

In case you are using an answer file to boot automatically into Audit Mode, add a component named Microsoft-Windows-Deployment_Neutral to settings pass 4 Specialize. Add a new RunSynchronousCommand, and add the first command from Method One above. Auto-updates will be disabled:

As in Method One, remember to enable auto-updates again just before running Sysprep.

That’s it. A major PITA but easy to avoid!

Kari

Author: Kari Finn

A former Windows Insider MVP, Kari started in computing in the mid 80’s writing code for VAX / VMS systems. Since then, he’s worked in a variety of IT positions. He specializes in Windows image capture, customization, repair and deployment as well as Hyper-V virtualization. Kari is a proud Team Member at number #1 Windows site TenForums.com.

Leave a Reply