K
K
KashurinS2015-10-07 10:27:05
Delphi
KashurinS, 2015-10-07 10:27:05

How to run for example expand.exe with parameters so that it returns the result to the DELPHI program?

Good day.
I am writing a program that should find out what is in the CAB file, and pull out some of these files from there.
Fortunately, expand.exe is a built-in program in Windows, I just copied it to the directory with my .exe file. In the vastness of the network, I found such options as ShellExecute, Winexec and CreateProcess, they all do what they need, but do not transmit the result back, i.e. in the simplest version, I need a list of files inside to get into the program after expanding expand to me. Has anyone struggled with this problem, how can it be solved?
And if this is not possible, how is it possible?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Z
zed, 2015-10-07
@KashurinS

Solved with CreateProcess and PIPE. I can even show an example: u_ConsoleAppRunner.pas

E
Evgeny Svirsky, 2015-10-07
@e_svirsky

Not strong in this area - but as an option - the result can be written to a file and then read out the file with the results.

C
Curly Brace, 2015-10-07
@stasuss

read stdout output of a running process

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question