I´m trying to get the Keyboard language and get als return "0" wenn I do it under Windows Server 2012, I executed also in Windows 7 x64 and works fine :S Any suggestion? Appreciate it! Here my code: #include <WinAPISys.au3>
Run("cmd.exe", "", @SW_HIDE)
Local $hWnd = WinWait("[CLASS:ConsoleWindowClass]")
Local $bNewKey = "0" & StringRight(_WinAPI_GetKeyboardLayout($hWnd), 3)
MsgBox(0,"Keyboard Language", $bNewKey)