VMM: VM-Template - Regional settings (Keyboard-Layouts)

Aus Wiki-WebPerfect
Wechseln zu: Navigation, Suche

UserLocale: specifies the per-user settings used for formatting dates, times, currency, and numbers in a Windows installation.
Users can change this value on a running Windows installation by using the Administrative pane in the Region and Language Control Panel.

SystemLocale: specifies the default language to use for non-Unicode programs. The system locale specifies the bitmap fonts and code pages (ANSI or DOS) that are used on the system by default. The system locale setting affects only ANSI (non-Unicode) applications. The language for non-Unicode programs is a per-system setting. Users can change the system locale by using the Administrative tab in the Region and Language item in Control Panel.

UILanguage: specifies the default system language that is used to display user interface (UI) items (such as menus, dialog boxes, and Help files).

UILanguageFallback: pecifies the language that is used for resources that are not localized for the default system user interface (UI) (the UILanguage setting).
This setting is used by Windows Setup and Windows Deployment Services. A fallback language is used when resources are not localized for a partially localized language. For example, Arabic is a partially localized lO language. Only 80% of the Windows resources are localized into Arabic. The possible fallback languages for the Arabic language pack are its base languages, English and French.

You only need to specify this setting if the language that UILanguage specifies is not fully localized and has more than one fallback language. In all other cases, this setting will be ignored.

InputLocale: specifies the input language and the method for input devices, such as the keyboard layout.
Multiple input locales can be installed, and the user can switch between them. Users can add and remove input locales through the Keyboard and Languages tab of the Region and Language Control Panel.


Option 1 - Use PowerShell to set the regional Settings

Following Example with the Keyboard-Layouts:

  • German - Swiss German
  • German - Germany
  • English - US


$templatename = "<VM-Template-Name>"
 
$template = Get-SCVMtemplate | where {$_.Name  -eq "$templatename"} 
$settings = $template.UnattendSettings;
$settings.add("oobeSystem/Microsoft-Windows-International-Core/UserLocale","de-CH");
$settings.add("oobeSystem/Microsoft-Windows-International-Core/SystemLocale","de-CH");
$settings.add("oobeSystem/Microsoft-Windows-International-Core/UILanguage","en-US");
$settings.add("oobeSystem/Microsoft-Windows-International-Core/UILanguageFallback","en-US");
$settings.add("oobeSystem/Microsoft-Windows-International-Core/InputLocale","0807:00000807;0407:00000407;0409:00000409");
Set-SCVMTemplate -VMTemplate $template -UnattendSettings $settings



Option 2 - Use an Answer/Unattend File (XML-File) to set the regional Settings

Create an unattend.xml with the specific locale settings required. Below is a sample unattand.xml set to en-us but you can replace the en-us entries with the language code of your choice.

Following Example with the Keyboard-Layouts:

  • German - Swiss German
  • German - Germany
  • English - US
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <InputLocale>de-CH;de-DE;en-US</InputLocale> <!-- or with the "Default Input Locales Codes" for example: <InputLocale>0807:00000807;0407:00000407;0409:00000409</InputLocale> -->
            <SystemLocale>de-CH</SystemLocale>
            <UILanguage>en-US</UILanguage>
            <UILanguageFallback>en-US</UILanguageFallback>
            <UserLocale>de-CH</UserLocale>
        </component>
    </settings>
</unattend>

Add this XML (Answer File) to the VM-Template: VM-Template -> Properties -> OS Configuration -> Scripts -> Answer File



More Information: