1: CreateProcess
procedure TForm1.Button1Click(Sender: TObject);
var
Str: String;
StartUpInfo: TStartUpInfo;
ProcessInfo: TProcessInformation;
begin
FillChar(StartUpInfo, Sizeof(TStartUpInfo), #0);
StartUpInfo.cb := Sizeof(TstartUpInfo);
if (OpenDialog1.Execute) then begin
//启动程序路径+启动参数
Str := OpenDialog1.FileName + ' -fl';
CreateProcess(nil, PChar(Str), nil, nil, False, 0, nil, nil, StartUpInfo, ProcessInfo);
end;
end;
2: WinExec
3: ShellExecute