LastStdout
Variable that is set to redirected output of the STDOUT and STDERR handles from the most recently run external program or script. Leading and trailing white space (including line breaks) are trimmed from the captured output before it is stored in the variable.
Note that only programs that are started through CreateProcess() allow output redirection and that STDOUT and STDERR are typically only used by console mode programs. This implies that:
- Any Run Program action that uses the Shell verb option will not have its STDOUT or STDERR output redirected.
- Any Run Program action that runs a Windows GUI program (i.e., not a console mode program) will not normally produce any STDOUT or STDERR output. (Non-console programs can write to their STDOUT and STDERR handles if those handles are valid, but very few do so.)
- Many Run Script actions (including MS-DOS style batch commands and PowerShell scripts) are console-based and send their output to STDOUT and STDERR, so their output will be captured in <LastStdOut>.
Note: The installer assumes that any output produced by the program on STDOUT or STDERR is encoded in the OEM code page (CP_OEMCP).
Usage
You can refer to this variable as <LastStdout>. In conditional expressions you can omit the brackets and simply use LastStdout as a test for any non-space output at all or NOT LastStdout for no output. This variable is automatically set by InstallMate when an external program runs. However, you may want to reset it (to an empty string, for example) under some circumstances.