4

When using the wmic command, it is possible to specify a locale using /locale:ms_409 which means US English. I am using a German version of Windows XP, which displays some localized values when using querying information with baseboard. For example, when using the following commands, the locale does not to seem to make any difference. The value of Tag is displayed in English, while the one of Caption is displayed in German. How do you have to use the locale in wmic? Is it not possible to display these localized values in English, which is (as I suppose) the original language? And if not, what is the use of the possibility of specifying the locale?

wmic:root\cli>context
NAMESPACE             : root\cimv2
ROLE                  : root\cli
NODE(S)               : COMP
IMPLEVEL              : IMPERSONATE
[AUTHORITY            : N/A]
AUTHLEVEL             : PKTPRIVACY
LOCALE                : ms_407
...

wmic:root\cli>baseboard  get caption, tag
Caption       Tag
Hauptplatine  Base Board

wmic:root\cli>/locale:ms_409 baseboard get caption, tag
Caption       Tag
Hauptplatine  Base Board

wmic:root\cli>context
NAMESPACE             : root\cimv2
ROLE                  : root\cli
NODE(S)               : COMP
IMPLEVEL              : IMPERSONATE
[AUTHORITY            : N/A]
AUTHLEVEL             : PKTPRIVACY
LOCALE                : ms_409
0

How do you have to use the locale in wmic? You can get localized values only if a particular language is listed in wmic /namespace:\\root\cli path __NAMESPACE, for instance as follows:

Result (on my Windows, slightly edited): 437654test.bat

MS_409   US
Caption     Tag
Base Board  Base Board

MS_408   Greek
Caption         Tag
Βασική πλακέτα  Base Board

MS_419   Russian
Caption         Tag
Основная плата  Base Board

MS_405   Czech
Caption         Tag
Základní deska  Base Board

Explanation: Apply /trace:on to diagnose the problem; note that in my Windows (default MS_409) isn't German language (MS_407) installed:

wmic /trace:on /locale:ms_407 baseboard get caption,tag
SUCCESS: IWbemLocator::ConnectServer(L"root\cli", NULL, NULL, L"ms_407", 0L, L"", NULL, -)
Line:    143 File: onecore\admin\wmi\wbem\tools\wmic\cmdalias.cpp

SUCCESS: CoSetProxyBlanket(-, RPC_C_AUTHN_DEFAULT, RPC_C_AUTHZ_NONE, NULL, 6, 3, -, EOAC_NONE)
Line:    162 File: onecore\admin\wmi\wbem\tools\wmic\cmdalias.cpp

FAIL: IWbemLocator::ConnectServer(L"root\cli\ms_407 not found. Connecting to ms_409", NULL, NULL, L"ms_407", 0L, L"", NULL, -)
Line:   2491 File: onecore\admin\wmi\wbem\tools\wmic\cmdalias.cpp

SUCCESS: IWbemLocator::ConnectServer(L"root\cli\ms_407", NULL, NULL, L"ms_409", 0L, L"", NULL, -)
Line:   2524 File: onecore\admin\wmi\wbem\tools\wmic\cmdalias.cpp

… (truncated) …

Moreover, only localizable properties are localized. The Tag property can't be localized because it has Key Qualifier in the Win32_BaseBoard class

SUCCESS: IWbemClassObject::Get(L"Name", 0, -, 0, 0)
Line:   1751 File: onecore\admin\wmi\wbem\tools\wmic\cmdalias.cpp
Result:  Tag

SUCCESS: IWbemClassObject::Get(L"Derivation", 0, -, 0, 0)
Line:   1767 File: onecore\admin\wmi\wbem\tools\wmic\cmdalias.cpp
Result:  Tag

SUCCESS: IWbemClassObject::Get(L"Description", 0,-, 0, 0)
Line:   1923 File: onecore\admin\wmi\wbem\tools\wmic\cmdalias.cpp
Result:  The Tag property uniquely identifies the base board of the system.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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