Obsah

Společné DVD Windows 7

Společná instalace pro amd64 i x86, vícejazyčná

Potřebujeme:

  1. AIK
  2. Language packy
  3. Instalašky

Pro snazší práci si zavedeme několik proměnných

set DISM="C:\Program Files\Windows AIK\Tools\amd64\Servicing\Dism.exe"
set IMAGEX="c:\Program Files\Windows AIK\Tools\amd64\imagex.exe"
set OSCDIMG="c:\Program Files\Windows AIK\Tools\amd64\oscdimg.exe"
set DVD=D:\Install DVD\DVD
set ISO="D:\Install DVD\Win7.iso"
set WIMS=D:\Install DVD\WIMs
set MOUNT=D:\mnt
set LANG=cs-cz
set LANGDIR=D:\Install DVD\langpack
set PELANGDIR=D:\Install DVD\WinPE_LangPacks
set WINRE=D:\Install DVD\WinRE

Zkopírovat obsah instalačního x86 DVD na disk

do složky %DVD%

Do složky D:\Windows7\WIMs nakopírovat

- install.wim z x64 instalačního DVD jako x64.wim - install.wim z x64 Enterprise instalačního DVD jako Ent_x64.wim - install.wim z x86 Enterprise instalačního DVD jako Ent_x86.wim

Pomocí Imagex (z AIKu) integrujeme do x86 install.wim ve složce DVD/sources zbylé edice

(syntaxte imagex je: Imagex /export <path_of_source_wim_file> <index_no> <path_of_destination_wim_file> <description_of_edition>)

%IMAGEX% /export "%WIMS%\Ent_x86.wim" 1 "%DVD%\sources\install.wim" "Windows 7 ENTERPRISE"
%IMAGEX% /export "%WIMS%\x64.wim" 1 "%DVD%\sources\install.wim" "Windows 7 HOMEBASIC (x64)"
%IMAGEX% /export "%WIMS%\x64.wim" 2 "%DVD%\sources\install.wim" "Windows 7 HOMEPREMIUM (x64)"
%IMAGEX% /export "%WIMS%\x64.wim" 3 "%DVD%\sources\install.wim" "Windows 7 PROFESSIONAL (x64)"
%IMAGEX% /export "%WIMS%\x64.wim" 4 "%DVD%\sources\install.wim" "Windows 7 ULTIMATE (x64)"
%IMAGEX% /export "%WIMS%\Ent_x64.wim" 1 "%DVD%\sources\install.wim" "Windows 7 ENTERPRISE (x64)"

Odblokujeme instalační dvd pro všechny edice

del "%DVD%\sources\ei.cfg"

Z image dostaneme Recovery image, do kterého vložíme češtinu

%DISM% /Mount-Wim /WimFile:"%DVD%\Sources\install.wim" /index:1 /MountDir:"%MOUNT%"
copy "%MOUNT%\windows\system32\recovery\winre.wim" "%WINRE%\"
%DISM% /Unmount-Wim /MountDir:"%MOUNT%" /Discard
%DISM% /Mount-Wim /WimFile:"%WINRE%\winre.wim" /index:1 /MountDir:"%MOUNT%"
%DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x86\%LANG%\lp.cab"
%DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x86\%LANG%\winpe-setup_%LANG%.cab"
%DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x86\%LANG%\winpe-setup-client_%LANG%.cab"
%DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x86\%LANG%\winpe-scripting_%LANG%.cab" 
%DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x86\%LANG%\winpe-srt_%LANG%.cab"
%DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x86\%LANG%\winpe-wds-tools_%LANG%.cab"
%DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x86\%LANG%\winpe-wmi_%LANG%.cab"
%DISM% /Unmount-Wim /MountDir:"%MOUNT%" /Commit

Do upraveného Image zaintegrujeme češtinu

(předpokládám, že instalačky použité teď jsou anglické) a vložíme upravený Recovery image

:: Starter (x86) [1]
%DISM% /Mount-Wim /WimFile:"%DVD%\Sources\install.wim" /index:1 /MountDir:"%MOUNT%"
copy /Y "%WINRE%" "%MOUNT%\Windows\System32\Recovery"
%DISM% /image:"%MOUNT%" /Add-Package /PackagePath:"%LANGDIR%\x86\%LANG%\lp.cab"
%DISM% /image:"%MOUNT%" /Gen-LangIni /Distribution:"%DVD%"
:: pres /Set-InputLocale:0410:00010410 se da nastavit jako vychozi QWERTY ;)
%DISM% /image:"%MOUNT%" /Set-AllIntl:%LANG% /Set-TimeZone:"Central Europe Standard Time"
:: tohle nastavuje vychozi jazyk na cestinu
:: %DISM% /image:%MOUNT% /Set-SetupUILang:%LANG% /Distribution:"%DVD%"
:: %DISM% /image:%MOUNT% /Gen-LangIni /Distribution:"%DVD%"
:: %DISM% /image:%MOUNT% /Get-Packages /Format:Table
:: %DISM% /image:%MOUNT% /Get-Intl
%DISM% /Unmount-Wim /MountDir:"%MOUNT%" /commit
:: Home Basic (x86) [2]
%DISM% /Mount-Wim /WimFile:"%DVD%\Sources\install.wim" /index:2 /MountDir:"%MOUNT%"
copy /Y "%WINRE%" "%MOUNT%\Windows\System32\Recovery"
%DISM% /image:"%MOUNT%" /Add-Package /PackagePath:"%LANGDIR%\x86\%LANG%\lp.cab"
%DISM% /image:"%MOUNT%" /Gen-LangIni /Distribution:"%DVD%"
%DISM% /image:"%MOUNT%" /Set-AllIntl:%LANG% /Set-TimeZone:"Central Europe Standard Time"
%DISM% /Unmount-Wim /MountDir:"%MOUNT%" /commit
:: Windows 7 HOMEPREMIUM [3]
%DISM% /Mount-Wim /WimFile:"%DVD%\Sources\install.wim" /index:3 /MountDir:"%MOUNT%"
copy /Y "%WINRE%" "%MOUNT%\Windows\System32\Recovery"
%DISM% /image:"%MOUNT%" /Add-Package /PackagePath:"%LANGDIR%\x86\%LANG%\lp.cab"
%DISM% /image:"%MOUNT%" /Gen-LangIni /Distribution:"%DVD%"
%DISM% /image:"%MOUNT%" /Set-AllIntl:%LANG% /Set-TimeZone:"Central Europe Standard Time"
%DISM% /Unmount-Wim /MountDir:"%MOUNT%" /commit
:: Windows 7 PROFESSIONAL [4]
%DISM% /Mount-Wim /WimFile:"%DVD%\Sources\install.wim" /index:4 /MountDir:"%MOUNT%"
copy /Y "%WINRE%" "%MOUNT%\Windows\System32\Recovery"
%DISM% /image:"%MOUNT%" /Add-Package /PackagePath:"%LANGDIR%\x86\%LANG%\lp.cab"
%DISM% /image:"%MOUNT%" /Gen-LangIni /Distribution:"%DVD%"
%DISM% /image:"%MOUNT%" /Set-AllIntl:%LANG% /Set-TimeZone:"Central Europe Standard Time"
%DISM% /Unmount-Wim /MountDir:"%MOUNT%" /commit
:: Windows 7 ULTIMATE [5]
%DISM% /Mount-Wim /WimFile:"%DVD%\Sources\install.wim" /index:5 /MountDir:"%MOUNT%"
copy /Y "%WINRE%" "%MOUNT%\Windows\System32\Recovery"
%DISM% /image:"%MOUNT%" /Add-Package /PackagePath:"%LANGDIR%\x86\%LANG%\lp.cab"
%DISM% /image:"%MOUNT%" /Gen-LangIni /Distribution:"%DVD%"
%DISM% /image:"%MOUNT%" /Set-AllIntl:%LANG% /Set-TimeZone:"Central Europe Standard Time"
%DISM% /Unmount-Wim /MountDir:"%MOUNT%" /commit
:: Windows 7 ENTERPRISE [6]
%DISM% /Mount-Wim /WimFile:"%DVD%\Sources\install.wim" /index:6 /MountDir:"%MOUNT%"
copy /Y "%WINRE%" "%MOUNT%\Windows\System32\Recovery"
%DISM% /image:"%MOUNT%" /Add-Package /PackagePath:"%LANGDIR%\x86\%LANG%\lp.cab"
%DISM% /image:"%MOUNT%" /Gen-LangIni /Distribution:"%DVD%"
%DISM% /image:"%MOUNT%" /Set-AllIntl:%LANG% /Set-TimeZone:"Central Europe Standard Time"
%DISM% /Unmount-Wim /MountDir:"%MOUNT%" /commit
:: Ted vezmeme recovery image z x64 obrazu, a stejně do něj vložíme češtinu
%DISM% /Mount-Wim /WimFile:"%DVD%\Sources\install.wim" /index:7 /MountDir:"%MOUNT%"
move "%WINRE%\winre.wim" "%WINRE%\x86_winre.wim"
copy /Y "%MOUNT%\windows\system32\recovery\winre.wim" "%WINRE%\"
%DISM% /Unmount-Wim /MountDir:"%MOUNT%" /Discard
%DISM% /Mount-Wim /WimFile:"%WINRE%\winre.wim" /index:1 /MountDir:"%MOUNT%"
%DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x64\%LANG%\lp.cab"
%DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x64\%LANG%\winpe-setup_%LANG%.cab"
%DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x64\%LANG%\winpe-setup-client_%LANG%.cab"
%DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x64\%LANG%\winpe-scripting_%LANG%.cab" 
%DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x64\%LANG%\winpe-srt_%LANG%.cab"
%DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x64\%LANG%\winpe-wds-tools_%LANG%.cab"
%DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x64\%LANG%\winpe-wmi_%LANG%.cab"
%DISM% /Unmount-Wim /MountDir:"%MOUNT%" /Commit
:: Windows 7 HOMEBASIC (x64) [7]
%DISM% /Mount-Wim /WimFile:"%DVD%\Sources\install.wim" /index:7 /MountDir:"%MOUNT%"
copy /Y "%WINRE%" "%MOUNT%\Windows\System32\Recovery"
%DISM% /image:"%MOUNT%" /Add-Package /PackagePath:"%LANGDIR%\x64\%LANG%\lp.cab"
%DISM% /image:"%MOUNT%" /Gen-LangIni /Distribution:"%DVD%"
%DISM% /image:"%MOUNT%" /Set-AllIntl:%LANG% /Set-TimeZone:"Central Europe Standard Time"
%DISM% /Unmount-Wim /MountDir:"%MOUNT%" /commit
:: Windows 7 HOMEPREMIUM (x64) [8]
%DISM% /Mount-Wim /WimFile:"%DVD%\Sources\install.wim" /index:8 /MountDir:"%MOUNT%"
copy /Y "%WINRE%" "%MOUNT%\Windows\System32\Recovery"
%DISM% /image:"%MOUNT%" /Add-Package /PackagePath:"%LANGDIR%\x64\%LANG%\lp.cab"
%DISM% /image:"%MOUNT%" /Gen-LangIni /Distribution:"%DVD%"
%DISM% /image:"%MOUNT%" /Set-AllIntl:%LANG% /Set-TimeZone:"Central Europe Standard Time"
%DISM% /Unmount-Wim /MountDir:"%MOUNT%" /commit
:: Windows 7 PROFESSIONAL (x64) [9]
%DISM% /Mount-Wim /WimFile:"%DVD%\Sources\install.wim" /index:9 /MountDir:"%MOUNT%"
copy /Y "%WINRE%" "%MOUNT%\Windows\System32\Recovery"
%DISM% /image:"%MOUNT%" /Add-Package /PackagePath:"%LANGDIR%\x64\%LANG%\lp.cab"
%DISM% /image:"%MOUNT%" /Gen-LangIni /Distribution:"%DVD%"
%DISM% /image:"%MOUNT%" /Set-AllIntl:%LANG% /Set-TimeZone:"Central Europe Standard Time"
%DISM% /Unmount-Wim /MountDir:"%MOUNT%" /commit
:: Windows 7 ULTIMATE (x64) [10]
%DISM% /Mount-Wim /WimFile:"%DVD%\Sources\install.wim" /index:10 /MountDir:"%MOUNT%"
copy /Y "%WINRE%" "%MOUNT%\Windows\System32\Recovery"
%DISM% /image:"%MOUNT%" /Add-Package /PackagePath:"%LANGDIR%\x64\%LANG%\lp.cab"
%DISM% /image:"%MOUNT%" /Gen-LangIni /Distribution:"%DVD%"
%DISM% /image:"%MOUNT%" /Set-AllIntl:%LANG% /Set-TimeZone:"Central Europe Standard Time"
%DISM% /Unmount-Wim /MountDir:"%MOUNT%" /commit
:: Windows 7 ENTERPRISE (x64) [11]
%DISM% /Mount-Wim /WimFile:"%DVD%\Sources\install.wim" /index:11 /MountDir:"%MOUNT%"
copy /Y "%WINRE%" "%MOUNT%\Windows\System32\Recovery"
%DISM% /image:"%MOUNT%" /Add-Package /PackagePath:"%LANGDIR%\x64\%LANG%\lp.cab"
%DISM% /image:"%MOUNT%" /Gen-LangIni /Distribution:"%DVD%"
%DISM% /image:"%MOUNT%" /Set-AllIntl:%LANG% /Set-TimeZone:"Central Europe Standard Time"
%DISM% /Unmount-Wim /MountDir:"%MOUNT%" /commit

6. Upravíme boot image

::  %DISM% /Mount-Wim /WimFile:"%DVD%\Sources\boot.wim" /index:1 /MountDir:"%MOUNT%"
::  %DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x86\%LANG%\lp.cab"
::  %DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x86\%LANG%\winpe-scripting_%LANG%.cab"
::  %DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x86\%LANG%\winpe-srt_%LANG%.cab"
::  %DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x86\%LANG%\winpe-wds-tools_%LANG%.cab"
::  %DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x86\%LANG%\winpe-wmi_%LANG%.cab"
::  %DISM% /Unmount-Wim /MountDir:"%MOUNT% /commit
%DISM% /Mount-Wim /WimFile:"%DVD%\Sources\boot.wim" /index:2 /MountDir:"%MOUNT%"
::  copy /y "%DVD%\sources\lang.ini" "%MOUNT%\sources\"
%DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x86\%LANG%\lp.cab"
%DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x86\%LANG%\winpe-setup_%LANG%.cab"
%DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x86\%LANG%\winpe-setup-client_%LANG%.cab"
%DISM% /image:"%MOUNT%" /Set-AllIntl:%LANG% /Set-TimeZone:"Central Europe Standard Time"
%DISM% /image:"%MOUNT%" /Gen-LangINI /distribution:"%MOUNT%"
::  %DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x86\%LANG%\winpe-scripting_%LANG%.cab"
::  %DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x86\%LANG%\winpe-srt_%LANG%.cab"
::  %DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x86\%LANG%\winpe-wds-tools_%LANG%.cab"
::  %DISM% /image:"%MOUNT%" /add-package /packagepath:"%PELANGDIR%\x86\%LANG%\winpe-wmi_%LANG%.cab"
%DISM% /Unmount-Wim /MountDir:%MOUNT% /commit

Můžeme vytvořit ISO soubor

%OSCDIMG% -u2 -b"%DVD%\boot\etfsboot.com" "%DVD%" %ISO% -m

Komprese WIM souboru

%IMAGEX% /export /check /compress maximum "%DVD%\sources\install.wim" * "D:\Install DVD\newinstall.wim"
copy /V /Y "D:\Install DVD\newinstall.wim" "%DVD%\sources\install.wim"
erase /F /Q "D:\Install DVD\newinstall.wim"

Zdroje