Forum Discussion
cruzader
15 years agoContributor
Hello Jared,
Thanks for the information.
The primary task of the script I planned of creating was to determine
if the language of the current PC's OS is English (United States).
Below is the function I created for checking if the language is US.
Function IsLangUS()
sComputer = "."
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
If (iOSLang = 1033) Then
IsLangUS = True
Else
IsLangUS = False
End If
End Function
Is the function above correct? Anyway, I'll also try your suggestion.
Thanks.
Regards,
Ruel J. Saunar
Thanks for the information.
The primary task of the script I planned of creating was to determine
if the language of the current PC's OS is English (United States).
Below is the function I created for checking if the language is US.
Function IsLangUS()
sComputer = "."
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
If (iOSLang = 1033) Then
IsLangUS = True
Else
IsLangUS = False
End If
End Function
Is the function above correct? Anyway, I'll also try your suggestion.
Thanks.
Regards,
Ruel J. Saunar
Related Content
- 5 months ago
- 12 years ago
- 6 years ago
- 5 years ago
Recent Discussions
- 4 hours ago
- 4 days ago