16

I'm wondering, how do I get the output of an execwait command in NSIS. For example, if I run tree, how would I get the output, which would be the actual tree?

noryb009
  • 548
  • 2
  • 10
  • 20

1 Answers1

19

You can't do that with ExecWait, you have to use one of the plugins: nsExec, ExecDos or ExecCmd

Anders
  • 97,548
  • 12
  • 110
  • 164
  • 11
    Thanks. I ended up using: nsExec::ExecToStack 'command', pop $1 (for the exit code), pop $1 (for the ouput) – noryb009 Oct 29 '10 at 01:37
  • ExecCmd now states: "This plug-in is no longer updated and has been superseded by the [ExecDos plug-in](http://nsis.sourceforge.net/ExecDos_plug-in)." – icc97 Feb 15 '17 at 13:45
  • @Anders im using execwait to launch an exe but it is stuck on this command and it never proceeds. ExecWait "$INSTDIR\Application\abc.exe" – Dragon Jun 07 '20 at 11:54
  • @Dragon How is this related? ExecWait waits until the process ends. Is it stuck waiting for stdin? – Anders Jun 07 '20 at 16:22