Delphi 调用批处理


本文整理自网络,侵删。

 

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;

相关阅读 >>

Delphi vclskin 5.40在2010安装方法

Delphi 新增功能之: ioutils 单元(7): tfile 结构的功能

Delphi 图像旋转90° 反旋转90°

Delphi webbrowser通过遍历id查找元素是否存在

Delphi 网上获取北京时间取字符串与字符串中间的字符

Delphi unicode转中文编码

Delphi程序与chm帮助关联的简单实现

Delphi循环遍历同类控件或所有控件

Delphi与正则表达式

Delphi d10.x 并行库ppl编程之 futures

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...