I had this problem this morning so thought i’d post the fix, to cut a long story short when trying to Sysprep a Windows 10 build 10122 image, the sysprep process failed every time during the generalize section as revealed in the sysprep logs.
Sysprep was failing to generalize because something was stopping it from continuing the process. The errors were logged in the following folder:-
and the following files contained info pointing to the failure:-
here’s a snippet from setuperr.log:-
2015-05-25 17:14:22, Error SYSPRP setupdigetclassdevs failed with error 0
2015-05-25 17:15:03, Error SYSPRP Encountered error 0x80070020 while deleting contents of package repository. Another process, likely Windows Installer service, is accessing the files inside ‘C:\ProgramData\Microsoft\Windows\AppRepository’. Try stopping the Windows Installer service and ensure that no other process is accessing files inside this directory before retrying[gle=0x00000012]
2015-05-25 17:15:03, Error SYSPRP Failed while deleting repository files under ‘C:\ProgramData\Microsoft\Windows\AppRepository’: 0x80070020.[gle=0x00000012]
2015-05-25 17:15:03, Error SYSPRP Failed to clean the package repository database: 0x80070020.
2015-05-25 17:15:03, Error [0x0f0082] SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing ‘SysprepGeneralize’ from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x20
2015-05-25 17:15:03, Error SYSPRP ActionPlatform::ExecuteAction: Error in executing action; dwRet = 0x20
2015-05-25 17:15:03, Error SYSPRP ActionPlatform::ExecuteActionList: Error in execute actions; dwRet = 0x20
2015-05-25 17:15:03, Error SYSPRP SysprepSession::Execute: Error in executing actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x20
2015-05-25 17:15:03, Error SYSPRP RunPlatformActions:Failed while executing SysprepSession actions; dwRet = 0x20
2015-05-25 17:15:03, Error [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x20
2015-05-25 17:15:03, Error [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep generalize internal providers; hr = 0x80070020
It turns out that a Windows 10 service called tiledatamodelsvc is responsible, and all you have to do to fix is stop the service before running sysprep. That service prevents Sysprep from accessing the files in C:\ProgramData\Microsoft\Windows\AppRepository.
To resolve the problem, try one of these three methods:
1. Stop it with PowerShell
2. Stop it from a cmd prompt
net stop tiledatamodelsvc
3. Stop it in the Computer Management console
Open Computer Management and select services, locate the tiledatamodelsvc, right click it, and choose Stop.
Once the service is stopped, you can sysprep the computer.
Pingback: Deploying Windows 10 Virtual Desktop Infrastructure on Windows Server 2016 (Technical Preview)
did you verify that the service was stopped and stayed stopped before sysprep, the service automatically restarts so it takes a few attempts…
Pingback: Deploying Windows 10 Virtual Desktop Infrastructure on Windows Server 2016 (Technical Preview) – Mes mémos – Nadus
Pingback: Deploying Windows 10 Virtual Desktop Infrastructure on Windows Server 2016 (Technical Preview) | YOUNGTECH
Pingback: Server 2016 with Windows 10 VDI machines | Knowledgebase - DvdHeuvel IT