Good to Know Database

Windows 10 Installations-DVD mit zusätzlichen Sprachen ausstatten


Standardmäßig bringt eine Windows 10 Installations-DVD nur eine Sprache mit. Wenn Sie Windows 10 in einer anderen Sprache benötigen, müssen Sie im Nachhinein ein Multilingual User Interface Pack installieren oder eine Installations-DVD in der gewünschten Sprache verwenden. Die folgende Anleitung soll Ihnen zeigen, wie Sie eine Windows 10 Installations-DVD um weitere Sprachen erweitern. Dazu werden die bereits erwähnten Multilingual User Interface Packs verwendet.

Voraussetzungen:
- Eine Windows 10 Version 1511 (Build 10586) x86 oder x64 Installations-DVD.
- Ein lauffähiges Windows 10 x86 beziehungsweise x64 System.
- Auf dem System muss das Windows Assessment and Deployment Kit (ADK) für Windows 10 installiert sein.
- Im selben Verzeichnis wie dieses Batch-Skript sollten sich die entsprechenden Multilingual User Interface Packs für Windows 10 befinden.

Eine Liste mit Download-Links der einzelnen Language Packs für Windows 10 finden Sie auf der Seite Windows 10 Build 10586 Multilingual User Interface Packs herunterladen.

Nachdem Sie alle Voraussetzungen erfüllt haben, müssen Sie im Batch-Skript die Variablen DVDDRIVE, WIN81ARCH, LANGUAGES, LPFILEn, LANGUAGEn, DEFAULTLANGUAGE, DEFAULTTIMEZONE, SETUPLANGUAGE und gegebenenfalls auch WIN81DVDDIR, WIN81DVDISO und TEMPDIR an Ihre Anforderungen anpassen. Danach führen Sie das Batch-Skript als Administrator aus.

@echo off

rem
rem Create multilingual Windows 10 x86/x64 DVD
rem
rem 20160418 v1.0    Create multilingual Windows 10 x86/x64 DVD
rem

rem Current working directory where also the language packs are located
rem Please don't touch!
set WORKDIR=%~dp0

rem Drive letter of your DVD drive (e.g. "F:")
set DVDDRIVE=F:

rem Architecture of the Windows 10 DVD
rem Set "x86" for 32 bit architecture
rem Set "amd64" for 64 bit architecture
set WIN10ARCH=amd64

rem Temporary directory to store the Windows 10 DVD content (e.g. "D:\Win10_DVD")
set WIN10DVDDIR=%WORKDIR%Win10_%WIN10ARCH%_DVD

rem Path and filename for the ISO output file (e.g. "D:\Win10_MUI_DVD.iso")
set WIN10DVDISO=%WORKDIR%Win10_%WIN10ARCH%_MUI_DVD.iso

rem Number of language packs to implement
set LANGUAGES=2

rem Path and file names of the language pack files (e.g. "%WORKDIR%de-de\lp.cab")
set LPFILE1=%WORKDIR%LanguagePacks\%WIN10ARCH%\en-gb\lp.cab
set LPFILE2=%WORKDIR%LanguagePacks\%WIN10ARCH%\en-us\lp.cab
set LPFILE3=
set LPFILE4=
set LPFILE5=
set LPFILE6=
set LPFILE7=
set LPFILE8=
set LPFILE9=

rem Language of the language packs (e.g. "de-de" or "en-us")
set LANGUAGE1=en-gb
set LANGUAGE2=en-us
set LANGUAGE3=
set LANGUAGE4=
set LANGUAGE5=
set LANGUAGE6=
set LANGUAGE7=
set LANGUAGE8=
set LANGUAGE9=

rem Set the default system UI language, the language for non-Unicode programs, the "standards and formats" language, the input locales, the keyboard layouts and time zone values to the specified language
set DEFAULTLANGUAGE=de-de

rem Set the default time zone in the Windows image
set DEFAULTTIMEZONE="Central Europe Standard Time"

rem Define the default language that will be used by setup
set SETUPLANGUAGE=de-de

rem Some temporary working directories
set TEMPDIR=%WORKDIR%Win10_%WIN10ARCH%_TEMP
set EXTRACTDIR=%TEMPDIR%\extract
set LPEXTRACTDIR=%EXTRACTDIR%\languagepack
set PEEXTRACTDIR=%EXTRACTDIR%\winpe
set MOUNTDIR=%TEMPDIR%\mount
set INSTALLMOUNTDIR=%MOUNTDIR%\install
set WINREMOUNTDIR=%MOUNTDIR%\winre
set BOOTMOUNTDIR=%MOUNTDIR%\boot

rem Path to the Windows Assessment and Deployment Kit
set KITPATH=
if exist "C:\Program Files\Windows Kits\10\Assessment and Deployment Kit" set KITPATH=C:\Program Files\Windows Kits\10\Assessment and Deployment Kit
if exist "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit" set KITPATH=C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit
if "%KITPATH%"=="" goto E_KITPATH

rem ###################################################################
rem # NORMALLY THERE IS NO NEED TO CHANGE ANYTHING BELOW THIS COMMENT #
rem ###################################################################

setlocal EnableDelayedExpansion

echo.
echo ==================================================================
echo Remove temporary directories if they already exist
echo ==================================================================
echo.
if exist "%WIN10DVDDIR%" rmdir /s /q "%WIN10DVDDIR%"
if errorlevel 1 goto E_DELDIR
if exist "%TEMPDIR%" rmdir /s /q "%TEMPDIR%"
if errorlevel 1 goto E_DELDIR

echo.
echo ==================================================================
echo Create temporary directories
echo ==================================================================
echo.
mkdir "%WIN10DVDDIR%"
if errorlevel 1 goto E_MKDIR
mkdir "%TEMPDIR%"
if errorlevel 1 goto E_MKDIR
mkdir "%LPEXTRACTDIR%"
if errorlevel 1 goto E_MKDIR
mkdir "%PEEXTRACTDIR%"
if errorlevel 1 goto E_MKDIR
mkdir "%MOUNTDIR%"
if errorlevel 1 goto E_MKDIR
mkdir "%INSTALLMOUNTDIR%"
if errorlevel 1 goto E_MKDIR
mkdir "%WINREMOUNTDIR%"
if errorlevel 1 goto E_MKDIR
mkdir "%BOOTMOUNTDIR%"
if errorlevel 1 goto E_MKDIR

echo.
echo ==================================================================
echo Copy Windows 10 DVD to the temporary directory
echo ==================================================================
echo.
echo Please insert the Windows 10 %WIN10ARCH% DVD into the DVD drive %DVDDRIVE%
echo.
pause
xcopy "%DVDDRIVE%\*.*" "%WIN10DVDDIR%" /ef

echo.
echo ==================================================================
echo Copy language packs to %TEMPDIR%
echo ==================================================================
echo.
set /A COUNTER=1
:LOOP
if not exist "!LPFILE%COUNTER%!" goto E_LPFILE
copy "!LPFILE%COUNTER%!" "%TEMPDIR%\!LANGUAGE%COUNTER%!.cab" /y
set /A COUNTER+=1
if %COUNTER% LEQ %LANGUAGES% goto LOOP

echo.
echo ==================================================================
echo Get count of available Windows 10 versions
echo ==================================================================
echo.
"%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Get-WimInfo /WimFile:"%WIN10DVDDIR%\sources\install.wim" > "%TEMPDIR%\wiminfo.txt"
for /F "tokens=2 delims=: " %%a in ('findstr /e "[0-9]" "%TEMPDIR%\wiminfo.txt"') do (
  set VERSIONS=%%~a
)
del /f /q "%TEMPDIR%\wiminfo.txt"

echo.
echo ==================================================================
echo Add language packs to the installation and WinRE images
echo ==================================================================
echo.

for /L %%i in (1, 1, %VERSIONS%) do (
  echo.
  echo ==================================================================
  echo Mount install.wim - %%i of %VERSIONS%
  echo ==================================================================
  echo.
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Mount-Wim /WimFile:"%WIN10DVDDIR%\sources\install.wim" /Index:%%i /MountDir:"%INSTALLMOUNTDIR%"
  if errorlevel 1 goto E_MOUNT

  echo.
  echo ==================================================================
  echo Add language packs to install.wim - %%i of %VERSIONS%
  echo ==================================================================
  echo.
  for /L %%j in (1, 1, %LANGUAGES%) do (
    "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%INSTALLMOUNTDIR%" /Add-Package /PackagePath:"%TEMPDIR%\!LANGUAGE%%j!.cab"
  )

  echo.
  echo ==================================================================
  echo Update default settings of install.wim - %%i of %VERSIONS%
  echo ==================================================================
  echo.
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%INSTALLMOUNTDIR%" /Gen-LangIni /Distribution:"%WIN10DVDDIR%"
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%INSTALLMOUNTDIR%" /Set-AllIntl:%DEFAULTLANGUAGE%
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%INSTALLMOUNTDIR%" /Set-SKUIntlDefaults:%DEFAULTLANGUAGE%
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%INSTALLMOUNTDIR%" /Set-TimeZone:%DEFAULTTIMEZONE%
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%INSTALLMOUNTDIR%" /Set-SetupUILang:%SETUPLANGUAGE% /Distribution:"%WIN10DVDDIR%"

  echo.
  echo ==================================================================
  echo Get package list and language settings of install.wim - %%i of %VERSIONS%
  echo ==================================================================
  echo.
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%INSTALLMOUNTDIR%" /Get-Packages /Format:Table
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%INSTALLMOUNTDIR%" /Get-Intl

  echo.
  echo ==================================================================
  echo Mount winre.wim of install.wim - %%i of %VERSIONS%
  echo ==================================================================
  echo.
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Mount-Wim /WimFile:"%INSTALLMOUNTDIR%\Windows\System32\recovery\winre.wim" /Index:1 /MountDir:"%WINREMOUNTDIR%"
  if errorlevel 1 goto E_MOUNT

  echo.
  echo ==================================================================
  echo Add language packs to winre.wim of install.wim - %%i of %VERSIONS%
  echo ==================================================================
  echo.
  for /L %%j in (1, 1, %LANGUAGES%) do (
    "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%WINREMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\lp.cab"
    "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%WINREMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-EnhancedStorage_!LANGUAGE%%j!.cab"
    "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%WINREMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-HTA_!LANGUAGE%%j!.cab"
    "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%WINREMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-Rejuv_!LANGUAGE%%j!.cab"
    "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%WINREMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-Scripting_!LANGUAGE%%j!.cab"
    "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%WINREMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-SecureStartup_!LANGUAGE%%j!.cab"
    "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%WINREMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-SRT_!LANGUAGE%%j!.cab"
    "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%WINREMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-StorageWMI_!LANGUAGE%%j!.cab"
    "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%WINREMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-WDS-Tools_!LANGUAGE%%j!.cab"
    "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%WINREMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-WMI_!LANGUAGE%%j!.cab"
  )

  echo.
  echo ==================================================================
  echo Update default settings of winre.wim of install.wim - %%i of %VERSIONS%
  echo ==================================================================
  echo.
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%WINREMOUNTDIR%" /Gen-LangIni /Distribution:"%WINREMOUNTDIR%"
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%WINREMOUNTDIR%" /Set-AllIntl:%DEFAULTLANGUAGE%
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%WINREMOUNTDIR%" /Set-SKUIntlDefaults:%DEFAULTLANGUAGE%
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%WINREMOUNTDIR%" /Set-TimeZone:%DEFAULTTIMEZONE%
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%WINREMOUNTDIR%" /Set-SetupUILang:%SETUPLANGUAGE% /Distribution:"%WINREMOUNTDIR%"

  echo.
  echo ==================================================================
  echo Get package list and language settings of winre.wim of install.wim - %%i of %VERSIONS%
  echo ==================================================================
  echo.
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%WINREMOUNTDIR%" /Get-Packages /Format:Table
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%WINREMOUNTDIR%" /Get-Intl

  echo.
  echo ==================================================================
  echo Unmount winre.wim
  echo ==================================================================
  echo.
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Unmount-Wim /MountDir:"%WINREMOUNTDIR%" /Commit
  if errorlevel 1 goto E_UNMOUNT

  echo.
  echo ==================================================================
  echo Unmount install.wim - %%i of %VERSIONS%
  echo ==================================================================
  echo.
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Unmount-Wim /MountDir:"%INSTALLMOUNTDIR%" /Commit
  if errorlevel 1 goto E_UNMOUNT
)

echo.
echo ==================================================================
echo Add language pack files to the boot images
echo ==================================================================
echo.

echo.
echo ==================================================================
echo Mount boot.wim - 1 of 2
echo ==================================================================
echo.
"%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Mount-Wim /WimFile:"%WIN10DVDDIR%\sources\boot.wim" /Index:1 /MountDir:"%BOOTMOUNTDIR%"
if errorlevel 1 goto E_MOUNT

echo.
echo ==================================================================
echo Add language packs to boot.wim - 1 of 2
echo ==================================================================
echo.
for /L %%j in (1, 1, %LANGUAGES%) do (
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\lp.cab"
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-EnhancedStorage_!LANGUAGE%%j!.cab"
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-Scripting_!LANGUAGE%%j!.cab"
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-SecureStartup_!LANGUAGE%%j!.cab"
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-SRT_!LANGUAGE%%j!.cab"
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-WDS-Tools_!LANGUAGE%%j!.cab"
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-WMI_!LANGUAGE%%j!.cab"
)

echo.
echo ==================================================================
echo Update default settings of boot.wim - 1 of 2
echo ==================================================================
echo.
"%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Gen-LangIni /Distribution:"%BOOTMOUNTDIR%"
"%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Set-AllIntl:%DEFAULTLANGUAGE%
"%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Set-SKUIntlDefaults:%DEFAULTLANGUAGE%
"%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Set-TimeZone:%DEFAULTTIMEZONE%
"%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Set-SetupUILang:%SETUPLANGUAGE% /Distribution:"%BOOTMOUNTDIR%"

echo.
echo ==================================================================
echo Get package list and language settings of boot.wim - 1 of 2
echo ==================================================================
echo.
"%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Get-Packages /Format:Table
"%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Get-Intl

echo.
echo ==================================================================
echo Unmount boot.wim - 1 of 2
echo ==================================================================
echo.
"%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Unmount-Wim /MountDir:"%BOOTMOUNTDIR%" /Commit
if errorlevel 1 goto E_UNMOUNT

echo.
echo ==================================================================
echo Mount boot.wim - 2 of 2
echo ==================================================================
echo.
"%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Mount-Wim /WimFile:"%WIN10DVDDIR%\sources\boot.wim" /Index:2 /MountDir:"%BOOTMOUNTDIR%"
if errorlevel 1 goto E_MOUNT

echo.
echo ==================================================================
echo Add language packs to boot.wim - 2 of 2
echo ==================================================================
echo.
for /L %%j in (1, 1, %LANGUAGES%) do (
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\lp.cab"
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-EnhancedStorage_!LANGUAGE%%j!.cab"
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-Scripting_!LANGUAGE%%j!.cab"
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-SecureStartup_!LANGUAGE%%j!.cab"
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-Setup-Client_!LANGUAGE%%j!.cab"
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-Setup_!LANGUAGE%%j!.cab"
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-SRT_!LANGUAGE%%j!.cab"
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-WDS-Tools_!LANGUAGE%%j!.cab"
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-WMI_!LANGUAGE%%j!.cab"
)

echo.
echo ==================================================================
echo Update default settings of boot.wim - 2 of 2
echo ==================================================================
echo.
"%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Gen-LangIni /Distribution:"%BOOTMOUNTDIR%"
"%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Set-AllIntl:%DEFAULTLANGUAGE%
"%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Set-SKUIntlDefaults:%DEFAULTLANGUAGE%
"%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Set-TimeZone:%DEFAULTTIMEZONE%
"%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Set-SetupUILang:%SETUPLANGUAGE% /Distribution:"%BOOTMOUNTDIR%"

echo.
echo ==================================================================
echo Get package list and language settings of boot.wim - 2 of 2
echo ==================================================================
echo.
"%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Get-Packages /Format:Table
"%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Get-Intl

echo.
echo ==================================================================
echo Unmount boot.wim - 2 of 2
echo ==================================================================
echo.
"%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Unmount-Wim /MountDir:"%BOOTMOUNTDIR%" /Commit
if errorlevel 1 goto E_UNMOUNT

echo.
echo ==================================================================
echo Add language pack files to the Windows 10 DVD
echo ==================================================================
echo.
for /L %%j in (1, 1, %LANGUAGES%) do (
  echo.
  echo ==================================================================
  echo Extract Windows 10 language pack !LANGUAGE%%j!
  echo ==================================================================
  echo.
  mkdir "%LPEXTRACTDIR%\!LANGUAGE%%j!"
  expand "%TEMPDIR%\!LANGUAGE%%j!.cab" -f:* "%LPEXTRACTDIR%\!LANGUAGE%%j!"

  echo.
  echo ==================================================================
  echo Extract WinPE language pack !LANGUAGE%%j!
  echo ==================================================================
  echo.
  mkdir "%PEEXTRACTDIR%\!LANGUAGE%%j!"
  expand "%KITPATH%\Windows Preinstallation Environment\%WIN10ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-Setup_!LANGUAGE%%j!.cab" -f:* "%PEEXTRACTDIR%\!LANGUAGE%%j!"

  echo.
  echo ==================================================================
  echo Copy language pack files to the DVD folder - !LANGUAGE%%j!
  echo ==================================================================
  echo.
  rem Copy language pack files to \boot\
  dir /b /s "%LPEXTRACTDIR%\!LANGUAGE%%j!\bootsect.exe.mui" > "%TEMPDIR%\search.txt"
  for /f "delims=" %%a in (%TEMPDIR%\search.txt) do xcopy "%%a" "%WIN10DVDDIR%\boot\!LANGUAGE%%j!\" /chrkyi

  rem Copy language pack files to \sources\
  xcopy "%LPEXTRACTDIR%\!LANGUAGE%%j!\setup\sources\!LANGUAGE%%j!\*" "%WIN10DVDDIR%\sources\!LANGUAGE%%j!" /cherkyi
  rmdir /s /q "%WIN10DVDDIR%\sources\!LANGUAGE%%j!\cli"
  rmdir /s /q "%WIN10DVDDIR%\sources\!LANGUAGE%%j!\dlmanifests"
  rmdir /s /q "%WIN10DVDDIR%\sources\!LANGUAGE%%j!\etwproviders"
  rmdir /s /q "%WIN10DVDDIR%\sources\!LANGUAGE%%j!\replacementmanifests"
  xcopy "%LPEXTRACTDIR%\!LANGUAGE%%j!\setup\sources\!LANGUAGE%%j!\cli\*" "%WIN10DVDDIR%\sources\!LANGUAGE%%j!" /cherkyi
  dir /b /s "%LPEXTRACTDIR%\!LANGUAGE%%j!\credits.rtf" > "%TEMPDIR%\search.txt"
  for /f "delims=" %%a in (%TEMPDIR%\search.txt) do xcopy "%%a" "%WIN10DVDDIR%\sources\!LANGUAGE%%j!\" /chrkyi
  dir /b /s "%LPEXTRACTDIR%\!LANGUAGE%%j!\erofflps.txt" > "%TEMPDIR%\search.txt"
  for /f "delims=" %%a in (%TEMPDIR%\search.txt) do xcopy "%%a" "%WIN10DVDDIR%\sources\!LANGUAGE%%j!\" /chrkyi
  dir /b /s "%LPEXTRACTDIR%\!LANGUAGE%%j!\oobe_help_opt_in_details.rtf" > "%TEMPDIR%\search.txt"
  for /f "delims=" %%a in (%TEMPDIR%\search.txt) do xcopy "%%a" "%WIN10DVDDIR%\sources\!LANGUAGE%%j!\" /chrkyi
  dir /b /s "%LPEXTRACTDIR%\!LANGUAGE%%j!\privacy.rtf" > "%TEMPDIR%\search.txt"
  for /f "delims=" %%a in (%TEMPDIR%\search.txt) do xcopy "%%a" "%WIN10DVDDIR%\sources\!LANGUAGE%%j!\" /chrkyi
  dir /b /s "%PEEXTRACTDIR%\!LANGUAGE%%j!\setup_help_upgrade_or_custom.rtf" > "%TEMPDIR%\search.txt"
  for /f "delims=" %%a in (%TEMPDIR%\search.txt) do xcopy "%%a" "%WIN10DVDDIR%\sources\!LANGUAGE%%j!\" /chrkyi
  dir /b /s "%PEEXTRACTDIR%\!LANGUAGE%%j!\vofflps.rtf" > "%TEMPDIR%\search.txt"
  for /f "delims=" %%a in (%TEMPDIR%\search.txt) do xcopy "%%a" "%WIN10DVDDIR%\sources\!LANGUAGE%%j!\" /chrkyi

  rem Copy language pack files to \sources\dlmanifests\
  mkdir "%WIN10DVDDIR%\sources\dlmanifests\!LANGUAGE%%j!"

  rem Copy language pack files to \sources\dlmanifests\microsoft-windows-iasserver-migplugin\
  if "%WIN10ARCH%"=="x86" xcopy "%LPEXTRACTDIR%\!LANGUAGE%%j!\setup\sources\!LANGUAGE%%j!\dlmanifests\microsoft-windows-iasserver-migplugin\*" "%WIN10DVDDIR%\sources\dlmanifests\microsoft-windows-iasserver-migplugin\!LANGUAGE%%j!\" /cherkyi

  rem Copy language pack files to \sources\dlmanifests\microsoft-windows-storagemigration\
  xcopy "%LPEXTRACTDIR%\!LANGUAGE%%j!\setup\sources\!LANGUAGE%%j!\dlmanifests\microsoft-windows-storagemigration\*" "%WIN10DVDDIR%\sources\dlmanifests\microsoft-windows-storagemigration\!LANGUAGE%%j!\" /cherkyi

  rem Copy language pack files to \sources\dlmanifests\microsoft-windows-sxs\
  xcopy "%LPEXTRACTDIR%\!LANGUAGE%%j!\setup\sources\!LANGUAGE%%j!\dlmanifests\microsoft-windows-sxs\*" "%WIN10DVDDIR%\sources\dlmanifests\microsoft-windows-sxs\!LANGUAGE%%j!\" /cherkyi

  rem Copy language pack files to \sources\etwproviders\
  xcopy "%LPEXTRACTDIR%\!LANGUAGE%%j!\setup\sources\!LANGUAGE%%j!\etwproviders\*" "%WIN10DVDDIR%\sources\etwproviders\!LANGUAGE%%j!\" /cherkyi

  rem Copy language pack files to \sources\replacementmanifests\
  mkdir "%WIN10DVDDIR%\sources\replacementmanifests\!LANGUAGE%%j!"

  rem Copy language pack files to \sources\replacementmanifests\microsoft-windows-offlinefiles-core\
  xcopy "%LPEXTRACTDIR%\!LANGUAGE%%j!\setup\sources\!LANGUAGE%%j!\replacementmanifests\microsoft-windows-offlinefiles-core\*" "%WIN10DVDDIR%\sources\replacementmanifests\microsoft-windows-offlinefiles-core\!LANGUAGE%%j!\" /cherkyi

  rem Copy language pack files to \sources\replacementmanifests\microsoft-windows-storagemigration\
  xcopy "%LPEXTRACTDIR%\!LANGUAGE%%j!\setup\sources\!LANGUAGE%%j!\replacementmanifests\microsoft-windows-storagemigration\*" "%WIN10DVDDIR%\sources\replacementmanifests\microsoft-windows-storagemigration\!LANGUAGE%%j!\" /cherkyi

  rem Copy language pack files to \sources\replacementmanifests\microsoft-windows-sxs\
  xcopy "%LPEXTRACTDIR%\!LANGUAGE%%j!\setup\sources\!LANGUAGE%%j!\replacementmanifests\microsoft-windows-sxs\*" "%WIN10DVDDIR%\sources\replacementmanifests\microsoft-windows-sxs\!LANGUAGE%%j!\" /cherkyi

  rem Copy language pack files to \sources\sxs\
  dir /s /b /a:d "%LPEXTRACTDIR%\!LANGUAGE%%j!\*microsoft-windows-wcfcorecomp.resources*" > "%TEMPDIR%\search.txt"
  for /f "delims=" %%a in (%TEMPDIR%\search.txt) do move "%%a" "%WIN10DVDDIR%\sources\sxs\"
  dir /s /b /a:d "%LPEXTRACTDIR%\!LANGUAGE%%j!\*microsoft-windows-wpfcorecomp.resources*" > "%TEMPDIR%\search.txt"
  for /f "delims=" %%a in (%TEMPDIR%\search.txt) do move "%%a" "%WIN10DVDDIR%\sources\sxs\"
  dir /s /b /a:d "%LPEXTRACTDIR%\!LANGUAGE%%j!\*microsoft-windows-wwfcorecomp.resources*" > "%TEMPDIR%\search.txt"
  for /f "delims=" %%a in (%TEMPDIR%\search.txt) do move "%%a" "%WIN10DVDDIR%\sources\sxs\"

  rem Copy language pack files to \support\logging\
  xcopy "%LPEXTRACTDIR%\!LANGUAGE%%j!\setup\sources\!LANGUAGE%%j!\etwproviders\*" "%WIN10DVDDIR%\support\logging\!LANGUAGE%%j!\" /cherkyi

  rem Copy language pack files to \support\migwiz\
  xcopy "%LPEXTRACTDIR%\!LANGUAGE%%j!\setup\sources\!LANGUAGE%%j!\input.dll.mui" "%WIN10DVDDIR%\support\migwiz\!LANGUAGE%%j!\" /chrkyi
  dir /b /s "%LPEXTRACTDIR%\!LANGUAGE%%j!\migautoplay.exe.mui" > "%TEMPDIR%\search.txt"
  for /f "delims=" %%a in (%TEMPDIR%\search.txt) do xcopy "%%a" "%WIN10DVDDIR%\support\migwiz\!LANGUAGE%%j!\" /chrkyi
  dir /b /s "%LPEXTRACTDIR%\!LANGUAGE%%j!\migres.dll.mui" > "%TEMPDIR%\search.txt"
  for /f "delims=" %%a in (%TEMPDIR%\search.txt) do xcopy "%%a" "%WIN10DVDDIR%\support\migwiz\!LANGUAGE%%j!\" /chrkyi
  dir /b /s "%LPEXTRACTDIR%\!LANGUAGE%%j!\migsetup.exe.mui" > "%TEMPDIR%\search.txt"
  for /f "delims=" %%a in (%TEMPDIR%\search.txt) do xcopy "%%a" "%WIN10DVDDIR%\support\migwiz\!LANGUAGE%%j!\" /chrkyi
  dir /b /s "%LPEXTRACTDIR%\!LANGUAGE%%j!\migwiz.exe.mui" > "%TEMPDIR%\search.txt"
  for /f "delims=" %%a in (%TEMPDIR%\search.txt) do xcopy "%%a" "%WIN10DVDDIR%\support\migwiz\!LANGUAGE%%j!\" /chrkyi
  dir /b /s "%LPEXTRACTDIR%\!LANGUAGE%%j!\postmig.exe.mui" > "%TEMPDIR%\search.txt"
  for /f "delims=" %%a in (%TEMPDIR%\search.txt) do xcopy "%%a" "%WIN10DVDDIR%\support\migwiz\!LANGUAGE%%j!\" /chrkyi
  dir /b /s "%LPEXTRACTDIR%\!LANGUAGE%%j!\wet.dll.mui" > "%TEMPDIR%\search.txt"
  for /f "delims=" %%a in (%TEMPDIR%\search.txt) do xcopy "%%a" "%WIN10DVDDIR%\support\migwiz\!LANGUAGE%%j!\" /chrkyi

  del /f /q "%TEMPDIR%\search.txt"
)

echo.
echo ==================================================================
echo Create Windows 10 %WIN10ARCH% MUI ISO image
echo ==================================================================
echo.
"%KITPATH%\Deployment Tools\x86\Oscdimg\oscdimg.exe" -m -o -u2 -udfver102 -bootdata:2#p0,e,b"%WIN10DVDDIR%\boot\etfsboot.com"#pEF,e,b"%WIN10DVDDIR%\efi\microsoft\boot\efisys.bin" "%WIN10DVDDIR%" "%WIN10DVDISO%"
if errorlevel 1 goto E_CREATEISO

echo.
echo ==================================================================
echo Remove temporary directories
echo ==================================================================
echo.
if exist "%WIN10DVDDIR%" rmdir /s /q "%WIN10DVDDIR%"
if errorlevel 1 goto E_DELDIR
if exist "%TEMPDIR%" rmdir /s /q "%TEMPDIR%"
if errorlevel 1 goto E_DELDIR

goto DONE

:E_KITPATH
set MESSAGE=ERROR: Could not find the ADK directory!
goto END

:E_DELDIR
set MESSAGE=ERROR: Could not delete temporary directory!
goto END

:E_MKDIR
set MESSAGE=ERROR: Could not create temporary directory!
goto END

:E_LPFILE
set MESSAGE=ERROR: Could not find language pack!
goto END

:E_MOUNT
set MESSAGE=ERROR: Could not mount WIM image!
goto END

:E_UNMOUNT
set MESSAGE=ERROR: Could not unmount WIM image!
goto END

:E_CREATEISO
set MESSAGE=ERROR: Could not create "%WIN10DVDISO%"!
goto END

:DONE
cls
set MESSAGE=Done
goto END

:END
echo.
echo ==================================================================
echo %MESSAGE%
echo ==================================================================
echo.
pause
exit


Dieser Eintrag wurde am 08.05.2016 erstellt.

Direkter Link zu dieser Seite: http://www.gtkdb.de/index_39_2790.html

[ Zur Startseite ]   [ Zur Kategorie ]


Valid XHTML 1.0 Transitional Valid CSS Valid Atom 1.0

© 2004-2018 by Georg Kainzbauer