欢迎各位兄弟 发布技术文章
这里的技术是共享的
2025-10-06 19:46:02, Info SYSPRP ======================================================== 2025-10-06 19:46:02, Info SYSPRP === Beginning of a new sysprep run === 2025-10-06 19:46:02, Info SYSPRP ======================================================== 2025-10-06 19:46:02, Info [0x0f004d] SYSPRP The time is now 2025-10-06 19:46:02 2025-10-06 19:46:02, Info [0x0f004e] SYSPRP Initialized SysPrep log at C:\Windows\System32\Sysprep\Panther 2025-10-06 19:46:02, Info [0x0f0054] SYSPRP ValidatePrivileges:User has required privileges to sysprep machine 2025-10-06 19:46:02, Info [0x0f007e] SYSPRP FCreateTagFile:Tag file C:\Windows\System32\Sysprep\Sysprep_succeeded.tag does not already exist, no need to delete anything 2025-10-06 19:46:02, Info [0x0f003d] SYSPRP WinMain:Displaying dialog box for user to choose sysprep mode... 2025-10-06 19:46:05, Info [0x0f00d7] SYSPRP WinMain:Pre-validing 'cleanup' internal providers. 2025-10-06 19:46:05, Info SYSPRP RunDlls:Running platform actions specified in action file for phase 3 2025-10-06 19:46:05, Info SYSPRP SysprepSession::CreateSession: Successfully created instance with action file C:\Windows\System32\Sysprep\ActionFiles\Cleanup.xml, and mode <null> 2025-10-06 19:46:05, Info SYSPRP SysprepSession::Validate: Beginning action execution from C:\Windows\System32\Sysprep\ActionFiles\Cleanup.xml 2025-10-06 19:46:05, Info SYSPRP SysprepSession::CreateXPathForSelection: Sysprep mode in registry is <null> 2025-10-06 19:46:05, Info SYSPRP SysprepSession::CreateXPathForSelection: Processor architecture in registry is AMD64 2025-10-06 19:46:05, Info SYSPRP ActionPlatform::LaunchModule: Executing method 'Sysprep_Clean_Validate_Opk' from C:\Windows\System32\spopk.dll 2025-10-06 19:46:05, Info CSI 00000001 Shim considered [l:125]'\??\C:\Windows\Servicing\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.19041.262_none_e73f0197262d9fec\wcp.dll' : got STATUS_OBJECT_PATH_NOT_FOUND 2025-10-06 19:46:05, Info CSI 00000002 Shim considered [l:122]'\??\C:\Windows\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.19041.262_none_e73f0197262d9fec\wcp.dll' : got STATUS_SUCCESS 2025-10-06 19:46:05, Info SYSPRP Sysprep_Clean_Validate_Opk: Successfully validated reserves state on the machine for entering audit mode. 2025-10-06 19:46:05, Info SYSPRP ActionPlatform::LaunchModule: Successfully executed 'Sysprep_Clean_Validate_Opk' from C:\Windows\System32\spopk.dll 2025-10-06 19:46:05, Info [0x0f00d7] SYSPRP WinMain:Pre-validing 'generalize' internal providers. 2025-10-06 19:46:05, Info SYSPRP RunDlls:Running platform actions specified in action file for phase 1 2025-10-06 19:46:05, Info SYSPRP SysprepSession::CreateSession: Successfully created instance with action file C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml, and mode <null> 2025-10-06 19:46:05, Info SYSPRP SysprepSession::Validate: Beginning action execution from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml 2025-10-06 19:46:05, Info SYSPRP SysprepSession::CreateXPathForSelection: Sysprep mode in registry is <null> 2025-10-06 19:46:05, Info SYSPRP SysprepSession::CreateXPathForSelection: Processor architecture in registry is AMD64 2025-10-06 19:46:05, Info SYSPRP ActionPlatform::LaunchModule: Executing method 'SysprepGeneralizeValidate' from C:\Windows\System32\AppxSysprep.dll 2025-10-06 19:46:05, Info SYSPRP Entering SysprepGeneralizeValidate (Appx) - validating whether all apps are also provisioned. 2025-10-06 19:46:05, Error SYSPRP Package Microsoft.LanguageExperiencePackzh-CN_19041.81.277.0_neutral__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image. 2025-10-06 19:46:05, Error SYSPRP Failed to remove apps for the current user: 0x80073cf2. 2025-10-06 19:46:05, Error SYSPRP Exit code of RemoveAllApps thread was 0x3cf2. 2025-10-06 19:46:05, Error SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SysprepGeneralizeValidate' from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2 2025-10-06 19:46:05, Error SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2 2025-10-06 19:46:05, Error SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x3cf2 2025-10-06 19:46:05, Error [0x0f0070] SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2 2025-10-06 19:46:05, Error [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2
这个错误日志说明 Sysprep 在 “Generalize(通用化)” 阶段失败,主要原因是有某个 Appx(UWP 应用包)安装状态不一致。
我们来详细分析一下关键几行日志:
意思是:
“Microsoft.LanguageExperiencePackzh-CN(中文语言体验包)” 被安装在某个用户下,但没有为所有用户预配(provisioned for all users),因此 sysprep 认为镜像状态不一致。
紧接着:
错误代码:
意思是:
某个 Appx 包删除失败,因为它正被使用、或系统认为它未能正确注册。
Sysprep 不能继续执行,因为:
有 UWP 应用(特别是语言包)仅安装给某个用户,而不是系统全局;
Sysprep 的“通用化”要求所有 Appx 包必须为“全局预配”(即出现在 Get-AppxProvisionedPackage
列表里);
语言体验包(LanguageExperiencePack)尤其常出问题。
你需要在封装前清理掉这些“多余用户安装的 Appx 包”。
以下是详细步骤(推荐在 PE 或 Administrator 下执行):
以管理员身份打开 PowerShell,依次执行:
如果提示“找不到包”或“删除失败”,用下面更强的方式:
⚠️ 这会删除所有内置 UWP 应用(包括 Store),如果你只想保留基础系统,可以这样。
语言体验包通常名字里包含 LanguageExperiencePack
:
执行:
确保没有残留的语言体验包。
然后重新运行 Sysprep 即可。
问题 | 原因 | 解决方式 |
---|---|---|
0x80073cf2 | 某 Appx(语言体验包)仅安装给某用户 | 删除该包(AllUsers + Provisioned) |
LanguageExperiencePackzh-CN 报错 | 中文语言体验包安装状态不一致 | 删除该包或重新安装为全局包 |
Sysprep 无法 Generalize | UWP 应用未清理干净 | 用 PowerShell 清理所有 Appx |
如果你用 EasySysprep,建议在第二次封装(PE 阶段)前执行一次以上 PowerShell 脚本清理,能彻底解决类似报错。
是否希望我帮你写一段“自动清理所有会导致 Sysprep 报错的 Appx 包”的一键 PowerShell 脚本?