Change Keyboard layout in WinPE

The following will explain how to change the default keyboard layout in WinPE.

Run the following commands from an elevated command prompt:

  1. dism /mount-wim /wimfile:”<PATH TO BOOT WIM>” /index:1 /mountDir:C:\temp\mount
  2. dism /image:c:\temp\mount /set-inputlocale:da-dk;en-us
  3. dism /unmount-wim /mountdir:c:\temp\mount /commit

I had to repeat the procedure a couple of times so I created a small script to handle it for me

(Save the code in a CMD file)

@Echo off
Set MountDir=C:\Temp\Mount
Set InputLocals=da-dk;en-us
IF Not exist %MountDir% (mkdir %MountDir%)
echo Mountdir: %MountDir%
echo InputLocale: %InputLocals%
Echo Mounting image: "%~dp0winpe.wim"
dism /mount-wim /wimfile:"%~dp0winpe.wim" /index:1 /MountDir:"%MountDir%"
dism /image:"%MountDir%" /set-inputlocale:%InputLocals%
dism /unmount-wim /MountDir:"%MountDir%" /commit
rmdir /S /Q %MountDir%
This entry was posted in Operating System Deployment. Bookmark the permalink.