//statement
WinExec (
  lpCmdLine: LPCSTR; {file name and parameters; if no path is specified, it will be searched in the following order: program directory / current directory / System32 / Windows / PATH environment variable}
  uCmdShow: UINT      {startup option}
): UINT;

//return value:
more than the 31                    {Call success}
equal 0                     {Not enough storage}
ERROR_FILE_NOT_FOUND = 2;   {File name error}
ERROR_PATH_NOT_FOUND = 3;   {Path name error}
ERROR_BAD_FORMAT = 11; {EXE file is invalid}

// uCmdShow parameter optional values:
SW_HIDE = 0; {Hidden, and the taskbar is not minimized}
SW_SHOWNORMAL = 1; {Display with recent size and position, activate}
SW_NORMAL = 1; {Same as SW_SHOWNORMAL}
SW_SHOWMINIMIZED = 2; {Minimize, Activate}
SW_SHOWMAXIMIZED = 3; {Maximize, activate}
SW_MAXIMIZE = 3; {Same as SW_SHOWMAXIMIZED}
SW_SHOWNOACTIVATE = 4; {Display with recent size and position, inactive}
SW_SHOW = 5; {Same as SW_SHOWNORMAL}
SW_MINIMIZE = 6; {Minimize, Inactive}
SW_SHOWMINNOACTIVE = 7; {Same as SW_MINIMIZE}
SW_SHOWNA = 8; {Same as SW_SHOWNOACTIVATE}
SW_RESTORE = 9; {Same as SW_SHOWNORMAL}
SW_SHOWDEFAULT = 10; {Same as SW_SHOWNORMAL}
SW_MAX = 10; {Same as SW_SHOWNORMAL}


// For example, start Notepad:
procedure TForm1.Button1Click (Sender: TObject);
begin 
  WinExec ('notepad.exe', SW_SHOWNORMAL);
end ;