I'm trying to get the full OS-version information of a w32 host in a script (thus: from the cmdline), to be run on a variety of different machines.
For this, i'm using the systeminfo
as described in Windows version from CMD
in theory this works great, but i discovered, that systeminfo
will output the "keys" in the current language. e.g. (on a german w7 installation):
Betriebssystemname: Microsoft Windows 7 Professional
this however, means that the following does not work:
systeminfo | findstr /B /C:"OS Name:"
since i don't know the system-languages of the target machines, i would like to make the script language independent (rather than adding exception for "all known" languages).
can i do so?
wmic OS get caption
for example?wmic
seems works to work platfrom independently - and it's way faster than usingsysteminfo
for single keys.