V
V
voproser456542022-03-22 19:56:40
Pascal
voproser45654, 2022-03-22 19:56:40

How to use batch commands in PascalABC?

How to use batch commands in PascalABC? The option to write to a file and run through exec is not suitable.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasily Bannikov, 2022-03-22
@voproser45654

begin
  var start := new System.Diagnostics.ProcessStartInfo('tracert.exe', 'ya.ru');
  start.RedirectStandardOutput := true;
  start.UseShellExecute := false;
  var process := System.Diagnostics.Process.Start(start);
  process.OutputDataReceived += (sender, args) -> Println(args);
  process.BeginOutputReadLine;
  process.WaitForExit;
end.

Not an option?

H
HemulGM, 2022-03-22
@HemulGM

No way, call execution of final commands via wineexec or shellexecute or via createprocces

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question