1

I made a simple script that delete all keyboard layout and install the one i want.

Everything seems to work, the layout are deleted and the correct layout is installed afterwards. The problem is each time i reboot (any computer or VM i try the script on) all previously deleted keyboard are back.

If i delete the keyboard manualy in Windows they dont come back, i think something is missing in the code and i cant figure out what and why.

This is the code i use :

$langue = Get-WinUserLanguageList                    
$langue.Clear()                                          
$langue.add("fr-CA")                                       
$langue[0].InputMethodTips.Clear()                          
$langue[0].InputMethodTips.Add('0C0C:00001009')           
Set-WinUserLanguageList $langue -Force                    
Set-WinUILanguageOverride -Language fr-CA
Set-WinCultureFromLanguageListOptOut -OptOut $true       
Set-Culture fr-CA                         
Set-WinHomeLocation -GeoId 39                           
Set-WinSystemLocale -SystemLocale fr-CA
Oraymtl
  • 11
  • 2
  • Are you running these commands in an elevated PowerShell session? – Efie Mar 08 '21 at 19:52
  • Related: https://stackoverflow.com/questions/49099542/questions-problems-related-to-set-winuserlanguagelist-command or https://superuser.com/questions/1323000/unremovable-keyboard-layout-on-windows-10 etc. – JosefZ Mar 09 '21 at 09:43

0 Answers0