Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> 電腦軟體教學 >> 電腦軟體介紹

Windows 多合一鏡像製作完整指南:DISM、ImageX、Oscdimg 命令詳解與實戰

編輯:電腦軟體介紹

許多網友詢問如何製作整合 32 位與 64 位版本的 Windows 7 旗艦版多合一安裝鏡像。其實基於原版 ISO 製作多合一鏡像流程並不複雜,關鍵在於熟悉命令列工具 DISM、ImageX 與 Oscdimg 的操作。本文系統整理核心命令、注意事項與實際操作範例,助您從入門到精通。

核心工具簡介

  • DISM (Deployment Image Servicing and Management):Windows 8/8.1 內建,可掛載、擷取、匯出、升級 WIM 映像,功能涵蓋舊工具 ImageX 大部分功能。
  • ImageX:舊版映像管理工具,目前仍需用於修改 WIM 內部映像的「名稱」與「描述」(DISM 尚無對應指令)。
  • Oscdimg:將資料夾打包成可開機 ISO 檔的工具,支援 BIOS 與 UEFI 雙模式。

三款工具皆可從 Windows ADK for 8.1 線上安裝時勾選「部署工具」取得,安裝後位於 C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools。

命令列操作三大要訣

  1. 權限:須以「系統管理員身分」執行 CMD 或 PowerShell。
  2. 路徑:執行工具前先 cd /d 目標路徑 切換至工具目錄,或將工具目錄加入系統 PATH 環境變數。
  3. 格式:指令格式為 工具名 /參數1 /參數2 ...,斜線前需有一空格,全半形字元。

多合一鏡像核心命令詳解

1. 查詢 WIM 內映像資訊

dism /get-imageinfo /imagefile:I:\sources\install.wim

可取得索引編號、名稱、描述等資訊。

2. 刪除 WIM 中指定映像

dism /delete-image /imagefile:F:\install.wim /index:1

需先將 install.wim 複製到硬碟,不可在虛擬光碟機直接操作。

3. 修改映像名稱與描述

imagex /info F:\install.wim 1 "Windows 8 企業版 [32位]" "Windows 8 Enterprise 32bit"

同一 WIM 內不允許重複名稱。

4. 將一個 WIM 的映像匯出到另一個 WIM(核心整合步驟)

Dism /export-image /sourceimagefile:I:\sources\install.wim /sourceindex:1 /destinationimagefile:F:\install.wim /destinationname:"Windows 8 企業版 [64位]"
  • 目標 WIM 不存在時會自動建立,索引從 1 開始。
  • 可加 /Compress:maximum 達到最高壓縮率。
  • 省略 /destinationname 則保留原名稱。

5. 升級映像版本(僅限零售版多合一鏡像)

  1. 掛載映像:dism /mount-image /imagefile:F:\install.wim /index:1 /MountDir:E:\Win8
  2. 查詢可升級版本:dism /image:E:\Win8 /get-targeteditions
  3. 執行升級:dism /image:E:\Win8 /set-edition:ProfessionalWMC
  4. 提交並卸載:dism /unmount-wim /mountdir:E:\Win8 /commit

6. 打包 ISO 關鍵細節

  • 32/64 位混合:必須以 32 位零售版為母本,因唯有 32 位安裝程式支援跨平台部署。
  • 跳過產品金鑰輸入:Win7 刪除 sources\ei.cfg;Win8/8.1 需新增 ei.cfg。
  • UEFI 開機:僅 64 位系統支援,打包需加入 UEFI 參數;USB 安裝若 install.wim > 4GB 需拆分為 SWM。
  • 映像拆分指令:Dism /Split-Image /ImageFile:F:\install.wim /SWMFile:D:\image\install.swm /FileSize:4096
  • 大檔案啟動順序:超過 4.5GB 時需指定啟動順序檔案,參考 Oscdimg 官方文件。

Oscdimg 打包指令範例

僅 BIOS 模式:

Oscdimg -betfsboot.com -m -u2 -h -udfver102 -lHRM_CCSA_X64FRE_ZH-CN_DV5 -t8/22/2013,22:22:22 E:\isox64 E:\MyISO.iso

BIOS + UEFI 雙模式:

Oscdimg -bootdata:2#p0,e,bEtfsboot.com#pEF,e,bEfisys.bin -m -u2 -h -udfver102 -lHRM_CCSA_X64FRE_ZH-CN_DV5 -t8/22/2013,22:22:22 E:\isox64 E:\MyISO.iso

實戰範例:Win7 旗艦版 32+64 位二合一製作步驟

  1. 分別掛載 32 位與 64 位原版 ISO(假設盤符 E:、F:)。
  2. 解壓 32 位 ISO 至 D:\Win7,刪除 D:\Win7\sources\install.wim 與 ei.cfg。
  3. 複製 ADK 工具資料夾 x86、amd64 至 D:\。
  4. 以管理員身分執行 CMD,依序執行:
cd /d D:\x86
Dism /export-image /sourceimagefile:E:\sources\install.wim /sourceindex:5 /destinationimagefile:D:\Win7\sources\install.wim /compress:maximum
imagex /info D:\Win7\sources\install.wim 1 "Windows 7 旗艦版 [32位]" "Windows 7 Ultimate 32bit"
Dism /export-image /sourceimagefile:F:\sources\install.wim /sourceindex:4 /destinationimagefile:D:\Win7\sources\install.wim
imagex /info D:\Win7\sources\install.wim 2 "Windows 7 旗艦版 [64位]" "Windows 7 Ultimate 64bit"
Oscdimg -betfsboot.com -m -u2 -h -udfver102 -lGSP1RMCULFRER_ZH-CN_DVD -t8/22/2013,22:22:22 D:\Win7 D:\MyWin7.iso

完成後即獲得 D:\MyWin7.iso,可直接燒錄或寫入 USB 安裝。

Copyright © Windows教程網 All Rights Reserved