Windows: output to stdout during command line installation
Checklist
- [X] I added a descriptive title
- [X] I searched open requests and couldn't find a duplicate
What is the idea?
While a decision has not been made about a replacement for NSIS (#646), it might be worth exploring adding stdout output to the Windows command line installer.
This could be a good start: https://forums.winamp.com/forum/developer-center/nsis-discussion/261756-write-to-command-line-when-silent#post3290436
Why is this needed?
There is currently no way to debug failures in command line installers. Using log files causes other issues (e.g., writing outside the installation directory with GUI installers when the "Browse..." button is clicked).
What should happen?
There should be an additional flag that allows users to output to stdout (or suppress output to stdout).
Additional Context
No response
I saw there are a few examples in Github if we search for System::Call 'kernel32::AttachConsole. The most complete examples seem to be:
- Errors reported to stdout if silent
- Printing the installer help to stdout
- Logging utilities including stdout output
- Error reporting in red
- Hybrid CLI/GUI help message
- A dual logging macro
So I think we won't be able to forward every message from NSIS to stdout, but we can definitely print our custom messages to stdout there.