Autor Beitrag
Sebastian R.
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 72
Erhaltene Danke: 1



BeitragVerfasst: Mi 07.06.06 14:05 
Hi Leute,
ich schreibe gerade ein Tool mit FreePascal für Linux. Welchen Befehl muss ich benutzen, um Bash-Commandos auszuführen, z.B. mount etc.?

MfG, Sebastian!


Zuletzt bearbeitet von Sebastian R. am Mi 07.06.06 14:09, insgesamt 1-mal bearbeitet
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mi 07.06.06 14:07 
Hallo,

bitte ändere den Titel des Topics, da er wenig über das eigentlich Thema verrät. Hier der entsprechende Absatz aus den Richtlinien:

1.2 Beiträge:
Bitte formuliere den Betreff Deiner Beiträge so, dass andere Mitglieder anhand dieser bereits das eigentliche Thema festmachen können. Beiträge wie etwa "Eine Anfängerfrage" oder "Weiß jemand, wie das geht?" lassen den Leser im Unklaren darüber, was das Thema der Diskussion ist.[...]


Einfach oben bei Deinem ersten Beitrag auf user defined image klicken und den Titel ändern. Dank Dir!

Viele Grüße,
Christian

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
Sebastian R. Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 72
Erhaltene Danke: 1



BeitragVerfasst: Mi 07.06.06 14:10 
Sorry, hat grad getippt und Tab gedrückt. Danach stand halt nur FreePascal im Titel. ;)
Sebastian R. Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 72
Erhaltene Danke: 1



BeitragVerfasst: Mi 21.06.06 17:56 
Weiss denn da niemand was? Bei Windows klappt das mit WinExec und bei Linux?
PLuS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 98

Win XP, Suse Linux 9.0
D5 Standard, D2005 Personal; Perl; PureBasic
BeitragVerfasst: Mi 21.06.06 18:12 
Das müsste gehen (ungetestet):
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
uses Classes, SysUtils, Process;
//...
procedure ExecCommand(const command: string);
var
  MyProcess: TProcess;
begin
  MyProcess := TProcess.create(NIL);
  try
    MyProcess.CommandLine := command;
    MyProcess.Options := MyProcess.Options + [poWaitOnExit];
    MyProcess.Execute;
  finally
    MyProcess.Free;
  end;
end;

_________________
Der letzte macht die Tür zu!