TExecWait = (ewNoWait, ewWaitUntilTerminated, ewWaitUntilIdle)
var ErrorCode: Integer; begin if not ShellExec('', ExpandConstant('{app}filename.rtf'), '', '', SW_SHOW, ewNoWait, ErrorCode) then begin // handle failure if necessary end; end;
TExecWait = (ewNoWait, ewWaitUntilTerminated, ewWaitUntilIdle)
var ErrorCode: Integer; begin if not ShellExec('', ExpandConstant('{app}filename.rtf'), '', '', SW_SHOW, ewNoWait, ErrorCode) then begin // handle failure if necessary end; end;