Good to Know Database

Windows 8.1 Installations-DVD mit zusätzlichen Sprachen ausstatten


Standardmäßig bringt eine Windows 8.1 Installations-DVD nur eine Sprache mit. Wenn Sie Windows 8.1 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 8.1 Installations-DVD um weitere Sprachen erweitern. Dazu werden die bereits erwähnten Multilingual User Interface Packs verwendet.

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

Eine Liste mit Download-Links der einzelnen Language Packs für Windows 8.1 finden Sie auf der Seite Windows 8.1 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 8.1 x86/x64 DVD
rem
rem 20131005 v1.0    Create multilingual Windows 8.1 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 8.1 DVD
rem Set "x86" for 32 bit architecture
rem Set "amd64" for 64 bit architecture
set WIN81ARCH=amd64

rem Temporary directory to store the Windows 8.1 DVD content (e.g. "D:\Win8.1_DVD")
set WIN81DVDDIR=%WORKDIR%\Win8.1_%WIN81ARCH%_DVD

rem Path and filename for the ISO output file (e.g. "D:\Win8.1_MUI_DVD.iso")
set WIN81DVDISO=%WORKDIR%\Win8.1_%WIN81ARCH%_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\%WIN81ARCH%\en-gb\lp.cab
set LPFILE2=%WORKDIR%\LanguagePacks\%WIN81ARCH%\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%\Win8.1_%WIN81ARCH%_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 (x86)\Windows Kits\8.1\Assessment and Deployment Kit" set KITPATH=C:\Program Files (x86)\Windows Kits\8.1\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 "%WIN81DVDDIR%" rmdir /s /q "%WIN81DVDDIR%"
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 "%WIN81DVDDIR%"
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 8.1 DVD to the temporary directory
echo ==================================================================
echo.
echo Please insert the Windows 8.1 %WIN81ARCH% DVD into the DVD drive %DVDDRIVE%
echo.
pause
xcopy "%DVDDRIVE%\*.*" "%WIN81DVDDIR%" /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

rem Set count of available Windows 8.1 versions
"%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Get-WimInfo /WimFile:"%WIN81DVDDIR%\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 image
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:"%WIN81DVDDIR%\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:"%WIN81DVDDIR%"
  "%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:"%WIN81DVDDIR%"

  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 Extract winre.wim - %%i of %VERSIONS%
  echo ==================================================================
  echo.
  if not exist "%TEMPDIR%\winre.wim" copy "%INSTALLMOUNTDIR%\Windows\System32\Recovery\winre.wim" "%TEMPDIR%\" /y

  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 packs to the WinRE image
echo ==================================================================
echo.

echo.
echo ==================================================================
echo Mount winre.wim
echo ==================================================================
echo.
"%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Mount-Wim /WimFile:"%TEMPDIR%\winre.wim" /Index:1 /MountDir:"%WINREMOUNTDIR%"
if errorlevel 1 goto E_MOUNT

echo.
echo ==================================================================
echo Add language packs to winre.wim
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\%WIN81ARCH%\WinPE_OCs\!LANGUAGE%%j!\lp.cab"
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%WINREMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN81ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-EnhancedStorage_!LANGUAGE%%j!.cab"
  rem No localized version of WinPE-IbsProvider package available!
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%WINREMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN81ARCH%\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\%WIN81ARCH%\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\%WIN81ARCH%\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\%WIN81ARCH%\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\%WIN81ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-WMI_!LANGUAGE%%j!.cab"
)

echo.
echo ==================================================================
echo Update default settings of winre.wim
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
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 Add updated winre.wim to the installation image
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:"%WIN81DVDDIR%\sources\install.wim" /Index:%%i /MountDir:"%INSTALLMOUNTDIR%"
  if errorlevel 1 goto E_MOUNT

  echo.
  echo ==================================================================
  echo Update winre.wim - %%i of %VERSIONS%
  echo ==================================================================
  echo.
  copy "%TEMPDIR%\winre.wim" "%INSTALLMOUNTDIR%\Windows\System32\Recovery\" /y

  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 Windows 8.1 DVD
echo ==================================================================
echo.
for /L %%j in (1, 1, %LANGUAGES%) do (
  echo.
  echo ==================================================================
  echo Extract Windows 8.1 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\%WIN81ARCH%\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" "%WIN81DVDDIR%\boot\!LANGUAGE%%j!\" /chrkyi

  rem Copy language pack files to \sources\
  xcopy "%LPEXTRACTDIR%\!LANGUAGE%%j!\setup\sources\!LANGUAGE%%j!\*" "%WIN81DVDDIR%\sources\!LANGUAGE%%j!" /cherkyi
  rmdir /s /q "%WIN81DVDDIR%\sources\!LANGUAGE%%j!\cli"
  rmdir /s /q "%WIN81DVDDIR%\sources\!LANGUAGE%%j!\dlmanifests"
  rmdir /s /q "%WIN81DVDDIR%\sources\!LANGUAGE%%j!\etwproviders"
  rmdir /s /q "%WIN81DVDDIR%\sources\!LANGUAGE%%j!\replacementmanifests"
  xcopy "%LPEXTRACTDIR%\!LANGUAGE%%j!\setup\sources\!LANGUAGE%%j!\cli\*" "%WIN81DVDDIR%\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" "%WIN81DVDDIR%\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" "%WIN81DVDDIR%\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" "%WIN81DVDDIR%\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" "%WIN81DVDDIR%\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" "%WIN81DVDDIR%\sources\!LANGUAGE%%j!\" /chrkyi
  rem No localized version of "setup_help_whattokeep.rtf" available!
  dir /b /s "%PEEXTRACTDIR%\!LANGUAGE%%j!\vofflps.rtf" > "%TEMPDIR%\search.txt"
  for /f "delims=" %%a in (%TEMPDIR%\search.txt) do xcopy "%%a" "%WIN81DVDDIR%\sources\!LANGUAGE%%j!\" /chrkyi

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

  rem Copy language pack files to \sources\dlmanifests\microsoft-windows-iasserver-migplugin\
  if "%WIN81ARCH%"=="x86" xcopy "%LPEXTRACTDIR%\!LANGUAGE%%j!\setup\sources\!LANGUAGE%%j!\dlmanifests\microsoft-windows-iasserver-migplugin\*" "%WIN81DVDDIR%\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\*" "%WIN81DVDDIR%\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\*" "%WIN81DVDDIR%\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\*" "%WIN81DVDDIR%\sources\etwproviders\!LANGUAGE%%j!\" /cherkyi

  rem Copy language pack files to \sources\migration\wtr\
  rem No localized version of "adminpack_en-us.inf" available!
  rem No localized version of "adminpack_en-us_noloc.inf" available!
  rem No localized version of "ftp_7.5_en-us_noloc.inf" available!
  rem No localized version of "powershell_en-us_noloc.inf" available!
  rem No localized version of "webdav_7.5_en-us_noloc.inf" available!

  rem Copy language pack files to \sources\replacementmanifests\
  mkdir "%WIN81DVDDIR%\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\*" "%WIN81DVDDIR%\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\*" "%WIN81DVDDIR%\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\*" "%WIN81DVDDIR%\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" "%WIN81DVDDIR%\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" "%WIN81DVDDIR%\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" "%WIN81DVDDIR%\sources\sxs\"

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

  rem Copy language pack files to \support\migwiz\
  xcopy "%LPEXTRACTDIR%\!LANGUAGE%%j!\setup\sources\!LANGUAGE%%j!\input.dll.mui" "%WIN81DVDDIR%\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" "%WIN81DVDDIR%\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" "%WIN81DVDDIR%\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" "%WIN81DVDDIR%\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" "%WIN81DVDDIR%\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" "%WIN81DVDDIR%\support\migwiz\!LANGUAGE%%j!\" /chrkyi
  rem No localized version of "svrmig.dll.mui" available!
  dir /b /s "%LPEXTRACTDIR%\!LANGUAGE%%j!\wet.dll.mui" > "%TEMPDIR%\search.txt"
  for /f "delims=" %%a in (%TEMPDIR%\search.txt) do xcopy "%%a" "%WIN81DVDDIR%\support\migwiz\!LANGUAGE%%j!\" /chrkyi

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

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:"%WIN81DVDDIR%\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\%WIN81ARCH%\WinPE_OCs\!LANGUAGE%%j!\lp.cab"
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN81ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-EnhancedStorage_!LANGUAGE%%j!.cab"
  rem No localized version of WinPE-IbsProvider package available!
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN81ARCH%\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\%WIN81ARCH%\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\%WIN81ARCH%\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\%WIN81ARCH%\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\%WIN81ARCH%\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:"%WIN81DVDDIR%\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\%WIN81ARCH%\WinPE_OCs\!LANGUAGE%%j!\lp.cab"
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN81ARCH%\WinPE_OCs\!LANGUAGE%%j!\WinPE-EnhancedStorage_!LANGUAGE%%j!.cab"
  rem No localized version of WinPE-IbsProvider package available!
  "%KITPATH%\Deployment Tools\x86\DISM\dism.exe" /Image:"%BOOTMOUNTDIR%" /Add-Package /PackagePath:"%KITPATH%\Windows Preinstallation Environment\%WIN81ARCH%\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\%WIN81ARCH%\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\%WIN81ARCH%\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\%WIN81ARCH%\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\%WIN81ARCH%\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\%WIN81ARCH%\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\%WIN81ARCH%\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 Create Windows 8.1 %WIN81ARCH% MUI ISO image
echo ==================================================================
echo.
"%KITPATH%\Deployment Tools\x86\Oscdimg\oscdimg.exe" -m -o -u2 -udfver102 -bootdata:2#p0,e,b"%WIN81DVDDIR%\boot\etfsboot.com"#pEF,e,b"%WIN81DVDDIR%\efi\microsoft\boot\efisys.bin" "%WIN81DVDDIR%" "%WIN81DVDISO%"
if errorlevel 1 goto E_CREATEISO

echo.
echo ==================================================================
echo Remove temporary directories
echo ==================================================================
echo.
if exist "%WIN81DVDDIR%" rmdir /s /q "%WIN81DVDDIR%"
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 "%WIN81DVDISO%"!
goto END

:DONE
cls
set MESSAGE=Done
goto END

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


Dieser Eintrag wurde am 06.10.2013 erstellt und zuletzt am 01.05.2016 bearbeitet.

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

[ Zur Startseite ]   [ Zur Kategorie ]


Valid XHTML 1.0 Transitional Valid CSS Valid Atom 1.0

© 2004-2018 by Georg Kainzbauer