On a recent project there was a requirement to install different language pack’s and configure regional / keyboard settings. I was having issue getting this working so I though I would do a post on how I ended up getting it working correctly.
To skip the OOBE initial setup screen we can use a unattended XML answer file. I have done a different post for creating a basic answer file see link below.
https://thesleepyadmins.com/2019/05/31/create-windows-10-answer-file/
If this is not setup you will be prompted to complete the initial Windows 10 setup along with selecting the language settings.
The next problem I had was trying to find the language packs I ended up downloading the language pack ISO from the Microsoft visual studio site.
Once downloaded I need to mount the ISO and copy the required
Once all the required language packs where copied. Create a new packages for each pack
The next step is to configure the XML file’s that will be used to configure the regional and keyboard settings for each language pack. I used this support how to as a reference for the XML:
Below is the XML file that was used for the German language pack:
Below is the export from the above XML file: (Check double quotes if coping as the format can change when coping and that will cause issues)
<gs:GlobalizationServices xmlns:gs=”urn:longhornGlobalizationUnattend”>
<!– user list –>
<gs:UserList>
<gs:User UserID=”Current” CopySettingsToDefaultUserAcct=”true” CopySettingsToSystemAcct=”true”/>
</gs:UserList><!– system locale –>
<gs:SystemLocale Name=”de-DE”/><!–User Locale–>
<gs:UserLocale>
<gs:Locale Name=”de-DE” SetAsCurrent=”true” ResetAllSettings=”false”/>
</gs:UserLocale><!–location–>
<gs:LocationPreferences>
<gs:GeoID Value=”94″/>
</gs:LocationPreferences><!– input preferences –>
<gs:InputPreferences>
<gs:InputLanguageID Action=”add” ID=”0407:00000407″ Default=”true”/>
<gs:InputLanguageID Action=”remove” ID=”0409:00000409″/>
</gs:InputPreferences></gs:GlobalizationServices>
I used the below sites to get the GEO ID & the Input Locales
GEO ID : https://docs.microsoft.com/en-ie/windows/desktop/Intl/table-of-geographical-locations
Input Locales: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-input-locales-for-windows-language-packs
Once we have all the language packs completed create a single package with all the XML’s file’s or add the XML’s to the Language packages created above. I went with one package for all the XML’s
Next step is to add the steps to the Windows 10 task sequence
Add a run command line task, use the command below and replace with the required language pack .cab file. Select the corresponding package.
Below is for the german .cab
dism.exe /norestart /online /add-package /packagepath:.\Microsoft-Windows-Client-Language-Pack_x64_de-de(German).cab
After this step add a restart task
Next step is to apply the XML file’s to set the regional / Keyboard settings. Below is the command line I used
rundll32.exe shell32,Control_RunDLL intl.cpl,,/f:”.\German.xml”
When copying the command above check that the double quotes are in the correct format or the command could fail to apply the xml file
After this step do another restart, the last step I did was to configure time zone for each region. I used the below site to get the time zone values
Time Zone Values: https://support.microsoft.com/en-us/help/973627/microsoft-time-zone-index-values
Below is the command line to set the time zones
cmd.exe /c tzutil.exe /s “W. Europe Standard Time”
Below is the finished task sequence with all languages added
Last step was to set a condition to apply each package. I used host name as the condition to apply the language packs as each country has its own naming convention this was the easiest way for me
Once this is competed I tested and all packages were applied without error.
Thanks for this – a couple of questions though: you create one XML file per language pack, put them all in the same folder and then create one package that will download all XML files and depending on the selection that is made, the correct language will be set once ready.
Will that remove the en-Us language, or will that stay so support can easily change between users native language and English for support reasons.
Looking forward for your answers.
LikeLike
Hi Bert
I just created one package with all the xml files and then base on the computer name run the command for that language. I have done it slightly different in another project where I just add the xml file to the package that has the language pack cab and then use that package when running the command. Either will work just depend on your preference.
I am using the English US version ISO so English is the default language and will still able to be selected as a language in the windows settings.
LikeLike
Hi,
thank you very much for the article. Thats exactly what i need. I only get the OOBE initial setup screen. Would it be possible to share your unattended XML answer file?
LikeLike
Hi
I just used a basic answer file created using Windows system image manager. I will add the XML code to the post.
LikeLike
Thanks your very much.
I set the languagessettings and the the timezone in a powershell task. I think thats a little bit smarter, because you do not have to create the xml files for every language.
#Current Time Zone
#[TimeZoneInfo]::Local
#Read devicename and save it to a variable
$DeviceName = $env:computername
$DeviceLand = $DeviceName.substring(0,2)
#Set the time zone according to the device name
switch ($DeviceLand)
{
CH {$TimeZone = “W. Europe Standard Time”
Set-Culture de-CH
Set-WinSystemLocale de-CH
Set-WinHomeLocation -GeoId 0xdf
Set-WinUserLanguageList de-CH -force
Set-WinSystemLocale de-CH
Set-WinUILanguageOverride de-CH
Set-WinDefaultInputMethodOverride “0807:00000807”
}
DE {$TimeZone = “W. Europe Standard Time”
Set-Culture de-DE
Set-WinSystemLocale de-DE
Set-WinHomeLocation -GeoId 0x5e
Set-WinUserLanguageList de-DE -force
Set-WinSystemLocale de-DE
Set-WinUILanguageOverride de-DE
Set-WinDefaultInputMethodOverride “0407:00000407”
}
PL {$TimeZone = “Central European Standard Time”
Set-Culture pl-PL
Set-WinSystemLocale pl-PL
Set-WinHomeLocation -GeoId 0xbf
Set-WinUserLanguageList pl-PL -force
Set-WinSystemLocale pl-PL
Set-WinUILanguageOverride pl-PL
Set-WinDefaultInputMethodOverride “0415:00000415”
}
IE {$TimeZone = “GMT Standard Time”
Set-Culture en-GB
Set-WinSystemLocale en-GB
Set-WinHomeLocation -GeoId 0xf2
Set-WinUserLanguageList en-GB -force
Set-WinSystemLocale en-GB
Set-WinUILanguageOverride en-GB
Set-WinDefaultInputMethodOverride “0809:00000809”
}
GB {$TimeZone = “GMT Standard Time”
Set-Culture en-GB
Set-WinSystemLocale en-GB
Set-WinHomeLocation -GeoId 0xf2
Set-WinUserLanguageList en-GB -force
Set-WinSystemLocale en-GB
Set-WinUILanguageOverride en-GB
Set-WinDefaultInputMethodOverride “0809:00000809”
}
FR {$TimeZone = “W. Europe Standard Time”
Set-Culture fr-FR
Set-WinSystemLocale fr-FR
Set-WinHomeLocation -GeoId 0x54
Set-WinUserLanguageList fr-FR -force
Set-WinSystemLocale fr-FR
Set-WinUILanguageOverride fr-FR
Set-WinDefaultInputMethodOverride “040C:0000040C”
}
SV {$TimeZone = “W. Europe Standard Time”
Set-Culture sv-SE
Set-WinSystemLocale sv-SE
Set-WinHomeLocation -GeoId 0xdd
Set-WinUserLanguageList sv-SE -force
Set-WinSystemLocale sv-SE
Set-WinUILanguageOverride sv-SE
Set-WinDefaultInputMethodOverride “041D:0000041D”
}
default {$TimeZone = “GMT Standard Time”}
}
tzutil.exe /s $TimeZone
#Show message saying the time zone was set
#[System.Windows.Forms.MessageBox]::Show(“Time Zone ‘$TimeZone’ has been set”,” OS Deployment”,0)
control.exe “intl.cpl,,/f:`”.\copysettings.xml`””
exit 0
—————
copysettings.xml:
LikeLiked by 1 person
Hello,
Is it an SCCM or MDT TS? Also, at which steps should I add them?
LikeLike
Hi Fred
This is an SCCM TS but should also work in an MDT TS. I applied after the first reboot in to Operating system step once the OS has been applied.
LikeLike
Why not just set variables that are used in Unattend.xml for the language and keyboard? OSDTimeZone for example is built in.
LikeLike
No reason just how I figured it out and it worked well but I can take a look at variables see if that’s any better.
LikeLike
Here is what I am trying, after setting the variables via UI++ based on location prompts.
1) Applied the Language Pack offline to install.wim (my client only has one LP so does not hurt to just include in the base WIM).
2) Prompt for region in UI++ (my favorite user prompt tool) – Also sets the OSDTimeZone variable, which SCCM automatically injects into Unattend.xml.
3) Set the following in Unattend.xml as part of Apply OS.
%KeyboardLocale%
%SystemLocale%
%SystemLocale%
en-US
%UserLocale%
I am having some issues where the default system language isn’t getting set. Not sure if it is because I included the LP in the base WIM. I would be curious to see what you find.
LikeLike