PC Review


Reply
Thread Tools Rate Thread

Batch script to confirm xp language version.

 
 
Oni
Guest
Posts: n/a
 
      12th Jan 2009
Is it possible to extract the language version of Windows XP using a batch
script.

Any help will be appreciated.
--
Regards
Oni
 
Reply With Quote
 
 
 
 
Oni
Guest
Posts: n/a
 
      13th Jan 2009
Where did you pull all the "Case" lines from?

Thanks for helping out ;-)

--
Regards
Oni


"Steve Yandl" wrote:

> One of the lines near the top got broken in posting.
>
> Set colItems = objWMIService.ExecQuery("Select * From
> Win32_OperatingSystem")
>
> should all be on a single line in your script with a single space between
> "From" and "Win32_".
>
>
> Steve Yandl
>
>
> "Steve Yandl" <syandl_nospam_@comcast.net> wrote in message
> news:(E-Mail Removed)...
> > Between the lines below is an example of a vbScript that will give you a
> > message box with the operating system language. Use Notepad, place the
> > contents in the text file but then save the text file with the extension
> > vbs instead of txt (much like you would create a batch file but you need a
> > vbs file extension, not bat).
> >
> > The first line,
> > strComputer = "."
> > causes the script to check the local PC. You could substitute names of
> > computers on your network for the period and pull operating system
> > language for other PCs.
> >
> > '----------------------------------------------------------------------------------------------------
> >
> > strComputer = "."
> >
> > Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
> >
> > Set colItems = objWMIService.ExecQuery("Select * From
> > Win32_OperatingSystem")
> >
> > For Each objItem in colItems
> > Select Case objItem.OSLanguage
> > Case 1 strLang = "Arabic"
> > Case 4 strLang = "Chinese (Simplified) - China"
> > Case 9 strLang = "English"
> > Case 1025 strLang = "Arabic - Saudi Arabia"
> > Case 1026 strLang = "Bulgarian"
> > Case 1027 strLang = "Catalan"
> > Case 1028 strLang = "Chinese (Traditional) - Taiwan"
> > Case 1029 strLang = "Czech"
> > Case 1030 strLang = "Danish"
> > Case 1031 strLang = "German - Germany"
> > Case 1032 strLang = "Greek"
> > Case 1033 strLang = "English - United States"
> > Case 1034 strLang = "Spanish - Traditional Sort"
> > Case 1035 strLang = "Finnish"
> > Case 1036 strLang = "French - France"
> > Case 1037 strLang = "Hebrew"
> > Case 1038 strLang = "Hungarian"
> > Case 1039 strLang = "Icelandic"
> > Case 1040 strLang = "Italian - Italy"
> > Case 1041 strLang = "Japanese"
> > Case 1042 strLang = "Korean"
> > Case 1043 strLang = "Dutch - Netherlands"
> > Case 1044 strLang = "Norwegian - Bokmal"
> > Case 1045 strLang = "Polish"
> > Case 1046 strLang = "Portuguese - Brazil"
> > Case 1047 strLang = "Rhaeto-Romanic"
> > Case 1048 strLang = "Romanian"
> > Case 1049 strLang = "Russian"
> > Case 1050 strLang = "Croatian"
> > Case 1051 strLang = "Slovak"
> > Case 1052 strLang = "Albanian"
> > Case 1053 strLang = "Swedish"
> > Case 1054 strLang = "Thai"
> > Case 1055 strLang = "Turkish"
> > Case 1056 strLang = "Urdu"
> > Case 1057 strLang = "Indonesian"
> > Case 1058 strLang = "Ukrainian"
> > Case 1059 strLang = "Belarusian"
> > Case 1060 strLang = "Slovenian"
> > Case 1061 strLang = "Estonian"
> > Case 1062 strLang = "Latvian"
> > Case 1063 strLang = "Lithuanian"
> > Case 1065 strLang = "Persian"
> > Case 1066 strLang = "Vietnamese"
> > Case 1069 strLang = "Basque"
> > Case 1070 strLang = "Serbian"
> > Case 1071 strLang = "Macedonian (FYROM)"
> > Case 1072 strLang = "Sutu"
> > Case 1073 strLang = "Tsonga"
> > Case 1074 strLang = "Tswana"
> > Case 1076 strLang = "Xhosa"
> > Case 1077 strLang = "Zulu"
> > Case 1078 strLang = "Afrikaans"
> > Case 1080 strLang = "Faeroese"
> > Case 1081 strLang = "Hindi"
> > Case 1082 strLang = "Maltese"
> > Case 1084 strLang = "Gaelic"
> > Case 1085 strLang = "Yiddish"
> > Case 1086 strLang = "Malay - Malaysia"
> > Case 2049 strLang = "Arabic - Iraq"
> > Case 2052 strLang = "Chinese (Simplified) - PRC"
> > Case 2055 strLang = "German - Switzerland"
> > Case 2057 strLang = "English - United Kingdom"
> > Case 2058 strLang = "Spanish - Mexico"
> > Case 2060 strLang = "French - Belgium"
> > Case 2064 strLang = "Italian - Switzerland"
> > Case 2067 strLang = "Dutch - Belgium"
> > Case 2068 strLang = "Norwegian - Nynorsk"
> > Case 2070 strLang = "Portuguese - Portugal"
> > Case 2072 strLang = "Romanian - Moldova"
> > Case 2073 strLang = "Russian - Moldova"
> > Case 2074 strLang = "Serbian - Latin"
> > Case 2077 strLang = "Swedish - Finland"
> > Case 3073 strLang = "Arabic - Egypt"
> > Case 3076 strLang = "Chinese (Traditional) - Hong Kong SAR"
> > Case 3079 strLang = "German - Austria"
> > Case 3081 strLang = "English - Australia"
> > Case 3082 strLang = "Spanish - International Sort"
> > Case 3084 strLang = "French - Canada"
> > Case 3098 strLang = "Serbian - Cyrillic"
> > Case 4097 strLang = "Arabic - Libya"
> > Case 4100 strLang = "Chinese (Simplified) - Singapore"
> > Case 4103 strLang = "German - Luxembourg"
> > Case 4105 strLang = "English - Canada"
> > Case 4106 strLang = "Spanish - Guatemala"
> > Case 4108 strLang = "French - Switzerland"
> > Case 5121 strLang = "Arabic - Algeria"
> > Case 5127 strLang = "German - Liechtenstein"
> > Case 5129 strLang = "English - New Zealand"
> > Case 5130 strLang = "Spanish - Costa Rica"
> > Case 5132 strLang = "French - Luxembourg"
> > Case 6145 strLang = "Arabic - Morocco"
> > Case 6153 strLang = "English - Ireland"
> > Case 6154 strLang = "Spanish - Panama"
> > Case 7169 strLang = "Arabic - Tunisia"
> > Case 7177 strLang = "English - South Africa"
> > Case 7178 strLang = "Spanish - Dominican Republic"
> > Case 8193 strLang = "Arabic - Oman"
> > Case 8201 strLang = "English - Jamaica"
> > Case 8202 strLang = "Spanish - Venezuela"
> > Case 9217 strLang = "Arabic - Yemen"
> > Case 9226 strLang = "Spanish - Colombia"
> > Case 10241 strLang = "Arabic - Syria"
> > Case 10249 strLang = "English - Belize"
> > Case 10250 strLang = "Spanish - Peru"
> > Case 11265 strLang = "Arabic - Jordan"
> > Case 11273 strLang = "English - Trinidad"
> > Case 11274 strLang = "Spanish - Argentina"
> > Case 12289 strLang = "Arabic - Lebanon"
> > Case 12298 strLang = "Spanish - Ecuador"
> > Case 13313 strLang = "Arabic - Kuwait"
> > Case 13322 strLang = "Spanish - Chile"
> > Case 14337 strLang = "Arabic - U.A.E."
> > Case 14346 strLang = "Spanish - Uruguay"
> > Case 15361 strLang = "Arabic - Bahrain"
> > Case 15370 strLang = "Spanish - Paraguay"
> > Case 16385 strLang = "Arabic - Qutar"
> > Case 16394 strLang = "Spanish - Bolivia"
> > Case 17418 strLang = "Spanish - El Salvador"
> > Case 18442 strLang = "Spanish - Honduras"
> > Case 19466 strLang = "Spanish - Nicaragua"
> > Case 20490 strLang = "Spanish - Puerto Rico"
> > Case Else strLang = objItem.OSLanguage
> > End Select
> > Next
> >
> > MsgBox strLang
> >
> > '----------------------------------------------------------------------------------------------------
> >
> >
> > Steve Yandl
> >
> >
> >
> > "Oni" <(E-Mail Removed)> wrote in message
> > news:921B56D5-AAB7-45DC-AE8A-(E-Mail Removed)...
> >> Is it possible to extract the language version of Windows XP using a
> >> batch
> >> script.
> >>
> >> Any help will be appreciated.
> >> --
> >> Regards
> >> Oni

> >
> >

>
>
>

 
Reply With Quote
 
_Z
Guest
Posts: n/a
 
      13th Jan 2009
"Steve Yandl" wrote:
> One of the lines near the top got broken in posting.
> Set colItems = objWMIService.ExecQuery("Select * From
> Win32_OperatingSystem")
> should all be on a single line in your script with a single space between
> "From" and "Win32_".


Steve,
Or use ' _' to break long lines (also helps readability):

Set colItems = objWMIService.ExecQuery("Select * From _
Win32_OperatingSystem")


 
Reply With Quote
 
Oni
Guest
Posts: n/a
 
      13th Jan 2009
Thanks ;-))
--
Regards
Oni


"Steve Yandl" wrote:

> http://msdn.microsoft.com/en-us/library/aa394239.aspx
>
> Scroll down to the "OSLanguage" section.
>
>
> Steve Yandl
>
>
>
> "Oni" <(E-Mail Removed)> wrote in message
> news:E8642E18-D818-4E98-B3E0-(E-Mail Removed)...
> > Where did you pull all the "Case" lines from?
> >
> > Thanks for helping out ;-)
> >
> > --
> > Regards
> > Oni


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A script/batch to kill a batch file from scheduled tasks? Bogdan Windows XP Configuration 1 31st Jul 2009 06:05 AM
Script Manager - Confirm dialog box =?Utf-8?B?UmFq?= Microsoft ASP .NET 1 18th May 2007 07:37 PM
Windows version language and Excel version language =?Utf-8?B?SmFjIFRyZW1ibGF5?= Microsoft Excel Programming 3 1st Jul 2006 04:04 PM
Batch Language vs VB Scripting... SP Goodman Windows XP Customization 10 7th Jun 2006 06:29 PM
Muilti-language batch files =?Utf-8?B?d2xhdHRlcnk=?= Windows XP General 2 1st Apr 2006 04:20 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:24 PM.