PDA

View Full Version : Solved: Check Windows version



johnske
07-12-2005, 05:01 AM
Hi,

I know I've seen this somewhere but I can't remember where... I need to determine if a user is running XP, so I need to fill in the 1st line belowIf (WinXP) Then
'is XP, do something
Else
'not XP, do something else
End If
TIA,
John

xld
07-12-2005, 05:45 AM
Option Explicit

Private Const VER_PLATFORM_WIN32s = 0
Private Const VER_PLATFORM_WIN32_WINDOWS = 1
Private Const VER_PLATFORM_WIN32_NT = 2

Private Const VER_NT_WORKSTATION = &H1
Private Const VER_NT_DOMAIN_CONTROLLER = &H2
Private Const VER_NT_SERVER = &H3

Private Const VER_SERVER_NT = &H80000000
Private Const VER_WORKSTATION_NT = &H40000000

Private Const VER_SUITE_SMALLBUSINESS = &H1
Private Const VER_SUITE_ENTERPRISE = &H2
Private Const VER_SUITE_BACKOFFICE = &H4
Private Const VER_SUITE_COMMUNICATIONS = &H8
Private Const VER_SUITE_TERMINAL = &H10
Private Const VER_SUITE_SMALLBUSINESS_RESTRICTED = &H20
Private Const VER_SUITE_EMBEDDEDNT = &H40
Private Const VER_SUITE_DATACENTER = &H80
Private Const VER_SUITE_SINGLEUSERTS = &H100
Private Const VER_SUITE_PERSONAL = &H200
Private Const VER_SUITE_BLADE = &H400


Const OSV_LENGTH As Long = 148
Const OSVEX_LENGTH As Long = 156

Type OSVERSIONINFO
OSVSize As Long 'size, in bytes, of this data structure
dwVerMajor As Long 'ie NT 3.51, dwVerMajor = 3; NT 4.0, dwVerMajor = 4.
dwVerMinor As Long 'ie NT 3.51, dwVerMinor = 51; NT 4.0, dwVerMinor= 0.
dwBuildNumber As Long 'NT: build number of the OS
'Win9x: build number of the OS in low-order word.
' High-order word contains major & minor ver nos.
PlatformID As Long 'Identifies the operating system platform.
szCSDVersion As String * 128 'NT: string, such as "Service Pack 3"
'Win9x: string providing arbitrary additional information
End Type

Type OSVERSIONINFOEX
OSVSize As Long
dwVerMajor As Long
dwVerMinor As Long
dwBuildNumber As Long
PlatformID As Long
szCSDVersion As String * 128
wServicePackMajor As Integer
wServicePackMinor As Integer
wSuiteMask As Integer
wProductType As Byte
wReserved As Byte
End Type

'defined As Any to support OSVERSIONINFO and OSVERSIONINFOEX
Declare Function GetVersionEx Lib "kernel32" _
Alias "GetVersionExA" _
(lpVersionInformation As Any) As Long

Sub test()
If IsWinXPPro Then
MsgBox "XP Pro"
ElseIf IsWinXPHome Then
MsgBox "?XP Home"
ElseIf IsWinNT4 Then
MsgBox "NT4"
Else
'etc.
End If
End Sub


Function IsWin95() As Boolean
'returns True if running Win95
Dim osv As OSVERSIONINFO

osv.OSVSize = Len(osv)

If GetVersionEx(osv) = 1 Then
IsWin95 = (osv.PlatformID = VER_PLATFORM_WIN32_WINDOWS) And _
(osv.dwVerMajor = 4 And osv.dwVerMinor = 0) And _
(osv.dwBuildNumber = 950)
End If
End Function

Function IsWin95OSR2() As Boolean
'returns True if running Win95
Dim osv As OSVERSIONINFO

osv.OSVSize = Len(osv)

If GetVersionEx(osv) = 1 Then
IsWin95OSR2 = (osv.PlatformID = VER_PLATFORM_WIN32_WINDOWS) And _
(osv.dwVerMajor = 4 And osv.dwVerMinor = 0) And _
(osv.dwBuildNumber = 1111)
End If
End Function

Function IsWin98() As Boolean
'returns True if running Win98
Dim osv As OSVERSIONINFO

osv.OSVSize = Len(osv)

If GetVersionEx(osv) = 1 Then
IsWin98 = (osv.PlatformID = VER_PLATFORM_WIN32_WINDOWS) And _
(osv.dwVerMajor = 4 And osv.dwVerMinor = 10) And _
(osv.dwBuildNumber >= 2222)
End If
End Function

Function IsWinME() As Boolean
'returns True if running Windows ME
Dim osv As OSVERSIONINFO

osv.OSVSize = Len(osv)

If GetVersionEx(osv) = 1 Then
IsWinME = (osv.PlatformID = VER_PLATFORM_WIN32_WINDOWS) And _
(osv.dwVerMajor = 4 And osv.dwVerMinor = 90) And _
(osv.dwBuildNumber >= 3000)
End If
End Function

Function IsWinNT4() As Boolean
'returns True if running WinNT4
Dim osv As OSVERSIONINFO

osv.OSVSize = Len(osv)

If GetVersionEx(osv) = 1 Then
IsWinNT4 = (osv.PlatformID = VER_PLATFORM_WIN32_NT) And _
(osv.dwVerMajor = 4 And osv.dwVerMinor = 0) And _
(osv.dwBuildNumber >= 1381)
End If
End Function

Function IsWinNT4Plus() As Boolean
'returns True if running Windows NT4 or later
Dim osv As OSVERSIONINFO

osv.OSVSize = Len(osv)

If GetVersionEx(osv) = 1 Then
IsWinNT4Plus = (osv.PlatformID = VER_PLATFORM_WIN32_NT) And _
(osv.dwVerMajor >= 4)
End If
End Function

Function IsWinNT4Server() As Boolean
'returns True if running Windows NT4 Server
Dim osv As OSVERSIONINFOEX
If IsWinNT4() Then

osv.OSVSize = Len(osv)
If GetVersionEx(osv) = 1 Then
IsWinNT4Server = (osv.wProductType And VER_NT_SERVER)
End If
End If
End Function

Function IsWinNT4Workstation() As Boolean
'returns True if running Windows NT4 Workstation
Dim osv As OSVERSIONINFOEX
If IsWinNT4() Then

osv.OSVSize = Len(osv)
If GetVersionEx(osv) = 1 Then
IsWinNT4Workstation = (osv.wProductType And VER_NT_WORKSTATION)
End If
End If
End Function

Function IsWin2000() As Boolean
'returns True if running Win2000 (NT5)
Dim osv As OSVERSIONINFO

osv.OSVSize = Len(osv)

If GetVersionEx(osv) = 1 Then
IsWin2000 = (osv.PlatformID = VER_PLATFORM_WIN32_NT) And _
(osv.dwVerMajor = 5 And osv.dwVerMinor = 0) And _
(osv.dwBuildNumber >= 2195)
End If
End Function

Function IsWin2000Plus() As Boolean
'returns True if running Windows 2000 or later
Dim osv As OSVERSIONINFO

osv.OSVSize = Len(osv)

If GetVersionEx(osv) = 1 Then
IsWin2000Plus = (osv.PlatformID = VER_PLATFORM_WIN32_NT) And _
(osv.dwVerMajor = 5 And osv.dwVerMinor >= 0)
End If
End Function

Function IsWin2003Server() As Boolean
'returns True if running Windows 2003 (.NET) Server
Dim osv As OSVERSIONINFO
osv.OSVSize = Len(osv)
If GetVersionEx(osv) = 1 Then
IsWin2003Server = (osv.PlatformID = VER_PLATFORM_WIN32_NT) And _
(osv.dwVerMajor = 5 And osv.dwVerMinor = 2) And _
(osv.dwBuildNumber = 3790)
End If
End Function

Function IsWin2000Workstation() As Boolean
'returns True if running Windows NT4 Workstation
Dim osv As OSVERSIONINFOEX
If IsWin2000() Then
osv.OSVSize = Len(osv)
If GetVersionEx(osv) = 1 Then
IsWin2000Workstation = (osv.wProductType And VER_NT_WORKSTATION)
End If
End If
End Function

Function IsWinXP() As Boolean
'returns True if running Windows XP
Dim osv As OSVERSIONINFO
osv.OSVSize = Len(osv)
If GetVersionEx(osv) = 1 Then
IsWinXP = (osv.PlatformID = VER_PLATFORM_WIN32_NT) And _
(osv.dwVerMajor = 5 And osv.dwVerMinor = 1) And _
(osv.dwBuildNumber >= 2600)
End If
End Function '

Function IsWinXPSP2() As Boolean
'returns True if running Windows XP SP2 (Service Pack 2)
Dim osv As OSVERSIONINFOEX
If IsWinXP() Then
osv.OSVSize = Len(osv)
If GetVersionEx(osv) = 1 Then
IsWinXPSP2 = InStr(osv.szCSDVersion, "Service Pack 2") > 0
End If
End If
End Function

Function IsWinXPPlus() As Boolean
'returns True if running Windows XP or later
Dim osv As OSVERSIONINFO
osv.OSVSize = Len(osv)
If GetVersionEx(osv) = 1 Then
IsWinXPPlus = (osv.PlatformID = VER_PLATFORM_WIN32_NT) And _
(osv.dwVerMajor >= 5 And osv.dwVerMinor >= 1)
End If
End Function

Function IsWinXPHome() As Boolean
'returns True if running Windows XP Home Edition
Dim osv As OSVERSIONINFOEX
If IsWinXP() Then
osv.OSVSize = Len(osv)
If GetVersionEx(osv) = 1 Then
IsWinXPHome = ((osv.wSuiteMask And VER_SUITE_PERSONAL) = VER_SUITE_PERSONAL)
End If
End If
End Function

Function IsWinXPPro() As Boolean
'returns True if running WinXP Pro
Dim osv As OSVERSIONINFOEX
If IsWinXP() Then
osv.OSVSize = Len(osv)
If GetVersionEx(osv) = 1 Then
IsWinXPPro = Not ((osv.wSuiteMask And VER_SUITE_PERSONAL) = VER_SUITE_PERSONAL)
End If
End If
End Function

johnske
07-12-2005, 06:27 AM
AAAGGGH!!! :bug: - thanx very much for that Bob (I thought I'd seen something much shorter :rofl: )

Regards,
John

xld
07-12-2005, 06:47 AM
AAAGGGH!!! :bug: - thanx very much for that Bob (I thought I'd seen something much shorter :rofl: )

There might be John, but that is an extract from a longer routine of mine (yes, really!) which checks enterprise server, domain controller, etc. And you can strip out all the OS' you aren't interested in.

Emily
07-12-2005, 06:55 AM
This one?
Private Declare Function GetVersionExA Lib "kernel32" _
(lpVersionInformation As OSVERSIONINFO) As Long
Private Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
End Type
Public lpVersionInformation As OSVERSIONINFO
'VER_PLATFORM_WIN32s(= 0) Win32s
'VER_PLATFORM_WIN32_Windows(= 1)
'VER_PLATFORM_WIN32_NT(= 2)

Sub ShowWVersion()
Dim s As String, a As String
a = OperatingSystem
Select Case a
Case 0: s = "Windows 32"
Case 1: s = "Windows 95"
Case 2: s = "Windows 98"
Case 3: s = "Windows ME"
Case 4: s = "Windows NT"
Case 5: s = "Windows 2000"
Case 6: s = "Windows XP"
End Select
MsgBox s
End Sub
Sub test()
MsgBox Application.OperatingSystem
End Sub

Public Function OperatingSystem() As Integer
lpVersionInformation.dwOSVersionInfoSize = Len(lpVersionInformation)
Call GetVersionExA(lpVersionInformation)
If (lpVersionInformation.dwPlatformId = 0) Then 'VER_PLATFORM_WIN32s(= 0) Win32s
OperatingSystem = 0

ElseIf (lpVersionInformation.dwPlatformId = 1) And _
(lpVersionInformation.dwMinorVersion = 0) Then 'Win95:VER_PLATFORM_WIN32_Windows(= 1) _
dwMinorVersion = 0
OperatingSystem = 1

ElseIf (lpVersionInformation.dwPlatformId = 1) And _
(lpVersionInformation.dwMinorVersion = 10) Then 'Win98:VER_PLATFORM_WIN32_Windows(= 1) _
dwMinorVersion = 10
OperatingSystem = 2

ElseIf (lpVersionInformation.dwPlatformId = 1) And _
(lpVersionInformation.dwMinorVersion = 90) Then 'WinMe:VER_PLATFORM_WIN32_Windows(= 1) _
dwMinorVersion = 90
OperatingSystem = 3

ElseIf (lpVersionInformation.dwPlatformId = 2) And _
(lpVersionInformation.dwMajorVersion < 5) Then 'WinNT:VER_PLATFORM_WIN32_Windows(= 1) _
dwMinorVersion < 5
OperatingSystem = 4

ElseIf (lpVersionInformation.dwPlatformId = 2) And _
(lpVersionInformation.dwMajorVersion = 5) And _
(lpVersionInformation.dwMinorVersion = 0) Then 'Win2000:VER_PLATFORM_WIN32_Windows(= 1) _
dwMinorVersion=5 and dwMinorVersion = 0
OperatingSystem = 5

ElseIf (lpVersionInformation.dwPlatformId = 2) And _
(lpVersionInformation.dwMajorVersion = 5) And _
(lpVersionInformation.dwMinorVersion = 1) Then 'WinXP:VER_PLATFORM_WIN32_Windows(= 1) _
dwMinorVersion=5 and dwMinorVersion = 0
OperatingSystem = 6

End If
End Function

Emily
07-12-2005, 07:00 AM
Here another one


Option Explicit
'///////////
'// IFM //
'///////////
'// My thanks to "venky_dude"
'// Code modified for XP+ 26 may 2002 by Ivan F Moala
'// Errors in Type declaration on
'// platforms that don't support
'// wServicePackMajor As Integer 'NB some Platforms returns 0 and Not 1
'// wServicePackMinor As Integer 'NB some Platforms returns 0 and Not 1
'// wSuiteMask As Integer 'NB some Platforms returns 0 and Not 1
'// wProductType As Byte 'NB some Platforms returns 0 and Not 1
'// wReserved As Byte 'NB some Platforms returns 0 and Not 1
'// Testing done by MVP Members
Private Declare Function GetVersionEx _
Lib "kernel32" _
Alias "GetVersionExA" ( _
lpVersionInformation As OSVERSIONINFO) _
As Long
Private Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
End Type
Sub Tester()
MsgBox OS_Version
End Sub
Function OS_Version() As String
Dim Os As OSVERSIONINFO
Dim m As Long
Dim MjV As Long
Dim PId As Long
Dim MnV As Long
Os.dwOSVersionInfoSize = Len(Os)
m = GetVersionEx(Os)
MjV = Os.dwMajorVersion
PId = Os.dwPlatformId
MnV = Os.dwMinorVersion
If PId = 2 Then
'// NT,2000,XP
Select Case Os.dwMajorVersion
Case Is = 3
OS_Version = " Windows NT 3." & Os.dwMinorVersion
Case Is = 4
OS_Version = " Windows NT 4 "
Case Is = 5
Select Case Os.dwMinorVersion
'// win 2000
Case Is = 0
OS_Version = " Windows Windows 2000 "
'// win XP or win .NET server
Case Is = 1
OS_Version = " Windows XP "
Case Else
OS_Version = " Windows .NET Server "
End Select
End Select
End If
If PId = 1 Then
If MnV = 10 Then OS_Version = " Windows 98 "
If MnV = 0 Then OS_Version = " Windows 95 "
If MnV = 90 Then OS_Version = " Windows ME "
End If
End Function

johnske
07-12-2005, 07:03 AM
Hi Emily,

Thanx for that also, yes, that looks more like the one I remember. Will check this out as well

Regards,
John :)

xld
07-12-2005, 07:22 AM
Thanx for that also, yes, that looks more like the one I remember. Will check this out as well

That is essentially the same as mine, but mine ie more extensive (you can test for XPPro or XPHome), and it is a better modular implementation :)

Ivan F Moala
07-12-2005, 07:27 PM
Hi Emily,

Thanx for that also, yes, that looks more like the one I remember. Will check this out as well

Regards,
John :)

Yes, that's actually taken from the Html maker that Colo and I made
for the MrExcel, Office Experts & Ozgrid boards.

http://www.puremis.net/excel/downloads.shtml

To test for versions of XP then use Xld's code or you could use this cut down version;



Sub GetOS()
Dim objOS As Object
Dim Msg, Msg1

On Error Resume Next
' Connect to WMI and obtain instances of Win32_OperatingSystem
For Each objOS In GetObject("winmgmts:").InstancesOf("Win32_OperatingSystem")
Msg = Msg & "BuildNumber = " & objOS.BuildNumber & vbCr
Msg = Msg & "BuildType = " & objOS.BuildType & vbCr
Msg = Msg & "Caption = " & objOS.Caption & vbCr
Msg = Msg & "CSDVersion = " & objOS.CSDVersion & vbCr
Msg = Msg & "CSName = " & objOS.CSName & vbCr
Msg = Msg & "InstallDate = " & WMIDateStringToDate(objOS.InstallDate) & vbCr '// datetime InstallDate;
Msg = Msg & "LastBootUpTime = " & WMIDateStringToDate(objOS.LastBootUpTime) & vbCr '// datetime LastBootUpTime;
Msg = Msg & "LocalDateTime = " & WMIDateStringToDate(objOS.LocalDateTime) & vbCr '// datetime LocalDateTime;
Msg = Msg & "Locale = " & objOS.Locale & vbCr '// string Locale;
Msg = Msg & "Manufacturer = " & objOS.Manufacturer & vbCr '// string Manufacturer;
Msg = Msg & "MaxNumberOfProcesses = " & objOS.MaxNumberOfProcesses & vbCr '// uint32 MaxNumberOfProcesses;
Msg = Msg & "Name = " & objOS.Name & vbCrLf '// string Name;
Msg = Msg & "NumberOfLicensedUsers = " & objOS.NumberOfLicensedUsers & vbCr '// uint32 NumberOfLicensedUsers;
Msg = Msg & "NumberOfProcesses = " & objOS.numberOfProcesses & vbCr '// uint32 NumberOfProcesses;
Msg = Msg & "Number of users = " & objOS.NumberOfUsers & vbCr '// uint32 NumberOfUsers;
Msg = Msg & "Organization = " & objOS.Organization & vbCr '// string Organization;
Msg = Msg & "OSLanguage = " & strOsLang(objOS.OSLanguage) & vbCr '// uint32 OSLanguage;
Msg = Msg & "OSProductSuite = " & objOS.OSProductSuite & vbCr '// uint32 OSProductSuite;
Msg = Msg & "OSType = " & strOsType(objOS.OSType) & vbCrLf '// uint16 OSType;
Msg = Msg & "OtherTypeDescription = " & objOS.OtherTypeDescription & vbCr '// string OtherTypeDescription;
Msg = Msg & "PlusProductID = " & objOS.PlusProductID & vbCr '// string PlusProductID;
Msg = Msg & "PlusVersionNumber = " & objOS.PlusVersionNumber & vbCr '// string PlusVersionNumber;
Msg = Msg & "Primary operating system= " & objOS.Primary & vbCr '// boolean Primary;
Msg = Msg & "ProductType = " & objOS.ProductType & vbCr '// uint32 ProductType;
Msg = Msg & "QuantumLength = " & objOS.QuantumLength & vbCr '// uint8 QuantumLength;
Msg = Msg & "QuantumType = " & objOS.QuantumType & vbCr '// uint8 QuantumType;
Msg = Msg & "RegisteredUser = " & objOS.RegisteredUser & vbCr '// string RegisteredUser;
Msg = Msg & "SerialNumber = " & objOS.SerialNumber & vbCr '// string SerialNumber;
Msg = Msg & "ServicePackMajorVersion = " & objOS.ServicePackMajorVersion & vbCr '// uint16 ServicePackMajorVersion;
Msg = Msg & "ServicePackMinorVersion = " & objOS.ServicePackMinorVersion & vbCr '// uint16 ServicePackMinorVersion;
Msg = Msg & "SizeStoredInPagingFiles = " & objOS.SizeStoredInPagingFiles & vbCr '// uint64 SizeStoredInPagingFiles;
Msg = Msg & "Status = " & objOS.Status & vbCr '// string Status;
Msg = Msg & "Operating System = " & objOS.Caption & vbCr '// uint64 TotalSwapSpaceSize;
Msg = Msg & "Version = " & objOS.Version & vbCr '// string Version;

MsgBox Msg

Next

If Err <> 0 Then MsgBox Err.Description

End Sub

Private Function WMIDateStringToDate(dtmInstallDate)

WMIDateStringToDate = CDate( _
Mid(dtmInstallDate, 5, 2) & "/" & _
Mid(dtmInstallDate, 7, 2) & "/" & _
Left(dtmInstallDate, 4) & " " & _
Mid(dtmInstallDate, 9, 2) & ":" & _
Mid(dtmInstallDate, 11, 2) & ":" & _
Mid(dtmInstallDate, 13, 2))

End Function


Private Function strOsType(intOs As Integer) As String

Select Case intOs
Case 0: strOsType = "Unknown"
Case 1: strOsType = "Other"
Case 2: strOsType = "MACOS"
Case 3: strOsType = "ATTUNIX"
Case 4: strOsType = "DGUX"
Case 5: strOsType = "DECNT"
Case 6: strOsType = "Digital Unix"
Case 7: strOsType = "OpenVMS"
Case 8: strOsType = "HPUX"
Case 9: strOsType = "AIX"
Case 10: strOsType = "MVS"
Case 11: strOsType = "OS400"
Case 12: strOsType = "OS/2"
Case 13: strOsType = "JavaVM"
Case 14: strOsType = "MSDOS"
Case 15: strOsType = "WIN3x"
Case 16: strOsType = "WIN95"
Case 17: strOsType = "WIN98"
Case 18: strOsType = "WINNT"
Case 19: strOsType = "WINCE"
Case 20: strOsType = "NCR3000"
Case 21: strOsType = "NetWare"
Case 22: strOsType = "OSF"
Case 23: strOsType = "DC/OS"
Case 24: strOsType = "Reliant UNIX"
Case 25: strOsType = "SCO UnixWare"
Case 26: strOsType = "SCO OpenServer"
Case 27: strOsType = "Sequent"
Case 28: strOsType = "IRIX"
Case 29: strOsType = "Solaris"
Case 30: strOsType = "SunOS"
Case 31: strOsType = "U6000"
Case 32: strOsType = "ASERIES"
Case 33: strOsType = "TandemNSK"
Case 34: strOsType = "TandemNT"
Case 35: strOsType = "BS2000"
Case 36: strOsType = "LINUX"
Case 37: strOsType = "Lynx"
Case 38: strOsType = "XENIX"
Case 39: strOsType = "VM/ESA"
Case 40: strOsType = "Interactive UNIX"
Case 41: strOsType = "BSDUNIX"
Case 42: strOsType = "FreeBSD"
Case 43: strOsType = "NetBSD"
Case 44: strOsType = "GNU Hurd"
Case 45: strOsType = "OS9"
Case 46: strOsType = "MACH Kernel"
Case 47: strOsType = "Inferno"
Case 48: strOsType = "QNX"
Case 49: strOsType = "EPOC"
Case 50: strOsType = "IxWorks"
Case 51: strOsType = "VxWorks"
Case 52: strOsType = "MiNT"
Case 53: strOsType = "BeOS"
Case 54: strOsType = "HP MPE"
Case 55: strOsType = "NextStep"
Case 56: strOsType = "PalmPilot"
Case 57: strOsType = "Rhapsody"
End Select

End Function

Private Function strOsLang(intOsLang As Integer) As String
Select Case intOsLang
Case 1: strOsLang = " Arabic "
Case 4: strOsLang = " Chinese "
Case 9: strOsLang = " English "
Case 1025: strOsLang = " Arabic (Saudi Arabia) "
Case 1026: strOsLang = " Bulgarian "
Case 1027: strOsLang = " Catalan "
Case 1028: strOsLang = " Chinese (Taiwan) "
Case 1029: strOsLang = " Czech "
Case 1030: strOsLang = " Danish "
Case 1031: strOsLang = " German (Germany) "
Case 1032: strOsLang = " Greek "
Case 1033: strOsLang = " English (United States) "
Case 1034: strOsLang = " Spanish (Traditional Sort) "
Case 1035: strOsLang = " Finnish "
Case 1036: strOsLang = " French (France) "
Case 1037: strOsLang = " Hebrew "
Case 1038: strOsLang = " Hungarian "
Case 1039: strOsLang = " Icelandic "
Case 1040: strOsLang = " Italian (Italy) "
Case 1041: strOsLang = " Japanese "
Case 1042: strOsLang = " Korean "
Case 1043: strOsLang = " Dutch (Netherlands) "
Case 1044: strOsLang = " Norwegian (Bokmal) "
Case 1045: strOsLang = " Polish "
Case 1046: strOsLang = " Portuguese (Brazil) "
Case 1047: strOsLang = " Rhaeto-Romanic "
Case 1048: strOsLang = " Romanian "
Case 1049: strOsLang = " Russian "
Case 1050: strOsLang = " Croatian "
Case 1051: strOsLang = " Slovak "
Case 1052: strOsLang = " Albanian "
Case 1053: strOsLang = " Swedish "
Case 1054: strOsLang = " Thai "
Case 1055: strOsLang = " Turkish "
Case 1056: strOsLang = " Urdu "
Case 1057: strOsLang = " Indonesian "
Case 1058: strOsLang = " Ukrainian "
Case 1059: strOsLang = " Belarusian "
Case 1060: strOsLang = " Slovenian "
Case 1061: strOsLang = " Estonian "
Case 1062: strOsLang = " Latvian "
Case 1063: strOsLang = " Lithuanian "
Case 1065: strOsLang = " Farsi "
Case 1066: strOsLang = " Vietnamese "
Case 1069: strOsLang = " Basque "
Case 1070: strOsLang = " Sorbian "
Case 1071: strOsLang = " Macedonian (FYROM) "
Case 1072: strOsLang = " Sutu "
Case 1073: strOsLang = " Tsonga "
Case 1074: strOsLang = " Tswana "
Case 1076: strOsLang = " Xhosa "
Case 1077: strOsLang = " Zulu "
Case 1078: strOsLang = " Afrikaans "
Case 1080: strOsLang = " Faeroese "
Case 1081: strOsLang = " Hindi "
Case 1082: strOsLang = " Maltese "
Case 1084: strOsLang = " Gaelic "
Case 1085: strOsLang = " Yiddish "
Case 1086: strOsLang = " Malay (Malaysia) "
Case 2049: strOsLang = " Arabic (Iraq) "
Case 2052: strOsLang = " Chinese (PRC) "
Case 2055: strOsLang = " German (Switzerland) "
Case 2057: strOsLang = " English (United Kingdom) "
Case 2058: strOsLang = " Spanish (Mexico) "
Case 2060: strOsLang = " French (Belgium) "
Case 2064: strOsLang = " Italian (Switzerland) "
Case 2067: strOsLang = " Dutch (Belgium) "
Case 2068: strOsLang = " Norwegian (Nynorsk) "
Case 2070: strOsLang = " Portuguese (Portugal) "
Case 2072: strOsLang = " Romanian (Moldova) "
Case 2073: strOsLang = " Russian (Moldova) "
Case 2074: strOsLang = " Serbian (Latin) "
Case 2077: strOsLang = " Swedish (Finland) "
Case 3073: strOsLang = " Arabic (Egypt) "
Case 3076: strOsLang = " Chinese (Hong Kong SAR) "
Case 3079: strOsLang = " German (Austria) "
Case 3081: strOsLang = " English (Australia) "
Case 3082: strOsLang = " Spanish (International Sort) "
Case 3084: strOsLang = " French (Canada) "
Case 3098: strOsLang = " Serbian (Cyrillic) "
Case 4097: strOsLang = " Arabic (Libya) "
Case 4100: strOsLang = " Chinese (Singapore) "
Case 4103: strOsLang = " German (Luxembourg) "
Case 4105: strOsLang = " English (Canada) "
Case 4106: strOsLang = " Spanish (Guatemala) "
Case 4108: strOsLang = " French (Switzerland) "
Case 5121: strOsLang = " Arabic (Algeria) "
Case 5127: strOsLang = " German (Liechtenstein) "
Case 5129: strOsLang = " English (New Zealand) "
Case 5130: strOsLang = " Spanish (Costa Rica) "
Case 5132: strOsLang = " French (Luxembourg) "
Case 6145: strOsLang = " Arabic (Morocco) "
Case 6153: strOsLang = " English (Ireland) "
Case 6154: strOsLang = " Spanish (Panama) "
Case 7169: strOsLang = " Arabic (Tunisia) "
Case 7177: strOsLang = " English (South Africa) "
Case 7178: strOsLang = " Spanish (Dominican Republic) "
Case 8193: strOsLang = " Arabic (Oman) "
Case 8201: strOsLang = " English (Jamaica) "
Case 8202: strOsLang = " Spanish (Venezuela) "
Case 9217: strOsLang = " Arabic (Yemen) "
Case 9226: strOsLang = " Spanish (Colombia) "
Case 10241: strOsLang = " Arabic (Syria) "
Case 10249: strOsLang = " English (Belize) "
Case 10250: strOsLang = " Spanish (Peru) "
Case 11265: strOsLang = " Arabic (Jordan) "
Case 11273: strOsLang = " English (Trinidad) "
Case 11274: strOsLang = " Spanish (Argentina) "
Case 12289: strOsLang = " Arabic (Lebanon) "
Case 12298: strOsLang = " Spanish (Ecuador) "
Case 13313: strOsLang = " Arabic (Kuwait) "
Case 13322: strOsLang = " Spanish (Chile) "
Case 14337: strOsLang = " Arabic (U.A.E.) "
Case 14346: strOsLang = " Spanish (Uruguay) "
Case 15361: strOsLang = " Arabic (Bahrain) "
Case 15370: strOsLang = " Spanish (Paraguay) "
Case 16385: strOsLang = " Arabic (Qatar) "
Case 16394: strOsLang = " Spanish (Bolivia) "
Case 17418: strOsLang = " Spanish (El Salvador) "
Case 18442: strOsLang = " Spanish (Honduras) "
Case 19466: strOsLang = " Spanish (Nicaragua) "
Case 20490: strOsLang = " Spanish (Puerto Rico) "
End Select

End Function