$sPath = FileOpenDialog('Select exe',@ScriptDir,'Executable (*.exe)')
If $sPath Then MsgBox(0,'',BinaryType($sPath))
Func BinaryType($sPath)
Local $aRet = DllCall('kernel32.dll','bool','GetBinaryType','str',$sPath,'dword*',0)
If $aRet[0] Then
Switch $aRet[2]
Case 0
Return 'SCS_32BIT_BINARY'
Case 1
Return 'SCS_DOS_BINARY'
Case 2
Return 'SCS_WOW_BINARY'
Case 3
Return 'SCS_PIF_BINARY'
Case 4
Return 'SCS_POSIX_BINARY'
Case 5
Return 'SCS_OS216_BINARY'
Case 6
Return 'SCS_64BIT_BINARY'
EndSwitch
EndIf
EndFunc