Win10镜像集成离线补丁
因为正常安装系统后再打补丁比较漫长,可以事先做好打过补丁的iso,备将来使用。
以管理员身份运行cmd,然后通过dism提取、挂载、集成补丁、保存install.wim镜像,最后用iso工具替换即可。 独立补丁下载:
最新的Win10 1607和Windows Server 2016补丁信息:
https://support.microsoft.com/en-us/help/4000825/windows-10-windows-server-2016-update-history
最新的Win10 1703补丁信息:
https://support.microsoft.com/en-us/help/4018124
选择一个最新的补丁(在最上方)后,点击页面内容里的Microsoft Update Catalog链接
How to get this update
----------------------
To get the standalone package for this update, go to the _Microsoft Update Catalog_ website.
下载累计更新。 补丁查询页面:
http://www.catalog.update.microsoft.com/home.aspx 制作集成补丁的iso详细步骤:
1. 查看镜像源install.wim的索引号
先将iso文件载入虚拟光驱,这里是G:盘,执行下面命令
C:\>dism /get-imageinfo /imagefile:G:\sources\install.wim Deployment Image Servicing and Management tool
Version: 10.0.14393.0 Details for image : G:\sources\install.wim Index : 1
Name : Windows 10 企业版 2016 长期服务版
Description : Windows 10 企业版 2016 长期服务版
Size : 12,555,951,804 bytes The operation completed successfully. 2. 提取镜像源install.wim加索引的镜像到本地磁盘install_exp.wim
下面提取命令成功后,就可以弹出虚拟光驱了。
C:\>dism /export-image /sourceimagefile:G:\sources\install.wim /sourceindex:1 /destinationimagefile:D:\install_exp.wim Deployment Image Servicing and Management tool
Version: 10.0.14393.0 Exporting image
[==========================100.0%==========================]
The operation completed successfully. 3. 挂载install_exp.wim到一个文件夹
注意:被挂在的目标文件夹不能是ReFS文件系统
C:\>mkdir D:\mount
C:\>dism /mount-wim /wimfile:D:\install_exp.wim /index:1 /mountdir:D:\mount Deployment Image Servicing and Management tool
Version: 10.0.14393.0 Mounting image
[==========================100.0%==========================]
The operation completed successfully. 4. 将要被集成的补丁文件,集中放到一个文件夹里
这里假设在D:\package 5. 应用补丁到挂载文件夹(时间较长)
C:\>dism /image:D:\mount /add-package /packagepath:D:\package Deployment Image Servicing and Management tool
Version: 10.0.14393.0 Image Version: 10.0.14393.0 Processing 1 of 1 - Adding package D:\package\windows10.0-kb4039396-x64_bd1f9e1c7add02b8f3334f1aeaa07cae6632c3cf.msu
[==========================100.0%==========================]
The operation completed successfully. 6. 清理镜像WinSxS,清理后会减少体积,但将不能卸载集成过的补丁(时间较长,可跳过)
C:\>dism /image:D:\mount /cleanup-image /startcomponentcleanup /resetbase Deployment Image Servicing and Management tool
Version: 10.0.14393.0 Image Version: 10.0.14393.0 [==========================100.0%==========================]
The operation completed successfully. 7. 卸载镜像保存修改(时间较长)
C:\>dism /unmount-wim /mountdir:D:\mount /commit Deployment Image Servicing and Management tool
Version: 10.0.14393.0 Image File : D:\install_exp.wim
Image Index : 1
Saving image
[==========================100.0%==========================]
Unmounting image
[==========================100.0%==========================]
The operation completed successfully. 8. 制作ISO
1) 用imagex将这个wim最大化压缩导出新的install.wim
注:如果没有imagex,可以直接把install_exp.wim重命名为install.wim,但是文件会比较大。
C:\>imagex /export D:\install_exp.wim 1 D:\install.wim /compress maximum ImageX Tool for Windows
Copyright (C) Microsoft Corp. All rights reserved.
Version: 6.3.9600.16384 Exporting: [D:\install_exp.wim, 1] ->
[D:\install.wim] [ 100% ] Exporting progress Successfully exported image #1. Total elapsed time: 59 sec 2) 将原ISO复制一份出来。假设新iso命名为cn_windows_10_enterprise_2016_ltsb_x64_with_kb4039396.iso
3) 用UltraISO等工具将install.wim替换到新iso文件sources下同名文件,保存完成。
----------
说明:如果不用UltraISO,可以使用微软官方的Windows ADK工具(完整的的Windows 8.1版本有4.1GB)
其中的oscdimg命令可以制作iso
命令帮助:https://technet.microsoft.com/zh-cn/library/cc749036(v=ws.10).aspx
ADK介绍:https://msdn.microsoft.com/zh-cn/library/hh825420.aspx
ADK下载页面:http://go.microsoft.com/fwlink/?LinkId=293840
下面是离线下载Windows ADK的方法:
1. 首先到下载页面下载到最新的Windows ADK安装在线安装程序adksetup.exe
2. 在cmd下离线下载
C:\>adksetup.exe /layout D:\adk
也可以按功能安装,详细见 https://msdn.microsoft.com/zh-cn/library/hh825494.aspx ----------
制作install.wim合集
以Windows Server 2016为例,MSDN版本包含了4个镜像。
在分别制作好wim文件,注意用imagex按相同的压缩方式(建议/compress maximum)导出4个wim,假设为:
install1.wim
install2.wim
install3.wim
install4.wim
合并命令:
C:\>dism /Export-Image /SourceImageFile:D:\install1.wim /SourceIndex:1 /DestinationImageFile:D:\install.wim
C:\>dism /Export-Image /SourceImageFile:D:\install2.wim /SourceIndex:1 /DestinationImageFile:D:\install.wim
C:\>dism /Export-Image /SourceImageFile:D:\install3.wim /SourceIndex:1 /DestinationImageFile:D:\install.wim
C:\>dism /Export-Image /SourceImageFile:D:\install4.wim /SourceIndex:1 /DestinationImageFile:D:\install.wim
全部合并到install.wim,替换iso,完成。

patchwim.bat

::patchwim.bat sourceWim index packagePath mountPath outputPath [/nointeraction]
::patchwim.bat g:\sources\install.wim 1 D:\package D:\mount D:\output
@echo off
pushd %~dp0
set sourceWim="%~1"
set index=%2
set packagePath="%~3"
set mountPath="%~4"
set outputPath=%~5
set nointeraction=%6
set outputWim="%outputPath%\install_%index%.wim"
set outputWimFinal="%outputPath%\install%index%.wim"
echo sourceWim: %sourceWim%
echo index: %index%
echo packagePath: %packagePath%
echo mountPath: %mountPath%
echo outputPath: "%outputPath%"
echo outputWim: %outputWim%
echo outputWimFinal: %outputWimFinal%
if "%outputPath%"=="" goto :help
if not exist %packagePath% goto :err1
if /i "%nointeraction%"=="/nointeraction" goto :start
set /p tmpInput=Are you ready? (Y/N):
if /i "%tmpInput%"=="y" goto :start
goto :eof
:start
if not exist %mountPath% md %mountPath%
if not exist "%outputPath%" md "%outputPath%" echo dism /export-image /sourceimagefile:%sourceWim% /sourceindex:%index% /destinationimagefile:%outputWim%
dism /export-image /sourceimagefile:%sourceWim% /sourceindex:%index% /destinationimagefile:%outputWim%
if errorlevel 1 goto :error echo dism /mount-wim /wimfile:%outputWim% /index:1 /mountdir:%mountPath%
dism /mount-wim /wimfile:%outputWim% /index:1 /mountdir:%mountPath%
if errorlevel 1 goto :error echo dism /image:%mountPath% /add-package /packagepath:%packagePath%
dism /image:%mountPath% /add-package /packagepath:%packagePath%
if errorlevel 1 goto :error echo dism /image:%mountPath% /cleanup-image /startcomponentcleanup /resetbase
dism /image:%mountPath% /cleanup-image /startcomponentcleanup /resetbase
if errorlevel 1 goto :error echo dism /unmount-wim /mountdir:%mountPath% /commit
dism /unmount-wim /mountdir:%mountPath% /commit
if errorlevel 1 goto :error echo imagex /export %outputWim% 1 %outputWimFinal% /compress maximum
imagex /export %outputWim% 1 %outputWimFinal% /compress maximum
if errorlevel 1 goto :error del /q %outputWim%
echo Completed.
goto :end :error
echo ERRORLEVEL: %ERRORLEVEL%
goto :end :err1
echo ERROR: The packagePath(%packagePath%) is not exist!
goto :end :help
echo.
echo Usage:
echo patchwim.bat sourceWim index packagePath mountPath outputPath [/nointeraction]
echo /nointeraction: No interaction
echo Example:
echo (1) patchwim.bat g:\sources\install.wim 1 D:\package D:\mount D:\output
echo (2) autopatch.bat:
echo patchwim.bat g:\sources\install.wim 1 D:\package D:\mount D:\output /nointeraction
echo patchwim.bat g:\sources\install.wim 2 D:\package D:\mount D:\output /nointeraction
echo patchwim.bat g:\sources\install.wim 3 D:\package D:\mount D:\output /nointeraction
echo patchwim.bat g:\sources\install.wim 4 D:\package D:\mount D:\output /nointeraction
echo. :end
if /i "%nointeraction%"=="/nointeraction" goto :eof
echo Press any key to EXIT...
pause>nul
popd

patchwimall.bat

::patchwimall.bat sourceWim packagePath mountPath outputPath [/nointeraction]
::patchwimall.bat g:\sources\install.wim D:\package D:\mount D:\output
@echo off
pushd %~dp0
set patchwim=patchwim.bat
set sourceWim="%~1"
set packagePath="%~2"
set mountPath="%~3"
set outputPath=%~4
set nointeraction=%5
for /f "delims=: tokens=2" %%a in ('imagex /info %sourceWim%^|find /i "Image Count:"') do set imageCount=%%a
set outWim="%outputPath%\install.wim"
echo sourceWim: %sourceWim%
echo imageCount: %imageCount%
echo packagePath: %packagePath%
echo mountPath: %mountPath%
echo outputPath: "%outputPath%"
echo outWim: %outWim%
if "%outputPath%"=="" goto :help
if not exist %packagePath% goto :err1
if not exist %patchwim% goto :err2
if /i "%nointeraction%"=="/nointeraction" goto :start
set /p tmpInput=Are you ready? (Y/N):
if /i "%tmpInput%"=="y" goto :start
goto :eof
:start
for /l %%a in (1,1,%imageCount%) do (
call %patchwim% %sourceWim% %%a %packagePath% %mountPath% "%outputPath%" /nointeraction
)
if %imageCount% equ 1 goto :rename
for /l %%a in (1,1,%imageCount%) do (
dism /Export-Image /SourceImageFile:"%outputPath%\install%%a.wim" /SourceIndex:1 /DestinationImageFile:%outWim%
)
goto :complete
:rename
move /y "%outputPath%\install1.wim" %outWim%
goto :complete
:complete
echo All Completed! ImageInfo:
dism /get-imageinfo /imagefile:%outWim%
goto :end :err1
echo ERROR: The packagePath(%packagePath%) is not exist!
goto :end :err2
echo ERROR: %patchwim% is not found!
goto :end :help
echo.
echo Usage:
echo patchwimall.bat sourceWim packagePath mountPath outputPath [/nointeraction]
echo /nointeraction: No interaction
echo Example:
echo patchwimall.bat g:\sources\install.wim D:\package D:\mount D:\output
echo. :end
if /i "%nointeraction%"=="/nointeraction" goto :eof
echo Press any key to EXIT...
pause>nul
popd

Win10/Server2016镜像集成离线补丁的更多相关文章

  1. Visual Studio 2012 Update 1 离线升级包(相当于VS2012 SP1离线补丁包)

    Visual Studio 2012 Update 1 发布也有一段时间了,吾乐吧尝试了好几次在线升级,但是网络不给力啊,结果都失败了.于是一直都想找到官方提供的VS2012 SP1完整离线升级包,不 ...

  2. 适用于Win8的Office2003_SP3精简版集成各类补丁+兼容包

    适用于Win8的Office2003_SP3精简版集成各类补丁+兼容包软件名称: Office 软件版本: Office2003_SP3 软件大小: 104M 软件语言: 简体中文 软件授权: 破解 ...

  3. Jenkins-slave 镜像集成 docker 和 kubectl

    1.说明 对官方的 jenkins/jnlp-slave 镜像集成 docker 和 kubectl 命令. 2.Dockerfile 文件 该镜像底层采用的是 Debian 系统,先更改下载源,然后 ...

  4. Visual Studio 2010 集成 SP1 补丁 制作 Visual Studio 2010 Service Pack 1 完整版安装光盘的方法

    Now that Visual Studio 2010 SP1 has been released, administrators and developers may wish to install ...

  5. Debian 利用 iso 镜像完全离线更新 apt-cdrom

    1 目的 在日常的 linux 服务器管理中,出于某些考虑,服务器要求与 Internet 完全隔离. 这使得我们对系统的更新和软件包的升级感到无比头疼. 下面介绍的这种方法,采用 ISO 文件,进行 ...

  6. windows离线补丁包下载路径-云盾安骑士

    我们有一台阿里云服务器,只有内网可以访问,无外网资源. 阿里云账户邮箱反复收到阿里云云盾的漏洞报警通知,推荐安装安骑士组件. 安骑士组件是收费服务.阿里云服务器,无法连上外网,无法自动安装补丁.需要将 ...

  7. win10 1709正式版iso镜像下载|windows10 1709秋季创意者更新官方下载地址

    win10 1709正式版iso镜像下载|windows10 1709秋季创意者更新官方下载地址 发布时间:2017-10-18 14:27发布者:系统城-xtcjh浏览数:74458 win10 1 ...

  8. Windows 10通过本地镜像离线安装.NET 3.5

    在Windows10中,当我们安装某些软件的时候会提示"你的电脑上的应用需要使用以下Windows功能:.NET Framework 3.5(包括.NET 2.0和3.0)",由于 ...

  9. win10 更新系统更新补丁后无法启动处理办法

    win10无法启动不用怕!WinRE恢复环境轻松修复win10系统 Win10技术预览版发布至今,已经整整过去十天时间.经过这段时间的使用体验,小伙伴们有没有遇到一些问题,导致系统出错甚至无法启动呢? ...

随机推荐

  1. 聊聊 Java 中日期的几种常见操作 —— 取值、转换、加减、比较

    Java 的开发过程中免不了与 Date 类型纠缠,准备总结一下项目经常使用的日期相关操作,JDK 版本 1.7,如果能够帮助大家节约那么几分钟起身活动一下,去泡杯咖啡,便是极好的,嘿嘿.当然,我只提 ...

  2. Response 和 Request

    1. request 对象和 response 对象均由服务器创建. 2. 服务器处理请求的流程: 服务器每次收到请求时, 都会为这个请求开辟一个新的线程; 服务器会把客户端的请求数据封装到 requ ...

  3. Java 其他对象的 API

    System 类 (java.lang 包下) 该类中的方法和属性都是静态的. 常见方法 // 1, 获取当前时间的毫秒值 long currentTimeMillis(); // 2, 获取系统的属 ...

  4. 白话Redis分布式锁

    redis分布式 简单来说就是,操作redis实例时,不是常规(单机)操作一个实例,而是操作两台或多台,也就是基于分布式集群: 而且redis内部是单进程.单线程,是数据安全的(只有自己的线程在操作数 ...

  5. python线程池/进程池创建

    进程池 import time from concurrent.futures import ProcessPoolExecutor def task(arg): time.sleep(2) prin ...

  6. Python基础教程-条件判断和循环

    Python条件判断 在Python中用if语句实现: age = 20 if age >= 18: print 'your age is :',age print 'adult' 根据Pyth ...

  7. sql临时表的优点

    1: 临时表来组织数据,更高效的查询速度. 2:临时表的操作不会写入日志文件:好处:提高了 临时表操作的速度:坏处: 数据一旦丢失,无法恢复. 3: 临时表只允许当前会话框进行访问,因此不会担心死锁 ...

  8. Apache 虚拟主机配置

    开放虚拟主机文件 修改主配置文件 解开注释,使用虚拟主机配置文件. vim /usr/local/apache2/conf/httpd.conf Include conf/extra/httpd-vh ...

  9. 验证环境中的program为什么必须是automatic

    最近在项目中,发现验证环境中的顶层的program(一般将program作为验证环境的入口),都是automatic的. 其实Program默认是static的,那么为什么需要把验证环境做成autom ...

  10. Unix下 五种 I/O模型

    Unix下共有五种I/O模型: 1. 阻塞式I/O  2. 非阻塞式I/O  3. I/O复用(select和poll)  4. 信号驱动式I/O(SIGIO)  5. 异步I/O(POSIX的aio ...