Wednesday, October 7, 2009

Installing and configuring language packs and settings from the command line in Windows 7

The current rollout I’m working on is based on a complete unchanged image from the Windows 7 DVD and several scripts that are running once Windows is installed.

We have done this to make sure that we are always able to update existing installations. That’s simply because it forces us to find the correct commands when Windows is already installed and not working on a WIM image.

One of these things was to install one or more language packs and then reconfigure Windows so it uses a new language (this needs to be done on the command line and not manually of course).

For this, you first need to get the language packs you want to install. Since we are using the Enterprise version of Windows 7, this was easy since there is a separate DVD (mu_windows_7_language_pack_x86_dvd_X15-73272.iso) which contains all language packs.

I simply copied the folders we want to install (de-DE, fr-FR and es-ES) from the DVD to a share. The directory structure then looked like this:


To install, simple use the lpksetup.exe utility which is included in Windows 7. Executing it with this command:

lpksetup.exe /i * /r /s /p \\swdepot\Win7\LP\

This will install all language packs inside the folder “\LP”.

In order to switch the language, we are using XML files that we basically designed for Vista but still work with Windows 7 (call me lazy…).

To set everything a German user expect (Formats, Location, Language etc.) and to apply the same settings to any new user that logs on, we use the following XML file:

<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">
<!--User List-->
<gs:User UserID="Current" CopySettingsToDefaultUserAcct="true" CopySettingsToSystemAcct="true"/>
<!--User Locale-->
<gs:Locale Name="de-DE" ResetAllSettings="true" SetAsCurrent="true"/>

<!--Display Language-->
<gs:MUILanguage Value="de-DE" />
<gs:MUIFallback Value="en-US" />

<!-- 0xF4 United States = 244 -->
<!-- 0x5E Germany = 94 -->
<gs:GeoID Value="94"/>


Most of the settings inside this file should be pretty self-explanatory, but here the link to the detailed explanation:

The only “odd” setting inside this file is the “GeoID”. You need to retrieve the matching ID from this page:

To execute this file use the following command line:

control intl.cpl,, /f:\\swdepot\Win7\Intl_de-DE.xml

To switch back to English, simply replace “de-DE” with “en-US”, set the GeoID to the correct value and apply the new XML file with the command above.

No comments:

Post a Comment