Install this language pack, then that...
Why?
The process goes...
Build it quick!
call:IsAdmin
call "%SystemDrive%\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\DandISetEnv.bat"
call:CreatePE x86
call:CreatePE amd64
pause
goto:eof
:CreatePE
set OUTPE=%SystemDrive%\WinPE10%1
echo Copying Windows 10 PE %1 Files ...
call copype %1 "%OUTPE%" > "%SystemDrive%\PE%1_log.txt"
echo - Mounting image
Dism /Mount-Image /ImageFile:"%OUTPE%\media\sources\boot.wim" /index:1 /MountDir:"%OUTPE%\mount" >> "%SystemDrive%\PE%1_log.txt"
echo - Setting scratch space capacity
Dism /Set-ScratchSpace:512 /Image:"%OUTPE%\mount" >> "%SystemDrive%\PE%1_log.txt"
echo - Adding Language Packages
call:AddLP %1 en-us
call:AddLP %1 en-gb
echo - Applying Optional Components
call:AddOC %1 WinPE-MDAC
call:AddOC %1 WinPE-FMAPI
call:AddOC %1 WinPE-EnhancedStorage
call:AddOC %1 WinPE-WDS-Tools
call:AddOC %1 WinPE-RNDIS
call:AddOC %1 WinPE-Dot3Svc
call:AddOC %1 WinPE-GamingPeripherals
call:AddOC %1 WinPE-WinReCfg
call:AddOC %1 WinPE-WMI
call:AddOC %1 WinPE-SecureStartup
call:AddOC %1 WinPE-NetFX
call:AddOC %1 WinPE-Scripting
call:AddOC %1 WinPE-PowerShell
call:AddOC %1 WinPE-DismCmdlets
call:AddOC %1 WinPE-SecureBootCmdlets
call:AddOC %1 WinPE-StorageWMI
call:AddOC %1 WinPE-PlatformID
echo - Setting Language
Dism /Set-AllIntl:en-GB /Image:"%OUTPE%\mount" >> "%SystemDrive%\PE%1_log.txt"
echo - Committing changes
Dism /Unmount-Image /MountDir:"%OUTPE%\mount" /commit >> "%SystemDrive%\PE%1_log.txt"
echo Creating ISO ...
call MakeWinPEMedia /ISO "%OUTPE%" "%OUTPE%.iso"
start notepad "%SystemDrive%\PE%1_log.txt"
start powershell -EP bypass -NoE -Command "Select-String -Path '%SystemDrive%\PE%1_log.txt' -Pattern 'operation'"
echo Process complete.
goto:eof
:AddOC
echo -- Applying %2
Dism /Add-Package /Image:"%SystemDrive%\WinPE10%1\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\%1\WinPE_OCs\%2.cab" >> "%SystemDrive%\PE%1_log.txt"
set l=en-us
if exist "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\%1\WinPE_OCs\%l%\%2_%l%.cab" (
echo --- Applying language pack for %l%
Dism /Add-Package /Image:"%SystemDrive%\WinPE10%1\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\%1\WinPE_OCs\%l%\%2_%l%.cab" >> "%SystemDrive%\PE%1_log.txt"
)
set l=en-gb
if exist "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\%1\WinPE_OCs\%l%\%2_%l%.cab" (
echo --- Applying language pack for %l%
Dism /Add-Package /Image:"%SystemDrive%\WinPE10%1\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\%1\WinPE_OCs\%l%\%2_%l%.cab" >> "%SystemDrive%\PE%1_log.txt"
)
goto:eof
:AddLP
echo -- Applying language pack for %2
Dism /Add-Package /Image:"%SystemDrive%\WinPE10%1\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\%1\WinPE_OCs\%2\lp.cab" >> "%SystemDrive%\PE%1_log.txt"
goto:eof
:IsAdmin
%systemroot%\system32\Reg.exe query "HKU\S-1-5-19\Environment"
If Not %ERRORLEVEL% EQU 0 (
Cls & Echo You must have administrator rights to continue ...
Pause & Exit
)
Cls
goto:eof