Sign in to follow this  
Followers 0
lafafmentvotre

Detect OS Installed

4 posts in this topic

Hi everybody and sorry for my bad english

I want to know how to detect OS language installed on computers.

Not the default language used by user but the language installed

I use this script to detect the default language used by user :

$Lang_dll = DllOpen("kernel32.dll")
$UserIntLang=DllCall ( $Lang_dll, "int", "GetUserDefaultUILanguage" )
If @error=0 Then
$UserIntLang=Hex($UserIntLang[0],4);conversion en HEX
Else
$UserIntLang="UNKNOWN"
EndIf
DllClose($Lang_dll)
Func _Language()
Select
    ;Case StringInStr("0413,0813", $UserIntLang)
        ;Return "Dutch"
    Case StringInStr("0409,0809,0c09,1009,1409,1809,1c09,2009,2409,2809,2c09,3009,3409", $UserIntLang)
        Return "English"
    Case StringInStr("040c,080c,0c0c,100c,140c,180c", $UserIntLang)
        Return "French"
    EndSelect
EndFunc

but some computers are installed with XP EN and MUI FR and others with only XP FR.

How to detect this ?

Thanks

Share this post


Link to post
Share on other sites



Hi,

because you use GetUserDefaultUILanguage to detect user language, have a look at GetSystemDefaultUILanguage

http://msdn.microsoft.com/en-us/library/dd318123(VS.85).aspx

to detect os language.

;-))

Stefan

Share this post


Link to post
Share on other sites

Thanks

It's ok now

Have a good day

Share this post


Link to post
Share on other sites

hi,

more simple: Have a look at macro @OSLang.

;-))

Stefan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0