how to make milt-Lang windows installer All in 1

因爲工做須要,常常要安裝系統並有多國語言的要求,如今以英文和中文(en-us/zh-cn)爲例,手工製做一個包括多語言的windows 安裝光盤(U盤):php

 

1.下載最新的Windows ADK:windows

https://docs.microsoft.com/zh-cn/windows-hardware/get-started/adk-install
app

最新的爲 windows 10 1809ide

image

 

下載安裝adk:.net

image

選擇如下兩項就夠用:3d

image

接下來安裝ADKWinPEAddons: server

運行:adkwinpesetup.exeblog

image

image

直到安裝完成:索引

 

image

以管理員身份運行:ip

image

接下來準備一張英文版的Windows安裝光盤(以最新windows 10 :Win10_1809Oct_English_x32.iso爲例)

下載最新的系統盤能夠到:https://tb.rg-adguard.net/public.php

若是之後要安裝32位的windows,就必須以32位的爲模板,由於32位的boot.wim既能安裝32位又能安裝x64系統.

準備必要的目錄:

Mkdir C:\m\mount\windows
Mkdir C:\m\mount\winre
Mkdir C:\m\mount\boot
Mkdir C:\m\LanguagePack\en-us
Mkdir C:\m\LanguagePack\zh-cn
Mkdir C:\m\my_Distribution
Mkdir C:\m\wim\win10pro
Mkdir C:\m\wim\win10ent
Mkdir C:\m\wim\win7pro
Mkdir C:\m\wim\win7ent
Mkdir C:\m\wim\win7ult
Mkdir C:\m\hotfix\win10_1809
Mkdir C:\m\hotfix\win7sp2

 

將 en-US Windows DVD 的全部內容複製到 C:\m\my_distribution

xcopy F:\ C:\m\my_distribution /s /e

Dism /Get-ImageInfo /ImageFile:C:\m\my_distribution\sources\install.wim

導出須要的win10 pro:

dism /Export-Image /SourceImageFile:C:\m\my_distribution\sources\install.wim /SourceIndex:6 /DestinationImageFile:C:\m\wim\win10pro\install.wim

 

Dism /Get-ImageInfo /ImageFile:C:\m\wim\win10pro\install.wim

 

xcopy C:\m\wim\win10pro\install.wim C:\m\my_distribution\sources\install.wim

Dism /Get-ImageInfo /ImageFile:C:\m\my_distribution\sources\install.wim

Dism /Mount-Image /ImageFile:C:\m\my_distribution\sources\install.wim /Index:1 /MountDir:C:\m\mount\windows

Dism /Mount-Image /ImageFile:C:\m\mount\windows\Windows\System32\recovery\winre.wim /Index:1 /MountDir:C:\m\mount\winre

 

Dism /Add-Package /image:C:\m\mount\windows /PackagePath:C:\m\LanguagePack\zh-cn\Microsoft-Windows-Client-Language-Pack_x86_zh-cn.cab

Dism /Add-Package /image:C:\m\mount\windows /PackagePath:C:\m\hotfix\win10_1809\windows10.0-kb4467708-x86.msu

image

Dism /image:C:\m\mount\windows /set-allIntl:zh-cn /Set-TimeZone:"China Standard Time"

image

Dism /image:C:\m\mount\windows /gen-langini /distribution:C:\m\my_distribution

image

Dism /image:C:\m\mount\windows /get-intl /distribution:C:\m\my_distribution

image

 

Dism /image:C:\m\mount\winre /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\zh-cn\lp.cab"

 

X64:

Dism /image:C:\m\mount\winre /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\zh-cn\lp.cab"

 

image

Dism /image:C:\m\mount\winre /set-allIntl:zh-cn /Set-TimeZone:"China Standard Time"

image

Dism /image:C:\m\mount\winre /get-intl

image

DISM /unmount-image /mountdir:C:\m\mount\winre /commit

DISM /unmount-image /mountdir:C:\m\mount\windows /commit

 

2.將語言包添加到 Windows 安裝程序:

1)使用 DISM 裝載 Boot.wim 文件的索引 2 :

Dism /Mount-Image /ImageFile:C:\m\my_distribution\sources\boot.wim /Index:2 /MountDir:C:\m\mount\boot

2)針對每一種要支持的語言,將 Windows PE 語言包和 Windows 安裝程序可選組件添加到已裝載的映像中:

DISM /add-package /image:C:\m\mount\boot /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\zh-cn\lp.cab"

x64:

DISM /add-package /image:C:\m\mount\boot /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\zh-cn\lp.cab"

 

image

3)添加 Windows PE 安裝程序可選組件:

DISM /add-package /image:C:\m\mount\boot /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-FontSupport-ZH-CN.cab"
DISM /add-package /image:C:\m\mount\boot /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-Setup.cab"
DISM /add-package /image:C:\m\mount\boot /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\zh-cn\WinPE-Setup_zh-cn.cab"
DISM /add-package /image:C:\m\mount\boot /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-Setup-client.cab"
DISM /add-package /image:C:\m\mount\boot /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\zh-cn\WinPE-Setup-Client_zh-cn.cab"

x64:

DISM /add-package /image:C:\m\mount\boot /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-FontSupport-ZH-CN.cab"
DISM /add-package /image:C:\m\mount\boot /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Setup.cab"
DISM /add-package /image:C:\m\mount\boot /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\zh-cn\WinPE-Setup_zh-cn.cab"

DISM /add-package /image:C:\m\mount\boot /PackagePath:"C:\m\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Setup-client.cab"
DISM /add-package /image:C:\m\mount\boot /packagepath:"C:\m\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\zh-cn\WinPE-Setup-Client_zh-cn.cab"
 
  (注意:這些 Windows 安裝程序語言包僅適用於客戶端版本的 Windows。對於 Windows Server,你必須使用 winpe-setup-server.cab 文件。)

 

4)將zh-cn的Windows安裝盤中的zh-cn目錄copy 到C:\m\my_distribution\sources:

Mkdir C:\m\my_distribution\sources\zh-cn

xcopy h:\sources\zh-cn C:\m\my_distribution\sources\zh-cn /cherkyi


Dism /image:C:\m\mount\boot /set-allIntl:zh-cn /Set-TimeZone:"China Standard Time"

Dism /image:C:\m\mount\boot /Get-Intl

Dism /Unmount-image /MountDir:C:\m\mount\boot /Commit

 

3.在Windows安裝盤中集成winPE:

將windows distibution 中的bcd複製到c:\m\bcd下:

xcopy  C:\m\my_Distribution\boot\bcd c:\m\bcd\

將winpe iso 文件中boot.sdi 複製到c:\m\bcd下並更名爲peboot.sdi

bcdedit /store c:\m\bcd\bcd /v

bcdedit /store c:\m\bcd\bcd /timeout 60

bcdedit /store c:\m\bcd\bcd /create {ramdiskoptions}
bcdedit /store c:\m\bcd\bcd /set {ramdiskoptions} ramdisksdidevice boot
bcdedit /store c:\m\bcd\bcd /set {ramdiskoptions} ramdisksdipath \boot\peboot.sdi

 

bcdedit /store c:\m\bcd\bcd /create {e18d7416-d8dc-11e8-88da-701ce7e35f75} /d "WinPE x64" /application osloader
bcdedit /store c:\m\bcd\bcd /displayorder {e18d7416-d8dc-11e8-88da-701ce7e35f75} /addfirst
bcdedit /store c:\m\bcd\bcd /default {e18d7416-d8dc-11e8-88da-701ce7e35f75}
bcdedit /store c:\m\bcd\bcd /set {e18d7416-d8dc-11e8-88da-701ce7e35f75} device ramdisk=[boot]\sources\pe64.wim,{ae5534e0-a924-466c-b836-758539a3ee3a}
bcdedit /store c:\m\bcd\bcd /set {e18d7416-d8dc-11e8-88da-701ce7e35f75} path   \windows\system32\boot\winload.exe
bcdedit /store c:\m\bcd\bcd /set {e18d7416-d8dc-11e8-88da-701ce7e35f75} description "WinPE x64"
bcdedit /store c:\m\bcd\bcd /set {e18d7416-d8dc-11e8-88da-701ce7e35f75} locale zh-CN
bcdedit /store c:\m\bcd\bcd /set {e18d7416-d8dc-11e8-88da-701ce7e35f75} osdevice ramdisk=[boot]\sources\pe64.wim,{ae5534e0-a924-466c-b836-758539a3ee3a}
bcdedit /store c:\m\bcd\bcd /set {e18d7416-d8dc-11e8-88da-701ce7e35f75} systemroot \windows
bcdedit /store c:\m\bcd\bcd /set {e18d7416-d8dc-11e8-88da-701ce7e35f75} detecthal Yes
bcdedit /store c:\m\bcd\bcd /set {e18d7416-d8dc-11e8-88da-701ce7e35f75} winpe Yes

bcdedit /store c:\m\bcd\bcd /create {d2cd2978-05fc-11e5-a17e-18a905d696d5} /d "WinPE x86" /application osloader
bcdedit /store c:\m\bcd\bcd /displayorder {d2cd2978-05fc-11e5-a17e-18a905d696d5} /addfirst
bcdedit /store c:\m\bcd\bcd /default {d2cd2978-05fc-11e5-a17e-18a905d696d5}
bcdedit /store c:\m\bcd\bcd /set {d2cd2978-05fc-11e5-a17e-18a905d696d5} device ramdisk=[boot]\sources\pe32.wim,{ae5534e0-a924-466c-b836-758539a3ee3a}
bcdedit /store c:\m\bcd\bcd /set {d2cd2978-05fc-11e5-a17e-18a905d696d5} path   \windows\system32\boot\winload.exe
bcdedit /store c:\m\bcd\bcd /set {d2cd2978-05fc-11e5-a17e-18a905d696d5} description "WinPE x86"
bcdedit /store c:\m\bcd\bcd /set {d2cd2978-05fc-11e5-a17e-18a905d696d5} osdevice ramdisk=[boot]\sources\pe32.wim,{ae5534e0-a924-466c-b836-758539a3ee3a}
bcdedit /store c:\m\bcd\bcd /set {d2cd2978-05fc-11e5-a17e-18a905d696d5} locale zh-CN
bcdedit /store c:\m\bcd\bcd /set {d2cd2978-05fc-11e5-a17e-18a905d696d5} systemroot \windows
bcdedit /store c:\m\bcd\bcd /set {d2cd2978-05fc-11e5-a17e-18a905d696d5} detecthal Yes
bcdedit /store c:\m\bcd\bcd /set {d2cd2978-05fc-11e5-a17e-18a905d696d5} winpe Yes

bcdedit /store c:\m\bcd\bcd /v

 

xcopy C:\m\my_Distribution\efi\microsoft\boot\bcd  c:\m\bcd\efi\bcd

bcdedit /store c:\m\bcd\efi\bcd /v

bcdedit /store c:\m\bcd\efi\bcd /timeout 60

bcdedit /store c:\m\bcd\efi\bcd /create {ramdiskoptions}
bcdedit /store c:\m\bcd\efi\bcd /set {ramdiskoptions} ramdisksdidevice boot
bcdedit /store c:\m\bcd\efi\bcd /set {ramdiskoptions} ramdisksdipath \boot\peboot.sdi

 

bcdedit /store c:\m\bcd\efi\bcd /create {e18d7416-d8dc-11e8-88da-701ce7e35f75} /d "WinPE x64" /application osloader
bcdedit /store c:\m\bcd\efi\bcd /displayorder {e18d7416-d8dc-11e8-88da-701ce7e35f75} /addfirst
bcdedit /store c:\m\bcd\efi\bcd /default {e18d7416-d8dc-11e8-88da-701ce7e35f75}
bcdedit /store c:\m\bcd\efi\bcd /set {e18d7416-d8dc-11e8-88da-701ce7e35f75} device ramdisk=[boot]\sources\pe64.wim,{ae5534e0-a924-466c-b836-758539a3ee3a}
bcdedit /store c:\m\bcd\efi\bcd /set {e18d7416-d8dc-11e8-88da-701ce7e35f75} path   \windows\system32\boot\winload.efi
bcdedit /store c:\m\bcd\efi\bcd /set {e18d7416-d8dc-11e8-88da-701ce7e35f75} description "WinPE x64"
bcdedit /store c:\m\bcd\efi\bcd /set {e18d7416-d8dc-11e8-88da-701ce7e35f75} locale zh-CN
bcdedit /store c:\m\bcd\efi\bcd /set {e18d7416-d8dc-11e8-88da-701ce7e35f75} osdevice ramdisk=[boot]\sources\pe64.wim,{ae5534e0-a924-466c-b836-758539a3ee3a}
bcdedit /store c:\m\bcd\efi\bcd /set {e18d7416-d8dc-11e8-88da-701ce7e35f75} systemroot \windows
bcdedit /store c:\m\bcd\efi\bcd /set {e18d7416-d8dc-11e8-88da-701ce7e35f75} detecthal Yes
bcdedit /store c:\m\bcd\efi\bcd /set {e18d7416-d8dc-11e8-88da-701ce7e35f75} winpe Yes

bcdedit /store c:\m\bcd\efi\bcd /create {d2cd2978-05fc-11e5-a17e-18a905d696d5} /d "WinPE x86" /application osloader
bcdedit /store c:\m\bcd\efi\bcd /displayorder {d2cd2978-05fc-11e5-a17e-18a905d696d5} /addfirst
bcdedit /store c:\m\bcd\efi\bcd /default {d2cd2978-05fc-11e5-a17e-18a905d696d5}
bcdedit /store c:\m\bcd\efi\bcd /set {d2cd2978-05fc-11e5-a17e-18a905d696d5} device ramdisk=[boot]\sources\pe32.wim,{ae5534e0-a924-466c-b836-758539a3ee3a}
bcdedit /store c:\m\bcd\efi\bcd /set {d2cd2978-05fc-11e5-a17e-18a905d696d5} path   \windows\system32\boot\winload.efi
bcdedit /store c:\m\bcd\efi\bcd /set {d2cd2978-05fc-11e5-a17e-18a905d696d5} description "WinPE x86"
bcdedit /store c:\m\bcd\efi\bcd /set {d2cd2978-05fc-11e5-a17e-18a905d696d5} osdevice ramdisk=[boot]\sources\pe32.wim,{ae5534e0-a924-466c-b836-758539a3ee3a}
bcdedit /store c:\m\bcd\efi\bcd /set {d2cd2978-05fc-11e5-a17e-18a905d696d5} locale zh-CN
bcdedit /store c:\m\bcd\efi\bcd /set {d2cd2978-05fc-11e5-a17e-18a905d696d5} systemroot \windows
bcdedit /store c:\m\bcd\efi\bcd /set {d2cd2978-05fc-11e5-a17e-18a905d696d5} detecthal Yes
bcdedit /store c:\m\bcd\efi\bcd /set {d2cd2978-05fc-11e5-a17e-18a905d696d5} winpe Yes

bcdedit /store c:\m\bcd\efi\bcd /v

 

xcopy c:\m\bcd\bcd  C:\m\my_Distribution\boot\bcd /y

xcopy c:\m\bcd\peboot.sdi C:\m\my_Distribution\boot\ /y

xcopy c:\m\bcd\efi\bcd c:\m\my_Distribution\efi\microsoft\boot\  /y

 

dism /Export-Image /SourceImageFile:E:\wim\win7pro\install.wim /SourceIndex:1 /DestinationImageFile:C:\m\my_Distribution\sources\install.wim
dism /Export-Image /SourceImageFile:E:\wim\win10pro\install.wim /SourceIndex:1 /DestinationImageFile:C:\m\my_Distribution\sources\install.wim
dism /Export-Image /SourceImageFile:E:\wim\win10ltsb\install.wim /SourceIndex:1 /DestinationImageFile:C:\m\my_Distribution\sources\install.wim
dism /Export-Image /SourceImageFile:E:\wim\win10ent_ltsc2019\install.wim /SourceIndex:1 /DestinationImageFile:C:\m\my_Distribution\sources\install.wim
dism /Export-Image /SourceImageFile:E:\wim\win2008r2sp1\install.wim /SourceIndex:1 /DestinationImageFile:C:\m\my_Distribution\sources\install.wim
dism /Export-Image /SourceImageFile:E:\wim\winsvr2012r2\install.wim /SourceIndex:1 /DestinationImageFile:C:\m\my_Distribution\sources\install.wim
dism /Export-Image /SourceImageFile:E:\wim\winsvr2016\install.wim /SourceIndex:1 /DestinationImageFile:C:\m\my_Distribution\sources\install.wim
dism /Export-Image /SourceImageFile:E:\wim\winsvr2019\install.wim /SourceIndex:1 /DestinationImageFile:C:\m\my_Distribution\sources\install.wim

dism /Get-ImageInfo /ImageFile:C:\m\my_Distribution\sources\install.wim

相關文章
相關標籤/搜索