Skip to content
⌘ NSIS Forum Archive

Execute an exe file and see the output in the cmd prompt and also log the installatio

2 posts

chandrahas484#

Execute an exe file and see the output in the cmd prompt and also log the installatio

Hi,
I wanted to execute a .exe file usine Execwait command. I want the execution to be seen in the command prompt and also want the execution to be logged.
I tried with these commands below:
(i)ExecWait '"$temp\test.cmd" /foo "bar baz" /blergh'
In this case the execution is shown in the command prompt but not logged

(ii)ExecWait '"$temp\test.cmd" /foo "bar baz" /blergh > "$temp\stdout.txt"'
In this case the execution is not shown in the command prompt but it is logged into the 'stdout.txt' file

Is there a way, I can do both?(i.e see the execution in the cmd prompt and also log it)

Any help is appreciated.
Thanks.
Afrow UK#
To do both you would need to capture the output in your own console application and write it to both your STDOUT stream and to a file at the same time.

Stu