uses ShellApi;

procedure TForm1.Button1Click(Sender: TObject);
var
  filename, Path: string;
begin
  filename := 'D:\WmgjServer146\server\start.bat';
  Path := ExtractFilePath(filename);
  SetCurrentDir(Path);
  ShellExecute(Handle, 'open', PWideChar(filename), 'run', nil, SW_SHOWNORMAL);
end;

 

相关文章:

  • 2022-12-23
  • 2021-06-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2021-08-04
猜你喜欢
  • 2021-09-20
  • 2021-10-31
  • 2021-07-21
  • 2022-12-23
  • 2021-12-16
  • 2022-01-14
  • 2022-12-23
相关资源
相似解决方案