-
批量安装 MSU 补丁包
-
导已安装补丁列表出
-
强制安装 MSU 补丁包
-
卸载指定 KB 补丁
-
补丁更新卡死强制回退
本地安装脚本,需要将脚本与 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
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
wusa /uninstall /kb:2506928 /quiet /warnrestart:600
1. 强制关机并开机,F8 快捷键进入引导选项、修复计算机模式,打开 CMD 命令提示符;
2. 或通过 Windows 系统引导安装光盘进入后按 Shift + F10 调出 CMD 命令提示符;
3. 执行以下操作:
1 2 3 4 5 6 7 |
cd /d D:\Windows\winsxs REN pending.xml pending.old REG LOAD HKLM\abc D:\Windows\System32\config\COMPONENTS REG DELETE "HKLM\abc\PendingXmldentifier" /f REG DELETE "HKLM\abc\NextQueueEntryIndex" /f REG DELETE "HKLM\abc\AdvancedInstallersNeedResolving" /f REG UNLOAD HKLM\abc |