当前位置:网站首页 > 更多 > 玩电脑 > 正文

[玩转系统] 修复 Windows Server 2016/Windows 10 上的 Windows 更新和 DISM 错误 0x80073712

作者:精品下载站 日期:2024-12-14 20:07:50 浏览:17 分类:玩电脑

修复 Windows Server 2016/Windows 10 上的 Windows 更新和 DISM 错误 0x80073712


我在 Windows Server 2016 上尝试安装安全更新时遇到错误代码 0x80073712。后来我发现,此错误与损坏的 Windows 组件存储有关。在本文中,我们将了解如何修复 Windows 10 或 Windows Server 2016/2012 R2 中的组件存储并恢复 Windows 更新服务的正确操作。

尝试在 Windows Update 中安装更新时,出现错误:

Some update files are missing or have problems. We’ll try to download the update.
Error code: (0x80073712)

[玩转系统] 修复 Windows Server 2016/Windows 10 上的 Windows 更新和 DISM 错误 0x80073712

首先,我尝试按照“如何重置 Windows 更新设置?”一文中的建议重置 Windows 更新代理设置并清理 SoftwareDistribution 目录。 ”,但这并没有帮助。

然后使用

dism /online /get-packages

命令中,我检查了所有系统更新是否都处于已安装状态。

[玩转系统] 修复 Windows Server 2016/Windows 10 上的 Windows 更新和 DISM 错误 0x80073712

如果任何更新处于安装待定状态,您可以使用此 DISM 命令正确删除它们(使用您的程序包标识字符串):

DISM.exe /Online /Remove-Package /PackageName:Package_for_KB4520724~31bf3856ad364e35~amd64~~14393.3320.1.1 /quiet /norestart

我花了很长时间才找到解决此 Windows Update 错误的方法,但在故障排除过程中,我必须在 Windows Server 2016 上安装 .Net Framework 3.5。在使用 DISM 命令安装 .Net 组件期间,出现了典型错误,这为我提供了进一步操作的关键:

The request to add or remove features on the specified server failed. Installation of one or more roles, role services or features failed. The component store has been corrupted. Error: 0x80073712.

[玩转系统] 修复 Windows Server 2016/Windows 10 上的 Windows 更新和 DISM 错误 0x80073712

同时,您可以在CBS.log (%WinDir%\Logs\CBS\CBS.log) 中找到以下错误:

[HRESULT = 0x80073712 - ERROR_SXS_COMPONENT_STORE_CORRUPT]

如您所见,您计算机上的组件存储由于某种原因已损坏。因此,Windows Update 无法从 CBS(基于组件的服务)清单获取安装更新所需的数据。您可以使用内置 DISM 功能恢复组件存储。

在最简单的情况下,您不需要 Windows 安装映像(磁盘)来恢复组件存储。然后系统将使用本地磁盘和 Windows Update 网站上的源组件存储文件进行恢复(本地 WSUS 服务器无法用于恢复组件存储)。

首先,使用以下命令检查组件存储状态:

dism /online /cleanup-image /checkhealth

如果您在分析后看到“组件存储可修复”消息,您可以尝试使用以下命令恢复组件存储:

dism /online /cleanup-image /restorehealth

在某些情况下,这样做就足够了。但在我的情况下 DISM 返回了这个错误:

Error: 0x800f0906
The source files could not be downloaded.

在这种情况下,要恢复 Windows,您需要一张包含 Windows 发行版的安装磁盘。假设您已安装 Windows Server 安装 ISO 文件。然后检查已安装映像(磁盘)上的 install.wim 文件中的当前 Windows 版本列表:

dism /Get-WimInfo /WimFile:e:\sources\install.wim

[玩转系统] 修复 Windows Server 2016/Windows 10 上的 Windows 更新和 DISM 错误 0x80073712

我安装了 Windows Server 2016 Standard(桌面体验),因此我将在以下命令中使用其索引 (2):

dism /online /cleanup-image /restorehealth /source:e:\sources\install.wim:2 /LimitAccess

再次检查组件存储的状态:

Dism /Online /Cleanup-Image /CheckHealth

DISM 应返回:

No component store corruption detected

[玩转系统] 修复 Windows Server 2016/Windows 10 上的 Windows 更新和 DISM 错误 0x80073712

恢复组件存储后,重新启动 Windows 并确保 Windows 更新

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯