I want to use the command line to install something, we have 2 OS's in 2 languages. To install the package in correct language I need to find out what the system language is.
How do I get the system language from the command line?
I want to use the command line to install something, we have 2 OS's in 2 languages. To install the package in correct language I need to find out what the system language is.
How do I get the system language from the command line?
This is done by
REG QUERY HKLM\System\CurrentControlSet\Control\Nls\Language /v InstallLanguage
Then you get a number with the following meanings (no guarantee of completeness and correctness):
If you want to actually test for the system language, you might consider using WMIC:
yields on my machine:
For instance, if you wanted to test for Japanese (locale 0411), you might place the following in a batch program:
Test for both locale's and issue goto's if they are found. Error out if they are not.
You're probably looking for a Locale rather than the OSLanguage or Codeset, but i included them here because of the way your question and the accepted answer are worded.