none
Change input language on welcome screen through powershell RRS feed

  • Question

  • I'm using LANDesk te deploy systems and remotely manage them. We have users with different kind of language settings and different keyboard layouts. The problem is that some people might want to change them. I want to do this remotely, so I want to create a script that users can activate in the LANDesk workspace (so the script can be run as local system account).

    So far I am able to change the user language, system language and user keyboard. However, I can not get the keyboard layout to be set in the welcome screen.

    Now I know of the GUI methods to get this working, but I need everything working through scripts (preferably Powershell, since I'm slightly familiar with it).

    I see most people reference to "HKEY_USERS\.Default\Keyboard Layout\preload" when mentioning Welcome Screen keyboard layout. However, everytime I change this, it changes in the registry correctly. But after a reboot everything is set back to the previous value.

    I just can not find what I have to do to permanently edit HKEY_USERS\.Default\

    Code I run as user:

    #Execute as user
    $Taalcode = "0413"
    $Taalnaam = "nl-NL"
    $Taalcont = "00020409"
    $TaalGeoD = "0xB0"
    
    Set-WinUserLanguageList $Taalnaam -force
    Set-WinSystemLocale $Taalnaam
    Set-WinUILanguageOverride $Taalnaam
    Set-Culture -CultureInfo $Taalnaam
    Set-WinHomeLocation -GeoId $TaalGeoD

    Code I run as local system account:

    #Execute as admin
    $Taalcode = "0413"
    $Taalnaam = "nl-NL"
    $Taalcont = "00020409"
    $TaalGeoD = "0xB0"
    
    Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Nls\Language" -Name InstallLanguage -Value $Taalcode
    Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Nls\Language" -Name Default -Value $Taalcode
    Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Nls\Language" -Name InstallLanguageFallback -Value $Taalnaam
    
    New-PSDrive -Name HKU -PSProvider Registry -Scope Global -Root HKEY_USERS
    reg load HKU\DefaultUser "C:\Users\Default\NTUSER.DAT"
    Set-ItemProperty -Path "HKU:\DefaultUser\Keyboard Layout\preload" -Name 1 -Value "0000${Taalcode}"
    Set-ItemProperty -Path "HKU:\DefaultUser\Keyboard Layout\Substitutes" -Name "0000${Taalcode}" -Value $Taalcont
    reg unload HKU\DefaultUser
    Set-ItemProperty -Path "Microsoft.PowerShell.Core\Registry::HKEY_USERS\.Default\Keyboard Layout\preload" -Name 1 -Value "0000${Taalcode}"
    Set-ItemProperty -Path "Microsoft.PowerShell.Core\Registry::HKEY_USERS\.Default\Keyboard Layout\Substitutes" -Name "0000${Taalcode}" -Value $Taalcont

    Tuesday, December 27, 2016 3:45 PM

All replies

  • Hi ,

    Did you enable this group policy (Disallow copying of user input methods to the system account for sign-in)?
    Please try it. Here is a similar case for your reference. Please check Alexander Davidenko's reply for detailed information.

    But this policy doesn't work on Win10 by default, "from box". And that's why.
    There is undocumented feature in Windows 8/8.1/10. It performs automatically copying user language settings to login screen. This feature can be disabled by Local or Domain GPO here:
    Computer configuration/Administrative Templates/System/Locale Services/
    Disallow copying of user input methods to the system account for sign-in

    Setting the default input method for the Windows 10 login screen
    http://superuser.com/questions/955783/setting-the-default-input-method-for-the-windows-10-login-screen
    NOTE: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites.

    Best regards


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, December 28, 2016 7:46 AM
    Moderator
  • Hi, thanks for your response.

    I aim to use no group policy at all, since within this company I do not control group policies. I want to control the user and system language and input on every laptop remotely. This through launching powershell scripts as user or local system.

    So if Windows copies user settings to the logon screen, what do I have to change that those user settings are correct? Because when a user is logged in, all settings are as I want them to be.

    So far I noticed that when I log onto a local administrator account on a laptop, and run the scripts. The welcome screen does get changed with correct input language everytime I reboot. However, when I log onto a domain user, the language and input settings are correct when logged in, but after a reboot the Welcome screen reverts to the wrong input language. So while all settings stay correct when logged in, only the Welcome screen input language reverts after a reboot, after logging onto a domain account.

    So far I changed a little to the scripts, now extending the registry changes based on this thread (can't post links yet).

    [social.technet.microsoft......] /Forums/windows/en-US/6a21b20a-4d04-460a-b672-968de78c6646/command-line-tools-to-completely-change-regioninput-language-for-default-user-and-welcome-screen?forum=winservergen

    #Execute as user
    $Taalcode = "0413"
    $Taalnaam = "nl-NL"
    $Taalcont = "00020409"
    $TaalGeoD = "0xB0"
    
    Set-WinUserLanguageList $Taalnaam -force
    Set-WinSystemLocale $Taalnaam
    Set-WinUILanguageOverride $Taalnaam
    Set-Culture -CultureInfo $Taalnaam
    Set-WinHomeLocation -GeoId $TaalGeoD
    Set-WinUserLanguageList $Taalnaam -force
    #Execute as local system account
    $Taalcode = "0413"
    $Taalnaam = "nl-NL"
    $Taalcont = "00020409"
    $TaalGeoD = "0xB0"
    $DfltHKEY = "HKU\DEFAULT_USER"
    $DfltNTDT = "C:\Users\Default\NTUSER.DAT"
    $DRegDflt = "NL_.Default.reg"
    $FRegDflt = "NL_DEFAULT_USER.reg"
    
    Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Nls\Language" -Name InstallLanguage -Value $Taalcode
    Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Nls\Language" -Name Default -Value $Taalcode
    Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Nls\Language" -Name InstallLanguageFallback -Value $Taalnaam
    reg load $DfltHKEY $DfltNTDT
    reg import $FRegDflt
    reg unload $DfltHKEY
    reg import $DRegDflt

    Importing the following registry files:

    $FRegDflt

    Windows Registry Editor Version 5.00
    
    [HKEY_USERS\DEFAULT_USER\Control Panel\International]
    "Locale"="00000413"
    "LocaleName"="nl-NL"
    "s1159"=""
    "s2359"=""
    "sCountry"="Nederland"
    "sCurrency"="€"
    "sDate"="-"
    "sDecimal"=","
    "sGrouping"="3;0"
    "sLanguage"="NLD"
    "sList"=";"
    "sLongDate"="dddd d MMMM yyyy"
    "sMonDecimalSep"=","
    "sMonGrouping"="3;0"
    "sMonThousandSep"="."
    "sNativeDigits"="0123456789"
    "sNegativeSign"="-"
    "sPositiveSign"="+"
    "sShortDate"="d-M-yyyy"
    "sThousand"="."
    "sTime"=":"
    "sTimeFormat"="HH:mm:ss"
    "sShortTime"="HH:mm"
    "sYearMonth"="MMMM yyyy"
    "iCalendarType"="1"
    "iCountry"="31"
    "iCurrDigits"="2"
    "iCurrency"="2"
    "iDate"="1"
    "iDigits"="2"
    "NumShape"="1"
    "iFirstDayOfWeek"="0"
    "iFirstWeekOfYear"="2"
    "iLZero"="1"
    "iMeasure"="0"
    "iNegCurr"="12"
    "iNegNumber"="1"
    "iPaperSize"="9"
    "iTime"="1"
    "iTimePrefix"="0"
    "iTLZero"="1"
    
    [HKEY_USERS\DEFAULT_USER\Control Panel\International\Geo]
    "Nation"="176"
    
    [HKEY_USERS\DEFAULT_USER\Control Panel\International\User Profile]
    "Languages"=hex(7):6e,00,6c,00,2d,00,4e,00,4c,00,00,00,65,00,6e,00,2d,00,55,00,\
      53,00,00,00,65,00,6e,00,2d,00,47,00,42,00,00,00,64,00,65,00,2d,00,44,00,45,\
      00,00,00,6e,00,6c,00,2d,00,42,00,45,00,00,00,66,00,72,00,2d,00,46,00,52,00,\
      00,00,66,00,72,00,2d,00,42,00,45,00,00,00
    "ShowAutoCorrection"=dword:00000001
    "ShowTextPrediction"=dword:00000001
    "ShowCasing"=dword:00000001
    "ShowShiftLock"=dword:00000001
    "WindowsOverride"="nl-NL"
    
    [HKEY_USERS\DEFAULT_USER\Control Panel\International\User Profile\de-DE]
    "0407:00000407"=dword:00000001
    
    [HKEY_USERS\DEFAULT_USER\Control Panel\International\User Profile\en-GB]
    "0809:00000809"=dword:00000001
    
    [HKEY_USERS\DEFAULT_USER\Control Panel\International\User Profile\en-US]
    "0409:00000409"=dword:00000001
    
    [HKEY_USERS\DEFAULT_USER\Control Panel\International\User Profile\fr-BE]
    "080C:0000080C"=dword:00000001
    
    [HKEY_USERS\DEFAULT_USER\Control Panel\International\User Profile\fr-FR]
    "040C:0000040C"=dword:00000001
    
    [HKEY_USERS\DEFAULT_USER\Control Panel\International\User Profile\nl-BE]
    "0813:00000813"=dword:00000001
    
    [HKEY_USERS\DEFAULT_USER\Control Panel\International\User Profile\nl-NL]
    "CachedLanguageName"="@Winlangdb.dll,-1545"
    "0413:00020409"=dword:00000001
    
    [HKEY_USERS\DEFAULT_USER\Control Panel\International\User Profile System Backup]
    "Languages"=hex(7):65,00,6e,00,2d,00,47,00,42,00,00,00
    "ShowAutoCorrection"=dword:00000001
    "ShowTextPrediction"=dword:00000001
    "ShowCasing"=dword:00000001
    "ShowShiftLock"=dword:00000001
    
    [HKEY_USERS\DEFAULT_USER\Control Panel\International\User Profile System Backup\nl-NL]
    "0413:00020409"=dword:00000001
    
    [HKEY_USERS\DEFAULT_USER\Keyboard Layout]
    
    [HKEY_USERS\DEFAULT_USER\Keyboard Layout\Preload]
    "1"="00000413"
    "2"="00000413"
    "3"="00000409"
    "4"="00000809"
    "5"="00000407"
    "6"="00000813"
    "7"="0000040C"
    "8"="0000080C"
    
    [HKEY_USERS\DEFAULT_USER\Keyboard Layout\Substitutes]
    "00000413"="00020409"
    
    [HKEY_USERS\DEFAULT_USER\Keyboard Layout\Toggle]
    
    [HKEY_USERS\DEFAULT_USER\Control Panel\Desktop]
    "PreferredUILanguages"=hex(7):6e,00,6c,00,2d,00,4e,00,4c,00,00,00
    
    [HKEY_USERS\DEFAULT_USER\Control Panel\Desktop\MuiCached]
    "MachinePreferredUILanguages"=hex(7):6e,00,6c,00,2d,00,4e,00,4c,00,00,00

    $DRegDflt

    Windows Registry Editor Version 5.00
    
    [HKEY_USERS\.DEFAULT\Control Panel\International]
    "Locale"="00000413"
    "LocaleName"="nl-NL"
    "s1159"=""
    "s2359"=""
    "sCountry"="Nederland"
    "sCurrency"="€"
    "sDate"="-"
    "sDecimal"=","
    "sGrouping"="3;0"
    "sLanguage"="NLD"
    "sList"=";"
    "sLongDate"="dddd d MMMM yyyy"
    "sMonDecimalSep"=","
    "sMonGrouping"="3;0"
    "sMonThousandSep"="."
    "sNativeDigits"="0123456789"
    "sNegativeSign"="-"
    "sPositiveSign"="+"
    "sShortDate"="d-M-yyyy"
    "sThousand"="."
    "sTime"=":"
    "sTimeFormat"="HH:mm:ss"
    "sShortTime"="HH:mm"
    "sYearMonth"="MMMM yyyy"
    "iCalendarType"="1"
    "iCountry"="31"
    "iCurrDigits"="2"
    "iCurrency"="2"
    "iDate"="1"
    "iDigits"="2"
    "NumShape"="1"
    "iFirstDayOfWeek"="0"
    "iFirstWeekOfYear"="2"
    "iLZero"="1"
    "iMeasure"="0"
    "iNegCurr"="12"
    "iNegNumber"="1"
    "iPaperSize"="9"
    "iTime"="1"
    "iTimePrefix"="0"
    "iTLZero"="1"
    
    [HKEY_USERS\.DEFAULT\Control Panel\International\Geo]
    "Nation"="176"
    
    [HKEY_USERS\.DEFAULT\Control Panel\International\User Profile]
    "Languages"=hex(7):6e,00,6c,00,2d,00,4e,00,4c,00,00,00,65,00,6e,00,2d,00,55,00,\
      53,00,00,00,65,00,6e,00,2d,00,47,00,42,00,00,00,64,00,65,00,2d,00,44,00,45,\
      00,00,00,6e,00,6c,00,2d,00,42,00,45,00,00,00,66,00,72,00,2d,00,46,00,52,00,\
      00,00,66,00,72,00,2d,00,42,00,45,00,00,00
    "ShowAutoCorrection"=dword:00000001
    "ShowTextPrediction"=dword:00000001
    "ShowCasing"=dword:00000001
    "ShowShiftLock"=dword:00000001
    "WindowsOverride"="nl-NL"
    
    [HKEY_USERS\.DEFAULT\Control Panel\International\User Profile\de-DE]
    "0407:00000407"=dword:00000001
    
    [HKEY_USERS\.DEFAULT\Control Panel\International\User Profile\en-GB]
    "0809:00000809"=dword:00000001
    
    [HKEY_USERS\.DEFAULT\Control Panel\International\User Profile\en-US]
    "0409:00000409"=dword:00000001
    
    [HKEY_USERS\.DEFAULT\Control Panel\International\User Profile\fr-BE]
    "080C:0000080C"=dword:00000001
    
    [HKEY_USERS\.DEFAULT\Control Panel\International\User Profile\fr-FR]
    "040C:0000040C"=dword:00000001
    
    [HKEY_USERS\.DEFAULT\Control Panel\International\User Profile\nl-BE]
    "0813:00000813"=dword:00000001
    
    [HKEY_USERS\.DEFAULT\Control Panel\International\User Profile\nl-NL]
    "CachedLanguageName"="@Winlangdb.dll,-1545"
    "0413:00020409"=dword:00000001
    
    [HKEY_USERS\.DEFAULT\Control Panel\International\User Profile System Backup]
    "Languages"=hex(7):65,00,6e,00,2d,00,47,00,42,00,00,00
    "ShowAutoCorrection"=dword:00000001
    "ShowTextPrediction"=dword:00000001
    "ShowCasing"=dword:00000001
    "ShowShiftLock"=dword:00000001
    
    [HKEY_USERS\.DEFAULT\Control Panel\International\User Profile System Backup\nl-NL]
    "0413:00020409"=dword:00000001
    
    [HKEY_USERS\.DEFAULT\Keyboard Layout]
    
    [HKEY_USERS\.DEFAULT\Keyboard Layout\Preload]
    "1"="00000413"
    "2"="00000413"
    "3"="00000409"
    "4"="00000809"
    "5"="00000407"
    "6"="00000813"
    "7"="0000040C"
    "8"="0000080C"
    
    [HKEY_USERS\.DEFAULT\Keyboard Layout\Substitutes]
    "00000413"="00020409"
    
    [HKEY_USERS\.DEFAULT\Keyboard Layout\Toggle]
    
    [HKEY_USERS\.DEFAULT\Control Panel\Desktop]
    "PreferredUILanguages"=hex(7):6e,00,6c,00,2d,00,4e,00,4c,00,00,00
    
    [HKEY_USERS\.DEFAULT\Control Panel\Desktop\MuiCached]
    "MachinePreferredUILanguages"=hex(7):6e,00,6c,00,2d,00,4e,00,4c,00,00,00

    Now if the only way is configuring policies, can't I use local computer policies, or also block this somewhere in registry?

    Wednesday, December 28, 2016 11:28 AM
  • I found out that it does only copy the wrong settings to the welcome screen from certain users. Other users who seem to have the correct language settings will copy the right settings to the welcome screen.

    Deleting user profile does not clear things up. It seems to copy it from the AD somewhere. However, when I'm logged in as such a user (which copies the wrong input language to the welcome screen), languages and input languages are correctly set, and in registry (HKCU) it seems that everything is correct.

    So where exactly does this "Copy user settings to welcome screen" determine it's settings on? Because I can not find anywhere in my registry where I the wrong language set. 

    Thursday, December 29, 2016 9:00 AM
  • Very late answer since i had problem with this aswell, sort of.

    I was looking for a way to change Welcome screens display language. I was upgrading my clients from 1809 to 1909 in my AD, we use an en-US image. And set Swedish everywhere possible. After the upgrade my Welcome screen changed display language to English. I don't know why.

    After many hours of searching to set a new language to welcome screen that didnt involve me to use the GUI and set it manually. I wanted a script or regfix to push it with GPO (or a gpo setting for that matter, but that does not exist!).

    If you use the Copy Setting and tick Welcome screen within the GUI it will save the settings here: HKEY_USERS\.DEFAULT\Control Panel\International - so just export all of: HKEY_USERS\.DEFAULT\Control Panel\International and save it. Use that regfile to push your settings thru out your AD, where needed.






    • Edited by Pannan Monday, June 1, 2020 6:23 PM
    Monday, June 1, 2020 5:57 PM