Retrieves the name of the executable file associated with the specified file name
#include <WinAPIShellEx.au3>
_WinAPI_FindExecutable ( $sFileName [, $sDirectory = ""] )
$sFileName | Fully qualified path to existing file |
$sDirectory | [optional] Default directory |
Success: | The Full path to the executable file started when an "open" by association is run on the file specified |
Failure: | Empty string if no association was found, @extended contains an error code as $SE_ERR_* |
$SE_ERR_* constants require #include <APIShellExConstants.au3>
Search FindExecutable in MSDN Library.
#include <MsgBoxConstants.au3>
#include <WinAPIShellEx.au3>
; Find the executable that is associated with the AutoIt script.
MsgBox($MB_SYSTEMMODAL, "Find Executable", "File: " & @ScriptFullPath & @CRLF & "Executable: " & _WinAPI_FindExecutable(@ScriptName))