HX的Z总最近搞了一台imac me088ch/a,坑爹的上家将MAC OS删除之后安装了个Windows,发货到手之后,遭遇蓝屏。。
结果大D当时正好在HX,被逮了个正着。。。。
又赶上坑爹的远程恢复时间巨长。。
进入NT6.0之后,Windows开始采用映像的方式进行安装,使其可定制性以及安装速度都有一定的提高。
安装映像后缀名为.wim,通常位于安装光盘的sources目录下。
通常情况下,安装补丁、安装驱动等操作一般都是安装好操作系统,进入桌面后进行的操作,但是也会遇到一些情况,比如磁盘控制器、USB3.0的驱动没有被Win7集成,且机身上没有USB2.0的接口。
这种情况下,微软提供了一个名为Deployment Image Servicing and Management(DISM,部署镜像服务和管理工具)。
部署映像服务和管理 (DISM.exe) 是一个命令行工具,可用于处理 Windows(R) 映像或准备 Windows 预安装环境 (Windows PE) 映像。DISM 可用于处理 Windows 映像 (.wim) 文件或虚拟硬盘驱动器(.vhd 或 .vhdx)。
可以使用 DISM 执行下列操作:
这里以在无mac os的imac me088ch/a上安装Win7为例。(imac用户遭遇类似情况又暂时不想使用远程恢复的可以参考本节)
这一步开始前,需要准备以下文件:
这一步是面向使用Windows 7安装光盘制作安装U盘的。
将上面下载到的dism工具解压缩到G:\Temp文件夹下。
将上面下载到的USB3.0驱动打开,单独解压压缩文件中的Drivers目录到G:\Temp\Drv目录下。
将磁盘控制器驱动解压到G:\Temp\Drv\SATA目录下。
一定要注意存放SATA驱动的文件夹名。
以管理员身份运行命令提示符。
首先在Temp文件夹下新建挂载文件夹image,再在image文件夹下新建boot文件夹用于挂载boot.wim。
在命令提示符输入:
1 2 | cd /d g:\Temp\DISM_6.1.7600.16385_x86 dism /mount-wim /wimfile:g:\Temp\boot.wim /index:2 /mountdir:g:\Temp\image\boot |
随后:
1 2 3 4 5 6 | Deployment Image Servicing and Management tool Version: 6.1.7600.16385 Mounting image [==========================100.0%==========================] The operation completed successfully. |
表示挂载完成。
向boot.wim添加USB3.0驱动
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | g:\Temp\DISM_6.1.7600.16385_x86>dism /image:g:\temp\image\boot /add-driver:g:\temp\drv\Drivers\HCSwitch\x64\iusb3hcs.inf Deployment Image Servicing and Management tool Version: 6.1.7600.16385 Image Version: 6.1.7600.16385 找到 1 个要安装的驱动程序包。 正在安装第 1 个,共有 1 个 - g:\temp\drv\Drivers\HCSwitch\x64\iusb3hcs.inf: 驱动程序包已成功安装。 The operation completed successfully. g:\Temp\DISM_6.1.7600.16385_x86>dism /image:g:\temp\image\boot /add-driver:g:\temp\drv\Drivers\Win7\x64\iusb3hub.inf Deployment Image Servicing and Management tool Version: 6.1.7600.16385 Image Version: 6.1.7600.16385 找到 1 个要安装的驱动程序包。 正在安装第 1 个,共有 1 个 - g:\temp\drv\Drivers\Win7\x64\iusb3hub.inf: 驱动程序包已成功安装。 The operation completed successfully. g:\Temp\DISM_6.1.7600.16385_x86>dism /image:g:\temp\image\boot /add-driver:g:\temp\drv\Drivers\Win7\x64\iusb3xhc.inf Deployment Image Servicing and Management tool Version: 6.1.7600.16385 Image Version: 6.1.7600.16385 找到 1 个要安装的驱动程序包。 正在安装第 1 个,共有 1 个 - g:\temp\drv\Drivers\Win7\x64\iusb3xhc.inf: 驱动程序包已成功安装。 The operation completed successfully. |
向boot.wim添加磁盘控制器驱动
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | g:\Temp\DISM_6.1.7600.16385_x86>dism /image:g:\temp\image\boot /add-driver:g:\temp\drv\SATA\iaahcic.inf Deployment Image Servicing and Management tool Version: 6.1.7600.16385 Image Version: 6.1.7600.16385 找到 1 个要安装的驱动程序包。 正在安装第 1 个,共有 1 个 - g:\temp\drv\SATA\iaahcic.inf: 驱动程序包已成功安装。 The operation completed successfully. g:\Temp\DISM_6.1.7600.16385_x86>dism /image:g:\temp\image\boot /add-driver:g:\temp\drv\SATA\iastorac.inf Deployment Image Servicing and Management tool Version: 6.1.7600.16385 Image Version: 6.1.7600.16385 找到 1 个要安装的驱动程序包。 正在安装第 1 个,共有 1 个 - g:\temp\drv\SATA\iastorac.inf: 驱动程序包已成功安装。 The operation completed successfully. |
查看已添加第三方驱动程序:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | g:\Temp\DISM_6.1.7600.16385_x86>dism /image:g:\temp\image\boot /get-drivers Deployment Image Servicing and Management tool Version: 6.1.7600.16385 Image Version: 6.1.7600.16385 正在从驱动程序存储中获得第三方驱动程序列表... 驱动程序包列表: 已发布的名称 : oem0.inf 原始文件名 : iusb3hcs.inf 内置驱动程序 : 否 类名称 : System 提供程序名称 : 英特尔 日期 : 2014/8/8 版本 : 3.0.1.41 已发布的名称 : oem1.inf 原始文件名 : iusb3hub.inf 内置驱动程序 : 否 类名称 : USB 提供程序名称 : Intel(R) Corporation 日期 : 2014/8/8 版本 : 3.0.1.41 已发布的名称 : oem2.inf 原始文件名 : iusb3xhc.inf 内置驱动程序 : 否 类名称 : USB 提供程序名称 : Intel(R) Corporation 日期 : 2014/8/8 版本 : 3.0.1.41 已发布的名称 : oem3.inf 原始文件名 : iaahcic.inf 内置驱动程序 : 否 类名称 : HDC 提供程序名称 : Intel Corporation 日期 : 2014/7/25 版本 : 13.2.4.1000 已发布的名称 : oem4.inf 原始文件名 : iastorac.inf 内置驱动程序 : 否 类名称 : SCSIAdapter 提供程序名称 : Intel Corporation 日期 : 2014/7/25 版本 : 13.2.4.1000 The operation completed successfully. g:\Temp\DISM_6.1.7600.16385_x86> |
保存并卸载映像。
1 2 3 4 5 6 7 8 9 10 11 12 | g:\Temp\DISM_6.1.7600.16385_x86>dism /unmount-wim /mountdir:g:\temp\image\boot /commit Deployment Image Servicing and Management tool Version: 6.1.7600.16385 Image File : g:\Temp\boot.wim Image Index : 2 Saving image [==========================100.0%==========================] Unmounting image [==========================100.0%==========================] The operation completed successfully. |
挂载install.wim到g:\Temp\image\win7,照例先新建win7文件夹。
1 2 3 4 5 6 7 8 | g:\Temp\DISM_6.1.7600.16385_x86>dism /mount-wim /wimfile:g:\temp\install.wim /index:4 /mountdir:g:\temp\image\win7 Deployment Image Servicing and Management tool Version: 6.1.7600.16385 Mounting image [==========================100.0%==========================] The operation completed successfully. |
向install.wim添加usb3.0驱动
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | g:\Temp\DISM_6.1.7600.16385_x86>dism /image:g:\temp\image\win7 /add-driver /driver:g:\temp\drv\Drivers\HCSwitch\x64\iusb3hcs.inf Deployment Image Servicing and Management tool Version: 6.1.7600.16385 Image Version: 6.1.7600.16385 找到 1 个要安装的驱动程序包。 正在安装第 1 个,共有 1 个 - g:\temp\drv\Drivers\HCSwitch\x64\iusb3hcs.inf: 驱动程序包已成功安装。 The operation completed successfully. g:\Temp\DISM_6.1.7600.16385_x86>dism /image:g:\temp\image\win7 /add-driver /driver:g:\temp\drv\Drivers\Win7\x64\iusb3hub.inf Deployment Image Servicing and Management tool Version: 6.1.7600.16385 Image Version: 6.1.7600.16385 找到 1 个要安装的驱动程序包。 正在安装第 1 个,共有 1 个 - g:\temp\drv\Drivers\Win7\x64\iusb3hub.inf: 驱动程序包已成功安装。 The operation completed successfully. g:\Temp\DISM_6.1.7600.16385_x86>dism /image:g:\temp\image\win7 /add-driver /driver:g:\temp\drv\Drivers\Win7\x64\iusb3xhc.inf Deployment Image Servicing and Management tool Version: 6.1.7600.16385 Image Version: 6.1.7600.16385 找到 1 个要安装的驱动程序包。 正在安装第 1 个,共有 1 个 - g:\temp\drv\Drivers\Win7\x64\iusb3xhc.inf: 驱动程序包已成功安装。 The operation completed successfully. |
向install.wim添加磁盘控制器驱动。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | g:\Temp\DISM_6.1.7600.16385_x86>dism /image:g:\temp\image\win7 /add-driver /driver:g:\temp\drv\sata\iaahcic.inf Deployment Image Servicing and Management tool Version: 6.1.7600.16385 Image Version: 6.1.7600.16385 找到 1 个要安装的驱动程序包。 正在安装第 1 个,共有 1 个 - g:\temp\drv\sata\iaahcic.inf: 驱动程序包已成功安装。 The operation completed successfully. g:\Temp\DISM_6.1.7600.16385_x86>dism /image:g:\temp\image\win7 /add-driver /driver:g:\temp\drv\sata\iastorac.inf Deployment Image Servicing and Management tool Version: 6.1.7600.16385 Image Version: 6.1.7600.16385 找到 1 个要安装的驱动程序包。 正在安装第 1 个,共有 1 个 - g:\temp\drv\sata\iastorac.inf: 驱动程序包已成功安装。 |
保存并卸载映像。
1 2 3 4 5 6 7 8 9 10 11 12 | g:\Temp\DISM_6.1.7600.16385_x86>dism /unmount-wim /mountdir:g:\temp\image\win7 /commit Deployment Image Servicing and Management tool Version: 6.1.7600.16385 Image File : g:\temp\install.wim Image Index : 4 Saving image [==========================100.0%==========================] Unmounting image [==========================100.0%==========================] The operation completed successfully. |
完成后就可以将boot.wim和install.wim复制掩盖到USB启动盘,也可以使用Winpe进行安装了。
如果遇到如下的情况:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | g:\Temp\DISM_6.1.7600.16385_x86>dism /image:g:\temp\image\win7 /add-driver /driver:g:\temp\drv\sata\ iaahcic.inf Deployment Image Servicing and Management tool Version: 6.1.7600.16385 Image Version: 6.1.7600.16385 找到 1 个要安装的驱动程序包。 正在安装第 1 个,共有 1 个 - g:\temp\drv\sata\iaahcic.inf: 错误 - 发生错误。无法安装驱动程序包。 有关详细信息,请检查目标映像的 windir>\inf 文件夹中的日志文件。 Error: 5 拒绝访问。 The DISM log file can be found at C:\Windows\Logs\DISM\dism.log |
则有可能是Windows将文件锁定了,需要在驱动文件上右键,属性,解除锁定。
如何使用dism直接在Win8/8.1下安装.Net Framework 3.5
.Net Framework 3.5、4都是Win8的系统组件之一,直接通过离线包安装会遇到问题。通过添加程序安装则需要下载,如果手里有Win8/8.1的映像,可以通过dism进行安装。
假设Win8/8.1 ISO加载在X:(光驱插入光盘或者虚拟光驱)
1 | DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:x:\sources\sxs |
/source参数指定路径,将Win8的ISO解压缩然后路径输入上去也OK。
最后说明,要用管理员身份运行。
联系客服