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

[玩转系统] Windows 更新在将包复制到更新缓存时卡住

作者:精品下载站 日期:2024-12-14 23:14:55 浏览:15 分类:玩电脑

Windows 更新在将包复制到更新缓存时卡住


我在 Windows Server 2016 上安装更新时遇到了一个奇怪的问题。我的主机从 WSUS 服务器收到更新,尝试自动安装它们,但卡在百分之几处。 Wuaserv 重启、服务器重启、WindowsUpdate.log 中的错误搜索都没有用。

我尝试从 Windows 更新目录手动下载累积更新,并使用 WUSA(Windows 更新独立安装程序)安装 MSU 更新包。但 WUSA 安装程序每次都卡住

Copying packages to the Windows Update cache

。更新安装是无止境的......

[玩转系统] Windows 更新在将包复制到更新缓存时卡住

我通过重置本地 Windows 更新缓存设法解决了该问题。打开提升的命令提示符并运行以下命令:

net stop wuauserv
net stop cryptSvc
net stop bits
net stop msiserver

然后确保 wuaserv 进程已停止且未挂起。使用以下 PowerShell 代码更容易检查进程状态:

$id = Get-WmiObject -Class Win32_Service -Filter "Name LIKE 'wuauserv'" | Select-Object -ExpandProperty ProcessId
$process = Get-Process -Id $id

如果该进程正在运行,请将其停止:

$process| Stop-Process

[玩转系统] Windows 更新在将包复制到更新缓存时卡住

del /f /q "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat"
del /f /s /q %SystemRoot%\SoftwareDistribution\*.*
del /f /s /q %SystemRoot%\system32\catroot2\*.*
del /f /q %SystemRoot%\WindowsUpdate.log
net start wuauserv
net start cryptSvc
net start bits
net start msiserver

清理缓存后,运行更新搜索。确保现在已正确安装 Windows 更新。最有可能的是,在更新安装挂起时清除缓存的解决方案在其他版本的 Windows(Windows 10、Windows Server 2019 等)中也将有效。

还有另一种情况是 Windows Server 2016 无法通过代理下载更新。

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

取消回复欢迎 发表评论:

关灯