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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • chandrahas484
    Junior Member
    • Jan 2014
    • 1

    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
    Moderator
    • Nov 2002
    • 8434

    #2
    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

    Comment

    Working...
    X