Failure occurred while executing sysprepgeneralizevalidate from c windows system32 appxsysprep dll

When you create a windows 10 base image, you can do that with two versions of windows. The windows 10 LTSC (Long Term Servicing Channel) or with Windows 10 SAC (Semi-Annual Channel).

The windows 10 SAC is the version we are all familiar with and provides us all the new features microsoft gives use. Including all the pre-installed trash like Candy Crunch etc.

But creating a base image for windows 10 SAC can be a challenges…

I installed windows 10 (next, next, finish) and tried to create a image with this installation. But my Horizon DaaS gives me the following message:

Power off virtual machine ‘imagename’ – Timeout Error
Waited 8 minutes for virtual machine ‘imagename’ to power off.

The VMware kb tells you to extend the sysprep timeout policy, or if that not works check the sysprep log (C:\Windows\System32\Sysprep\Panther.log)
Source: https://kb.vmware.com/s/article/2126179

Off course extending the policy did not work for me….. So I needed to check the sysprep log.
When I opened the log I saw errors like:

2019-01-16 11:17:27, Error      [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2
2019-01-16 11:17:27, Error                 SYSPRP Package A278AB0D.DragonManiaLegends_4.2.1.0_x86__h6adky7gbf63m was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
2019-01-16 11:17:27, Error                 SYSPRP Failed to remove apps for the current user: 0x80073cf2.
2019-01-16 11:17:27, Error                 SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.
2019-01-16 11:17:27, Error                 SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing ‘SysprepGeneralizeValidate’ from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2
2019-01-16 11:17:27, Error                 SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2
2019-01-16 11:17:27, Error                 SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x3cf2
2019-01-16 11:17:27, Error      [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2
2019-01-16 11:17:27, Error      [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2

According to the microsoft kb you need to do the following:

Import-Module Appx
Import-Module Dism
Get-AppxPackage -AllUser | Where PublisherId -eq 8wekyb3d8bbwe | Format-List -Property PackageFullName,PackageUserInformation
Remove-AppxPackage -Package <packagefullname>

Source: https://support.microsoft.com/en-us/help/2769827/sysprep-fails-after-you-remove-or-update-windows-store-apps-that-inclu

But it is a lot of work to do it for each app, so automation is key you should think..

#delete them all.
Get-AppxPackage | ? {$_.PublisherId -eq '8wekyb3d8bbwe'} | Remove-AppxPackage

Unfortunately this did not what I expected, and had lots of errors:
Remove-AppxPackage : Deployment failed with HRESULT: 0x80073CF3, Package failed updates, dependency or conflict validation.
Windows cannot remove framework Microsoft.NET.Native.Runtime.2.2_2.2.27011.0_x86__8wekyb3d8bbwe because package(s) Microsoft.SkypeApp Microsoft.Xbox.TCUI
Microsoft.WindowsMaps currently depends on the framework. Removing all packages that depend on the framework automatically removes the framework.
NOTE: For additional information, look for [ActivityId] 0a021dff-ad7c-0001-315d-020a7cadd401 in the Event Log or use the command line Get-AppxLog -ActivityID 0a021dff-ad7c-0001-315d-020a7cadd401

It turns out that almost all apps have dependencies. In this case you need to uninstall all apps with dependecies and leave the apps without dependecies like ‘Microsoft.NET.Native.Runtime.2.2_2.2.27011.0_x86__8wekyb3d8bbwe’ alone.

The final code looks like this:

$Packages = Get-AppxPackage | ? {$_.PublisherId -eq '8wekyb3d8bbwe'}
foreach($package in $packages){if($package.Dependencies){Remove-AppxPackage -Package $package.packagefullname}}

Be aware of the fact that you need to run this code every time you reseal your sysprep image..!!

If the above code doesn’t work you can also try this one:

Import-Module Appx
Import-Module Dism
$packages = Get-AppxPackage -AllUser | Where PublisherId -eq 8wekyb3d8bbwe
foreach ($package in $packages) {Remove-AppxPackage -Package $package.packagefullname -AllUsers}

При запуске Sysprep вижу

В логах следующее:

2020-08-27 17:27:07, Info                  SYSPRP ========================================================
2020-08-27 17:27:07, Info                  SYSPRP ===          Beginning of a new sysprep run          ===
2020-08-27 17:27:07, Info                  SYSPRP ========================================================
2020-08-27 17:27:07, Info       [0x0f004d] SYSPRP The time is now 2020-08-27 17:27:07
2020-08-27 17:27:07, Info       [0x0f004e] SYSPRP Initialized SysPrep log at C:\Windows\System32\Sysprep\Panther
2020-08-27 17:27:07, Info       [0x0f0054] SYSPRP ValidatePrivileges:User has required privileges to sysprep machine
2020-08-27 17:27:07, Info       [0x0f007e] SYSPRP FCreateTagFile:Tag file C:\Windows\System32\Sysprep\Sysprep_succeeded.tag does not already exist, no need to delete anything
2020-08-27 17:27:07, Info       [0x0f003d] SYSPRP WinMain:Displaying dialog box for user to choose sysprep mode...
2020-08-27 17:27:09, Info       [0x0f00d7] SYSPRP WinMain:Pre-validing 'cleanup' internal providers.
2020-08-27 17:27:09, Info                  SYSPRP RunDlls:Running platform actions specified in action file for phase 3
2020-08-27 17:27:09, Info                  SYSPRP SysprepSession::CreateSession: Successfully created instance with action file C:\Windows\System32\Sysprep\ActionFiles\Cleanup.xml, and mode <null>
2020-08-27 17:27:09, Info                  SYSPRP SysprepSession::Validate: Beginning action execution from C:\Windows\System32\Sysprep\ActionFiles\Cleanup.xml
2020-08-27 17:27:09, Info                  SYSPRP SysprepSession::CreateXPathForSelection: Sysprep mode in registry is <null>
2020-08-27 17:27:09, Info                  SYSPRP SysprepSession::CreateXPathForSelection: Processor architecture in registry is AMD64
2020-08-27 17:27:09, Info                  SYSPRP ActionPlatform::LaunchModule: Executing method 'Sysprep_Clean_Validate_Opk' from C:\Windows\System32\spopk.dll
2020-08-27 17:27:09, Info                  CSI    00000001 Shim considered [l:125]'\??\C:\WINDOWS\Servicing\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.19041.441_none_e753a4f1261e4901\wcp.dll' : got STATUS_OBJECT_PATH_NOT_FOUND
2020-08-27 17:27:09, Info                  CSI    00000002 Shim considered [l:122]'\??\C:\WINDOWS\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.19041.441_none_e753a4f1261e4901\wcp.dll' : got STATUS_SUCCESS
2020-08-27 17:27:09, Info                  SYSPRP Sysprep_Clean_Validate_Opk: Successfully validated reserves state on the machine for entering audit mode.
2020-08-27 17:27:09, Info                  SYSPRP ActionPlatform::LaunchModule: Successfully executed 'Sysprep_Clean_Validate_Opk' from C:\Windows\System32\spopk.dll
2020-08-27 17:27:09, Info       [0x0f00d7] SYSPRP WinMain:Pre-validing 'generalize' internal providers.
2020-08-27 17:27:09, Info                  SYSPRP RunDlls:Running platform actions specified in action file for phase 1
2020-08-27 17:27:09, Info                  SYSPRP SysprepSession::CreateSession: Successfully created instance with action file C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml, and mode <null>
2020-08-27 17:27:09, Info                  SYSPRP SysprepSession::Validate: Beginning action execution from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml
2020-08-27 17:27:09, Info                  SYSPRP SysprepSession::CreateXPathForSelection: Sysprep mode in registry is <null>
2020-08-27 17:27:09, Info                  SYSPRP SysprepSession::CreateXPathForSelection: Processor architecture in registry is AMD64
2020-08-27 17:27:09, Info                  SYSPRP ActionPlatform::LaunchModule: Executing method 'SysprepGeneralizeValidate' from C:\Windows\System32\AppxSysprep.dll
2020-08-27 17:27:09, Info                  SYSPRP Entering SysprepGeneralizeValidate (Appx) - validating whether all apps are also provisioned.
2020-08-27 17:27:09, Error                 SYSPRP Package A025C540.Yandex.Music_4.21.7529.0_x64__vfvw9svesycw6 was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
2020-08-27 17:27:09, Error                 SYSPRP Failed to remove apps for the current user: 0x80073cf2.
2020-08-27 17:27:09, Error                 SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.
2020-08-27 17:27:09, Error                 SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SysprepGeneralizeValidate' from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2
2020-08-27 17:27:09, Error                 SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2
2020-08-27 17:27:09, Error                 SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x3cf2
2020-08-27 17:27:09, Error      [0x0f0070] SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2
2020-08-27 17:27:09, Error      [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2
2020-08-27 17:27:24, Info       [0x0f0052] SYSPRP Shutting down SysPrep log
2020-08-27 17:27:24, Info       [0x0f004d] SYSPRP The time is now 2020-08-27 17:27:24

Пробовал по разным мануалам бороться с первой ошибкой, ничего не помогло, пример:

Remove-AppxPackage A025C540.Yandex.Music_4.21.7529.0_x64__vfvw9svesycw6
Remove-AppxPackage : Сбой развертывания с HRESULT: 0x80073CF1, Пакет не найден.
Windows не удается удалить A025C540.Yandex.Music_4.21.7529.0_x64__vfvw9svesycw6, так как для текущего пользователя не установлен этот пакет. Для просмотра сп
иска установленных пакетов используйте Get-AppxPackage.
ПРИМЕЧАНИЕ. Чтобы получить дополнительные сведения, найдите [ActivityId] bbd975b2-7c7d-000a-b6ac-d9bb7d7cd601 в журнале событий или введите в командной строк
е Get-AppxLog -ActivityID bbd975b2-7c7d-000a-b6ac-d9bb7d7cd601.
строка:1 знак:1
+ Remove-AppxPackage A025C540.Yandex.Music_4.21.7529.0_x64__vfvw9svesyc ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (A025C540.Yandex...__vfvw9svesycw6:String) [Remove-AppxPackage], PSInvalidOperationException
    + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand

Что делать? Как заставить отработать Sysprep? Заранее благодарен за помощь.

Реализация DI в PHP

Jason-Webb 13.05.2025

Когда я начинал писать свой первый крупный PHP-проект, моя архитектура напоминала запутаный клубок спагетти. Классы создавали другие классы внутри себя, зависимости жостко прописывались в коде, а о. . .

Обработка изображений в реальном времени на C# с OpenCV

stackOverflow 13.05.2025

Объединение библиотеки компьютерного зрения OpenCV с современным языком программирования C# создаёт симбиоз, который открывает доступ к впечатляющему набору возможностей. Ключевое преимущество этого. . .

POCO, ACE, Loki и другие продвинутые C++ библиотеки

NullReferenced 13.05.2025

В C++ разработки существует такое обилие библиотек, что порой кажется, будто ты заблудился в дремучем лесу. И среди этого многообразия POCO (Portable Components) – как маяк для тех, кто ищет. . .

Паттерны проектирования GoF на C#

UnmanagedCoder 13.05.2025

Вы наверняка сталкивались с ситуациями, когда код разрастается до неприличных размеров, а его поддержка становится настоящим испытанием. Именно в такие моменты на помощь приходят паттерны Gang of. . .

Создаем CLI приложение на Python с Prompt Toolkit

py-thonny 13.05.2025

Современные командные интерфейсы давно перестали быть черно-белыми текстовыми программами, которые многие помнят по старым операционным системам. CLI сегодня – это мощные, интуитивные и даже. . .

Конвейеры ETL с Apache Airflow и Python

AI_Generated 13.05.2025

ETL-конвейеры – это набор процессов, отвечающих за извлечение данных из различных источников (Extract), их преобразование в нужный формат (Transform) и загрузку в целевое хранилище (Load). . . .

Выполнение асинхронных задач в Python с asyncio

py-thonny 12.05.2025

Современный мир программирования похож на оживлённый мегаполис – тысячи процессов одновременно требуют внимания, ресурсов и времени. В этих джунглях операций возникают ситуации, когда программа. . .

Работа с gRPC сервисами на C#

UnmanagedCoder 12.05.2025

gRPC (Google Remote Procedure Call) — открытый высокопроизводительный RPC-фреймворк, изначально разработанный компанией Google. Он отличается от традиционых REST-сервисов как минимум тем, что. . .

CQRS (Command Query Responsibility Segregation) на Java

Javaican 12.05.2025

CQRS — Command Query Responsibility Segregation, или разделение ответственности команд и запросов. Суть этого архитектурного паттерна проста: операции чтения данных (запросы) отделяются от операций. . .

Шаблоны и приёмы реализации DDD на C#

stackOverflow 12.05.2025

Когда я впервые погрузился в мир Domain-Driven Design, мне показалось, что это очередная модная методология, которая скоро канет в лету. Однако годы практики убедили меня в обратном. DDD — не просто. . .

When creating reference images for Windows 10 or Windows 11, Sysprep is very likely to fail if the machine has Internet access, and have enough time to start updating it’s built-in applications, or install new ones as part of the consumer experience feature. This post is about preventing that from happening, and is a companion to my guides on building Windows 10 and Windows 11 reference images.

The issue is explained in a KB from Microsoft, but it’s workaround are not very good for automation purposes.

Sysprep fails after you remove or update Windows Store apps that include built-in Windows images
http://support.microsoft.com/en-us/kb/2769827

Note #1: This is a quite long post, and if you just want the fix, scroll to the end, to the Fixing the problem section. But if you want to pick some background info, and possibly learn something new in the process, continue as you were 🙂

Note #2: Lately I have started to simply limit Internet access to the virtual machines I’m using for reference images, especially for Windows 11 that is quite aggressive in updating for example the OneDrive application.

Symptom

If modern apps in Windows 10 are being updated during the build and capture of a reference image, Sysprep may fail because it cannot remove the update. Note that this doesn’t happen all the time, it’s a timing issue, but it sure happen often enough to be an issue.

If that happens you will get the following error in the BDD.LOG and LTISysprep.log log files:

Expected image state is IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE, actual image state is IMAGE_STATE_COMPLETE, sysprep did not succeed.
FAILURE ( 6192 ): ERROR – Sysprep did not complete successfully, check C:windowssystem32syspreppanthersetupact.log for details

image

Then, in the C:WindowsSystem32SysprepPanthersetuperr.log you see the following (or similar):

Error                 SYSPRP Package Microsoft.DesktopAppInstaller_1.0.1471.0_x64__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
Error                 SYSPRP Failed to remove apps for the current user: 0x80073cf2.
Error                 SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.
Error      [0x0f0082] SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing ‘SysprepGeneralizeValidate’ from C:WindowsSystem32AppxSysprep.dll; dwRet = 0x3cf2
Error                 SYSPRP SysprepSession::Validate: Error in validating actions from C:WindowsSystem32SysprepActionFilesGeneralize.xml; dwRet = 0x3cf2
Error                 SYSPRP RunPlatformActions:Failed while validating SysprepSession actions; dwRet = 0x3cf2
Error      [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2
Error      [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2

 

Error from MDT when sysprep fails

This is what it looks like during the MDT build and capture process.

More Details of the modern apps

Now, the above log is quite obvious, an app named Microsoft.DesktopAppInstaller_1.0.1471.0 was being installed or updated, and Sysprep could not remove it.

To see which modern applications that you have in your system, for the Administrator user account in this case. You can just run Get-AppxPackage in a PowerShell prompt, or (Get-AppxPackage).count to see the number of apps. For a Windows 10 v1607 CB machine, that did not update any built-in updates, I had 54 apps installed. Whereas as system which had been allowed to update them had 58 apps.

getappnoupdates

A Windows 10 v1607 CB machine with no updates allowed, showing 54 apps.

getappwithupdates

A Windows 10 v1607 CB machine with updates allowed, showing 58 apps.

But what about apps being actually updated? Well, you can get additional info via the Event Viewer. You go to Microsoft / Windows / AppXDeployment-Server / Microsoft-Windows-AppXDeploymentServer / Operational and filter on Event ID 478 to see successful updates.

Eventviewer

The Event Viewer with a filter on ID 478 showing installations of modern apps.

More PowerShell

You can also view this using PowerShell, but you have to use the Get-WinEvent cmdlet, because Get-EventLog can handle only classic event logs (System/Setup/Application etc.).  So here is the command to list installations/updates for Windows 10 applications.

Get-WinEvent -LogName «Microsoft-Windows-AppXDeploymentServer/Operational» | Where-Object {$_.ID -eq 478} | Select TimeCreated,Message | Format-Table -AutoSize -Wrap

PowerShell listing of app preventing Sysprep

Using PowerShell to list event log entries of installed/updated applications in Windows 10.

If you compare the count of apps, from the event log, from a system having the apps being updated or not (by simply putting the command in parentheses, and add a .count), you find that a system allowed to have the apps updated will have over hundred of apps, whereas as system with no Internet access, or updates being disabled will have less than hundred.

Below is the out from a system without updates to the modern apps in Window
s 10 v1607 CB, a total of 82 entries for the apps. Another machine that I deployed, and allowed it to update, it ended up with 136 entries for the apps.

Count of apps

A Windows 10 machine with no updates, showing 82 entries for apps in the event log.

Count of apps from system with updates

A Windows 10 machine with updates, showing 136 entries for apps in the event log.

Fixing the problem

The obvious fix for the problem is denying the virtual machine Internet access. No Internet access means no updates breaking Sysprep 🙂

Update: Seems like setting HideShell=YES in cs.ini also prevents apps from coming down. Of course, that also stops you from doing anything interactive during the build and capture process, but hopefully you don’t need that once you nailed your task sequence. Big thanks to Roman Zuravljov for that tip.

But what if the preceding fix is not an option?

What if you need Internet access for other reasons? Well, keep on reading

Fix the Sysprep issues by adding a script to disable Store Updates as well as Consumer Experience Apps

Simply add a script that sets the needed registry values during the offline WinPE phase. So that Windows Store updates and the Consumer Experience features are disabled even before Windows 10 starts the first time. Very Shiny.

Note #1: The script has a dependency to ZTIUtility.vbs, so if put it into another folder, make sure to copy ZTIUtility.vbs with it, or update the reference in line 2 of the script.

Note #2: Disabling the Consumer Experience feature is only available for Enterprise and Education editions of Windows 10. So, if your using Windows 10 or Windows 11 Pro, you have to either disable Internet access or try the HideShell=YES settings in cs.ini.

Note #3: This script was initially developed for Windows 10 1709 and Windows 10 1809. I have not done much testing on newer versions of Windows 10, nor Windows 11. These days I typically just disable Internet access on the VM I’m building 🙂

Here is the script: http://github.com/DeploymentResearch/DRFiles/blob/master/Scripts/Config-DisableWindowsStoreUpdates.wsf

1. Copy the script to your deployment share / scripts folder, and configure your build and capture task sequence to run it in the Postinstall phase (WinPE phase).

Name: Disable Windows Store Updates
Command line: cscript.exe «%SCRIPTROOT%\Config-DisableWindowsStoreUpdates.wsf»

image

Task Sequence configured to disable updates of Windows Store applications during the first WinPE phase.

Enabling updates once again before capture

Unless you are enabling these features via GPO during deployment, it makes sense to enable them once again just before capture. Again in the offline WinPE phase.

Note: Also this script has a dependency to ZTIUtility.vbs, so if put it into another folder, make sure to copy ZTIUtility.vbs with it, or update the reference in line 2 of the script.

Here is the script: http://github.com/DeploymentResearch/DRFiles/blob/master/Scripts/Config-EnableWindowsStoreUpdates.wsf

1. Copy the script to your deployment share / scripts folder, and configure your build and capture task sequence to run it in the end of the State Restore phase (second WinPE phase).

Name: Enable Windows Store Updates
Command line: cscript.exe «%SCRIPTROOT%\Config-EnableWindowsStoreUpdates.wsf»

image

Task Sequence configured to enable updates of Windows Store applications just before capture.

Written by Johan Arwidmark.

Recent Visitor 508

One of the common issues I’ve continuously come across while preparing Windows 10 and Windows 2016 above operating systems for virtual desktops or remote desktop services is when sysprep fails due to an installed application linked to a user account. I ran encountered this issue again last month with the application Notepad++ when preparing a Windows 11 Enterprise Multi-Session virtual machine for an Azure Virtual Desktop deployment. There are plenty of different PowerShell cmdlets that can be run in an attempt to fix the issue, but I find some of them result with rendering the virtual machine in a state that I would no longer be confident in deploying so I wanted to some of the steps I use for personal reference and to help anyone who may encounter a similar issue.

Problem

You attempt to run sysprep after finishing the preparation of a master image:

problem

Sysprep immediately fails with the error:

Sysprep was not able to validate your Windows installation.
Review the log file at
%WINDIR%System32SysprepPanthersetupact.log for
details. After resolving the issue, use Sysprep to validate your installation again.

WINDIR

Opening the setupact.log will reveal the following line:

Error                 SYSPRP Package NotepadPlusPlus_1.0.0.0_neutral__7njy0v32s6xk6 was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.

provisioned

Opening the setuperr.log will reveal the following lines:

2023-05-05 07:20:10, Error                 SYSPRP BCD: BiUpdateEfiEntry failed c000000d

2023-05-05 07:20:10, Error                 SYSPRP BCD: BiExportBcdObjects failed c000000d

2023-05-05 07:20:10, Error                 SYSPRP BCD: BiExportStoreAlterationsToEfi failed c000000d

2023-05-05 07:20:10, Error                 SYSPRP BCD: Failed to export alterations to firmware. Status: c000000d

2023-07-07 19:51:46, Error                 SYSPRP Package NotepadPlusPlus_1.0.0.0_neutral__7njy0v32s6xk6 was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.

2023-07-07 19:51:46, Error                 SYSPRP Failed to remove apps for the current user: 0x80073cf2.

2023-07-07 19:51:46, Error                 SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.

2023-07-07 19:51:46, Error                 SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing ‘SysprepGeneralizeValidate’ from C:WindowsSystem32AppxSysprep.dll; dwRet = 0x3cf2

2023-07-07 19:51:46, Error                 SYSPRP SysprepSession::Validate: Error in validating actions from C:WindowsSystem32SysprepActionFilesGeneralize.xml; dwRet = 0x3cf2

2023-07-07 19:51:46, Error                 SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x3cf2

2023-07-07 19:51:46, Error      [0x0f0070] SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2

2023-07-07 19:51:46, Error      [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2

solution

Proceeding to uninstall Notepad++ from the image will allow sysprep to run and complete successfully but this means the deployed virtual desktops would need the application installed manually.

Solution

The first step to take for resolving this issue is to restore the virtual machine from a snapshot that had not failed on a sysprep because the sysprep process removes packages from the operating system and there will be times when:

  1. After fixing the Notepad++ application, sysprep would fail and error out on other native Microsoft applications
  2. You would notice that Notepad is no longer available on the virtual machine
  3. Other odd errors would occur

It is better to troubleshoot and perform sysprep on a machine that has no experienced a half executed but failed sysprep.

Once a fresh snapshot is restored, we can now work on determining which accounts Notepad++ is linked to. This can reviewed by starting PowerShell and executing the following cmdlet:

Get-AppxPackage -AllUser | Format-List -Property PackageFullName,PackageUserInformation

The cmdlet above will list all packages installed and this example coincidentally places the Notepad++ package at the end of the output:

Get-AppxPackage

If the package in question starts with a letter earlier than M (for Microsoft) and results in being nested within the long output, we can use the following cmdlet to filter the PackageFullName to what is being searched for:

Get-AppxPackage -AllUser | Where-Object {$_.PackageFullName -like “NotepadPlusPlus*”} | Format-List -Property PackageFullName,PackageUserInformation

With the package located identify which accounts are listed to have the application installed. The screenshot above only lists one account but if there are more, the easiest approach is to delete all the accounts and their profiles. If there is only one account listed and it is the built-in administrator account, you won’t be able to delete it because the following error will be displayed when you try to do so:

The following error occurred while attempting to delete the user admin:

Cannot perform this operation on built-in accounts.

Cannot perform

To get around this, log in as the account with Notepad++ install linked to, launch PowerShell and execute the following cmdlet:

Remove-AppxPackage -Package <packagefullname>

The following is the cmdlet that is used to remove Notepad++ from the account:

Remove-AppxPackage -Package NotepadPlusPlus_1.0.0.0_neutral__7njy0v32s6xk6

The following

You should no longer find the Notepad++ when executing the following cmdlet:

Get-AppxPackage -AllUser | Where-Object {$_.PackageFullName -like “NotepadPlusPlus*”} | Format-List -Property PackageFullName,PackageUserInformation

Where-Object

Running sysprep should now complete so the virtual machine can be captured to an image for session host deployments.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Переподключение pppoe windows 10
  • Pnp detected fatal error windows server 2012
  • Как установить tex live на windows
  • Как сделать локального администратора в windows 10 в домене
  • Как поменять обои если не активирован windows 10