将更新添加到装载的映像或联机映像。 对于具有依赖关系的包,可以按顺序安装包,也可以使用单个 DISM 命令一次性全部添加。
示例:向装载或脱机映像添加累积更新:
Dism /Image:"C:\mount\windows" /Add-Package /PackagePath="windows10.0-kb4456655-x64_fca3f0c885da48efc6f9699b0c1eaf424e779434.msu" /LogPath=C:\mount\dism.log
重要
如果在将更新应用到目标设备后将更新添加到脱机映像,请重新运行 BCDBoot,以确保将更新中的任何更新启动文件复制到系统分区。
示例:将累积更新添加到正在运行的 Windows 安装:
Dism /Online /Add-Package /PackagePath="windows10.0-kb4456655-x64_fca3f0c885da48efc6f9699b0c1eaf424e779434.msu" /LogPath=C:\mount\dism.log
示例:添加多个更新:
Dism /Image:"C:\mount\windows" /Add-Package /PackagePath="C:\WindowsUpdates\windows10.0-kb00001-x64.msu" /PackagePath="C:\WindowsUpdates\windows10.0-kb00002-x64.msu" /PackagePath="C:\WindowsUpdates\windows10.0-kb00003-x64.msu" /LogPath=C:\mount\dism.log