批量安装 MSU 补丁包
本地安装脚本,需要将脚本与 MSU 补丁包放在同一目录。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
@echo off mode con cols=120 lines=360 title Windows patch color 1F echo Installing Windows patch, please wait...... echo ----------------------------------------------------------------- cd /d %~dp0 del /f /q Patch.log for /f %%i in ('dir /L /B /ON "*.msu"') do ( echo Installing %%i start /wait wusa "%%i" /quiet /norestart echo Installed %%i >>Patch.log type Patch.log | find /v /c "" ) echo !!! Please save the document !!! echo Patch installation completed, enter any key to restart. pause shutdown -r -t 0 |
共享服务器安装脚本,脚本可以独立运行。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
@echo off mode con cols=120 lines=360 title Windows patch color 1F echo Installing Windows patch, please wait...... echo ----------------------------------------------------------------- del /f /q %TEMP%\Patch.log for /f %%i in ('dir /L /S /B /ON "\\192.168.1.20\hotfix\*.msu"') do ( echo Installing %%i start /wait wusa "%%i" /quiet /norestart echo Installed %%i >>%TEMP%\Patch.log type %TEMP%\Patch.log | find /v /c "" ) echo !!! Please save the document !!! echo Patch installation completed, enter any key to restart. pause shutdown -r -t 0 |
导已安装补丁列表出
MS DOS 导出方法:
wmic /output:D:\HotfixList.txt QFE Get CSName,Description,HotFixID,InstalledOn,Caption
PowerShell 导出方法:
Get-Hotfix | Select-Object -Property CSName,Description,HotFixID,InstalledOn,Caption | Export-CSV D:\InstalledHotfixList.csv
强制安装 MSU 补丁包
mkdir cab
Expand –F:* Windows*.msu cab
DISM.exe /Online /Add-Package /PackagePath:cab\Windows*.cab
相关日志:C:\Windows\Logs\DISM\dism.log; C:\Windows\Logs\CBS\cbs.log
卸载指定 KB 补丁
wusa /uninstall /kb:2506928 /quiet /warnrestart:600
补丁更新卡死强制回退
- 强制关机并开机,F8 快捷键进入引导选项、修复计算机模式,打开 CMD 命令提示符;
- 或通过 Windows 系统引导安装光盘进入后按 Shift + F10 调出 CMD 命令提示符;
- 执行以下操作:
1234567cd /d D:\Windows\winsxsREN pending.xml pending.oldREG LOAD HKLM\abc D:\Windows\System32\config\COMPONENTSREG DELETE "HKLM\abc\PendingXmldentifier" /fREG DELETE "HKLM\abc\NextQueueEntryIndex" /fREG DELETE "HKLM\abc\AdvancedInstallersNeedResolving" /fREG UNLOAD HKLM\abc - 重新启动
月度汇总补丁
- Microsoft Update Catalog
- Windows 10 版本信息
- Windows 10版本 1607 和 Windows Server 2016 更新历史记录
- Windows 10 版本 1809 和 Windows Server 2019 更新历史记录
- Windows 8.1 和 Windows Server 2012 R2 更新历史记录,注:Windows 8.1 非扩展安全更新(ESU)用户于2023年1月10日停止支持
- Windows 7 SP1 和 Windows Server 2008 R2 SP1 更新历史记录,注:Windows 7 SP1 非扩展安全更新(ESU)用户于2020年1月14日停止支持
文章出自: 本站技术文章均为原创,版权归 "Desen往事 - 个人博客" 所有;部分图片来源于 Yandex ,转载本站文章请注明来源。
本文标题:Windows 更新独立安装