Advertisement
Guest User

RunCommand

a guest
Mar 2nd, 2023
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.58 KB | None | 0 0
  1. unit Unit1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls;
  9.  
  10. type
  11.  
  12.   { TForm1 }
  13.  
  14.   TForm1 = class(TForm)
  15.     Button1: TButton;
  16.     procedure Button1Click(Sender: TObject);
  17.   private
  18.  
  19.   public
  20.  
  21.   end;
  22.  
  23. var
  24.   Form1: TForm1;
  25.  
  26. implementation
  27.  
  28. {$R *.lfm}
  29.  
  30. { TForm1 }
  31.  
  32. uses Process;
  33.  
  34. procedure TForm1.Button1Click(Sender: TObject);
  35. VAR t: ansistring;
  36. begin
  37.   RunCommand('/usr/bin/xfce4-terminal',['-e', '/bin/bash -c "yay -S --aur rstudio-desktop;echo Press any key to continue..."'],t);
  38. end;
  39.  
  40. end.
  41.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement