determine the media language

G

Guest

I have a mix of 600 windows xp machines that are installed with either
english or french versions of the media. is there something about the machine
that I can scan with an asset management tool that will tell me that about
the machine?
 
G

george

Ted said:
I have a mix of 600 windows xp machines that are installed with either
english or french versions of the media. is there something about the
machine
that I can scan with an asset management tool that will tell me that about
the machine?

Not too sure how to integrate it into the asset management tool, but using
WMI you could query the Win32_OperatingSystem object.
It has (among others) properties like indicated in below vbscript:

Dim objWMIService
Dim colItems

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from
Win32_OperatingSystem",,48)
For Each objItem in colItems
WScript.Echo "BuildNumber: " & objItem.BuildNumber
WScript.Echo "BuildType: " & objItem.BuildType
WScript.Echo "CodeSet: " & objItem.CodeSet
WScript.Echo "CountryCode: " & objItem.CountryCode
WScript.Echo "Locale: " & objItem.Locale
WScript.Echo "OSLanguage: " & objItem.OSLanguage
WScript.Echo "OSProductSuite: " & objItem.OSProductSuite
WScript.Echo "OSType: " & objItem.OSType
WScript.Echo "OtherTypeDescription: " & objItem.OtherTypeDescription
WScript.Echo "SerialNumber: " & objItem.SerialNumber
WScript.Echo "ServicePackMajorVersion: " & objItem.ServicePackMajorVersion
WScript.Echo "ServicePackMinorVersion: " & objItem.ServicePackMinorVersion
Next


resulting in the following output:

Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

BuildNumber: 2600
BuildType: Multiprocessor Free
CodeSet: 1252
CountryCode: 1
Locale: 0409
OSLanguage: 1033
OSProductSuite:
OSType: 18
OtherTypeDescription:
SerialNumber: 55274-640-0740827-23479
ServicePackMajorVersion: 2
ServicePackMinorVersion: 0
Exit code: 0 , 0000h


hth

george
 
T

Torgeir Bakken \(MVP\)

Ted said:
I have a mix of 600 windows xp machines that are installed
with either english or french versions of the media. is there
something about the machine that I can scan with an asset
management tool that will tell me that about the machine?
Hi

With a VBScript and WMI:

'--------------------8<----------------------
sComputer = "." ' use "." for local computer
Set oWMI = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & sComputer _
& "\root\cimv2")

Set colOperatingSystems = oWMI.ExecQuery _
("Select * from Win32_OperatingSystem")

For Each oOS in colOperatingSystems
iOSLang = oOS.OSLanguage
Next

WScript.Echo "Decimal OS language number: " & iOSLang
WScript.Echo "Hex OS language number: " & Right("000" & Hex(iOSLang), 4)
'--------------------8<----------------------

The script above will return 1033 (hex 0409) for an English OS.

You can map the hex value to the country using the list under
this registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MIME\Database\Rfc1766


For a script that does this for you automatically, take a
look at this link:

http://groups.google.co.uk/[email protected]

It will give you this type of information/output:

OS version: Microsoft Windows 2000 Professional
SP version: Service Pack 2
OS language: English
Regional Settings for user is set to: Norway
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top