How can I find the current Windows language from cmd?

前端 未结 8 1046
囚心锁ツ
囚心锁ツ 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-04 12:24

    Use a command on cmd and search for english word(s) associate with your query.

    Example: w32tm /query /peers >> somewhere.txt

    #Peers: 1
    
    Peer: ca.pool.ntp.org
    State: Active
    Time Remaining: 58.3260171s
    Mode: 3 (Client)
    Stratum: 3 (secondary reference - syncd by (S)NTP)
    PeerPoll Interval: 17 (out of valid range)
    HostPoll Interval: 10 (1024s)
    

    The first line is always "peers" or "service not started", so if the user is on an other language than english the script will not find this word and the result can return 0.

提交回复
热议问题