How to detect current OS version and OS Language (ex. if Windows XP Japanese OS)
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2010
03:21 PM
03-25-2010
03:21 PM
How to detect current OS version and OS Language (ex. if Windows XP Japanese OS)
Hello,
Is there a way to detect what OS version and OS language is currently installed
in the local PC?
Regards,
Ruel J. Saunar
Is there a way to detect what OS version and OS language is currently installed
in the local PC?
Regards,
Ruel J. Saunar
3 REPLIES 3
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2010
09:21 PM
03-25-2010
09:21 PM
Hi Ruel,
To get Windows version information, you can use the Sys.OSInfo object.
As for the current locale, try using the HKEY_CURRENT_USER\Control Panel\International\LocaleName registry key. You can obtain its value by using the RegRead method of the WScript.Shell object.
To get Windows version information, you can use the Sys.OSInfo object.
As for the current locale, try using the HKEY_CURRENT_USER\Control Panel\International\LocaleName registry key. You can obtain its value by using the RegRead method of the WScript.Shell object.
------
Yuri
TestComplete Customer Care Engineer
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Yuri
TestComplete Customer Care Engineer
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2010
05:29 PM
03-28-2010
05:29 PM
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2010
12:40 AM
03-29-2010
12:40 AM
Hi Ruel,
Your function seems to be correct, and you can continue using it. Checking the registry as I suggested is just one of possible solutions.
Your function seems to be correct, and you can continue using it. Checking the registry as I suggested is just one of possible solutions.
------
Yuri
TestComplete Customer Care Engineer
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Yuri
TestComplete Customer Care Engineer
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
