Function Reference


_WinAPI_ShellOpenWithDlg

Displays the Open With dialog box

#include <WinAPIDlg.au3>
_WinAPI_ShellOpenWithDlg ( $sFilePath [, $iFlags = 0 [, $hParent = 0]] )

Parameters

$sFilePath The file name.
$iFlags [optional] The characteristics of the Open With dialog box. This parameter can be one or more of the following values.
$OAIF_ALLOW_REGISTRATION
$OAIF_REGISTER_EXT
$OAIF_EXEC
$OAIF_FORCE_REGISTRATION
$OAIF_HIDE_REGISTRATION
$OAIF_URL_PROTOCOL
$hParent [optional] Handle of the parent window.

Return Value

Success: 1.
Failure: 0 and sets the @error flag to non-zero, @extended flag may contain the HRESULT error code.

Remarks

This function requires Windows Vista or later.

See Also

Search SHOpenWithDialog in MSDN Library.

Example

#include <APIDlgConstants.au3>
#include <MsgBoxConstants.au3>
#include <WinAPIDlg.au3>
#include <WinAPISys.au3>

If Number(_WinAPI_GetVersion()) < 6.0 Then
        MsgBox(($MB_ICONERROR + $MB_SYSTEMMODAL), 'Error', 'Require Windows Vista or later.')
        Exit
EndIf

_WinAPI_ShellOpenWithDlg(@ScriptFullPath, $OAIF_EXEC)