How can I find the current Windows language from cmd?

前端 未结 8 1140
囚心锁ツ
囚心锁ツ 2021-02-04 12:02

I would like to run a script for each language. I need a way to find which os language is being used, using batch files. Both on windows XP, and on Windows 7.

8条回答
  •  时光取名叫无心
    2021-02-04 12:27

    in cmd: reg query "HKEY_CURRENT_USER\Keyboard Layout\Preload"

    this produces:

    HKEY_CURRENT_USER\Keyboard Layout\Preload
        2    REG_SZ    00000419
        1    REG_SZ    00000809
    

    like the first answer you then parse the rightmost numbers using this or this site

    if the left most number is number 1 that is the current keyboard language in use currently.

提交回复
热议问题