Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is is possible to change the keyboard layout via command line on Windows XP/7?

share|improve this question

3 Answers 3

up vote 1 down vote accepted

No (not via CMD), you will have to change it the following way. There used to be a keyb.com command in DOS but that no longer exists in Windows.

Source:

Windows 7 or Windows Vista

  1. Click Start Collapse this imageExpand this image, type intl.cpl in the Start Search box, and then press ENTER.
  2. On the Keyboards and Language tab, click Change keyboards. Click Add.
  3. Expand the language that you want. For example, expand French (Canada).
  4. Expand Keyboard list, click to select the Canadian French check box, and then click OK.
  5. In the options, click View Layout to compare the layout with the actual keyboard.
  6. In the Default input language list, click French (Canada) – Canadian French, and then click OK two times.
  7. In the Regional and Language Options dialog box, click OK.
  8. Click the Language bar, and then click FR French (Canada).

Windows XP

  1. Click Start , type intl.cpl in the Run box, and then press ENTER.
  2. On the Languages tab, click Details.
  3. Under Installed services, click Add.
  4. In the Input language list, select the language that you want. For example, select French (Canada) .
  5. In the Keyboard layout/IME list, click Canadian French, and then click OK.
  6. In the Select one of the installed input languages to use when you start your computer list, click French (Canada) – Canadian French, and then click OK.
  7. In the Regional and Language Options dialog box, click OK.
  8. Click the Language bar, and then click French (Canada).

But you can in Linux using loadkeys.

share|improve this answer
    
Cheers! +1 to you! :) –  studiohack Mar 1 '12 at 17:11

yes.

http://blogs.msdn.com/b/shawnste/archive/2007/04/12/configuring-international-settings-from-the-command-line.aspx

http://msdn.microsoft.com/en-us/goglobal/bb964650#eyb

command line example:

control intl.cpl,, /f:"%CD%\AddKeyboardLanguage.xml"

AddKeyboardLanguage.xml example:

<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend"> 
<gs:UserList>
<gs:User UserID="Current" CopySettingsToDefaultUserAcct="true" CopySettingsToSystemAcct="true"/></gs:UserList> 
<gs:InputPreferences> 

<!--ch-Google--><gs:InputLanguageID Action="add" ID="0804:E0200804"/>

</gs:InputPreferences>
</gs:GlobalizationServices>

RemoveKeyboardLanguage.xml example:

<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend"> 
<gs:UserList>
<gs:User UserID="Current" CopySettingsToDefaultUserAcct="true" CopySettingsToSystemAcct="true"/></gs:UserList> 
<gs:InputPreferences> 

<!--ch-Google--><gs:InputLanguageID Action="remove" ID="0804:E0200804"/>

</gs:InputPreferences>
</gs:GlobalizationServices>
share|improve this answer
    
I wonder if there is any command form the cmd just to tell which keyboard layout your are currently using in Windows7? I mean a command that returns a string value of the language layout you are using -- not changing the layout just inquiring. –  doctorate Nov 17 at 9:02

Windows 8 brings a new International PowerShell module. Unfortunately it doesn't seem like this can be backported or has any Windows 7 alternative


Configure international settings by using PowerShell cmdlets

In Windows 8 you can use the International Settings PowerShell cmdlets to change the language on a running Windows installation. The benefit of using PowerShell cmdlets is that you can incorporate them into a script to facilitate deployment and configuration of Windows. Source: http://technet.microsoft.com/en-us/library/hh825705.aspx

  1. Open a Windows PowerShell prompt.
  2. Import the international settings module by running the following command:

    ipmo international

  3. Display the locale information on the computer by running the following command:

    Get-WinSystemLocale

  4. Set the locale for the region and language that you want. For example, the following command sets the system locale to Japanese (Japan):

    Set-WinSystemLocale ja-JP

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.