我用以下代码测试,也没问题:<br>uses shellapi;<br><br>function ExecuteFile(const FileName, Params, DefaultDir: string; ShowCmd: Integer): THandle;<br>var<br> zFileName, zParams, zDir: array[0..79] of Char;<br>begin<br> Result := ShellExecute(Application.MainForm.Handle, nil,<br> StrPCopy(zFileName, FileName), StrPCopy(zParams, Params),<br> StrPCopy(zDir, DefaultDir), ShowCmd);<br>end;<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>begin<br> ExecuteFile('C:/test/test.exe','','', SW_SHOWNORMAL);<br>end;