#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=VersionTest_Win81.exe #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_Res_Compatibility=Win81 #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Parameters=/pe /rm /so #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include #include $tagVS_FIXEDFILEINFO2 = "DWORD dwSignature;DWORD dwStrucVersion;DWORD dwFileVersionMS;DWORD dwFileVersionLS;DWORD dwProductVersionMS;DWORD dwProductVersionLS;DWORD dwFileFlagsMask;DWORD dwFileFlags;DWORD dwFileOS;DWORD dwFileType;DWORD dwFileSubtype;DWORD dwFileDateMS;DWORD dwFileDateLS;" $filename = "C:\windows\notepad.exe" $result = DllCall("version.dll", "DWORD", "GetFileVersionInfoSizeW", "wstr", $filename, "DWORD*", Ptr(0)) $pInfo = _WinAPI_CreateBuffer($result[0]) $result = _WinAPI_GetFileVersionInfo($filename, $pInfo) $result = DllCall("version.dll", "BOOL", "VerQueryValueW", "ptr", $pInfo, "wstr", "\", 'ptr*', 0, 'uint*', 0) $pFFI = DllStructCreate($tagVS_FIXEDFILEINFO2, $result[3]) $iFileMS = DllStructGetData($pFFI, "dwFileVersionMS") $iFileLS = DllStructGetData($pFFI, "dwFileVersionLS") $iProductMS = DllStructGetData($pFFI, "dwProductVersionMS") $iProductLS = DllStructGetData($pFFI, "dwProductVersionLS") _WinAPI_FreeMemory($pInfo) $WinAPIVersion = _FormatVersion($iFileMS, $iFileLS) $WinAPIProductVersion = _FormatVersion($iProductMS, $iProductLS) $autoitversion = FileGetVersion($filename) $AutoItFileVersion = FileGetVersion($filename, "FileVersion") $AutoItProductVersion = FileGetVersion($filename, "ProductVersion") MsgBox(0, "AutoIt Version: " & @AutoItVersion, $filename & @CRLF & @CRLF & "AutoIt Version: " & $autoitversion & @CRLF & "AutoIt File Version: " & $AutoItFileVersion & @CRLF & "AutoIt Product Version: " & $AutoItProductVersion & @CRLF & "Most Significant: " & $iFileMS & @CRLF & "Least Significant: " & $iFileLS & @CRLF & "WinAPI Version: " & $WinAPIVersion & @CRLF & "WinAPI Product Version: " & $WinAPIProductVersion) Func _FormatVersion($ms, $ls) Return StringFormat("%u.%u.%u.%u", (BitShift($ms, 16)), (BitAND($ms, 0xFFFF)), (BitShift($ls, 16)), (BitAND($ls, 0xFFFF))) EndFunc