Skip to content
⌘ NSIS Forum Archive

Silent install with STDOUT output

11 posts

Leanid#

Silent install with STDOUT output

Is it possible to have silent install and have details to be output in STDOUT?

I run installer during automated build. I run it with \S option. As part of installation I run some nsExecToLog commands. It prints output of my command in NSIS windows in GUI mode. But when I run in silent mode I have nothing. And I really need it to see how my installation worked.

It would be nice to have silent mode but have Detailed log printed to STDOUT.
Leanid#
So if I understand correctly I need special build with scons NSIS_CONFIG_LOG=yes
then if I am in silent mode I call
LogSet on
So I will get installer.log file.

But how can I print in STDOUT when I am in silent mode. Is it possible?
Or generate this file and then run second command to read this log file in stdout my only option?
Afrow UK#
You would need to modify the NSIS source code to convert NSIS to a console application.

Stu
Leanid#
I see. NSIS does not have ability to print into STDOUT.

I think I will use SetLog option and then in my build automation just read install.log by next command, so I have something similar as stdout.
Thank you.
Afrow UK#
As far as I know, and according to Google, you cannot have STDOUT if the application is not a console application.

Stu
kichik#
You can build NSIS with NSIS_CONFIG_LOG_STDOUT=yes. This will cause the log to be written to stdout. But nsExec doesn't go through the regular logging mechanism and directly updates the UI, so it won't appear there.
panikbuttn#
I would like to send messages to STDOUT (or to the console) at the end of a silent install. I have read here that recompiling is the only way to accomplish this.

I have recompiled with
scons NSIS_CONFIG_LOG=yes SKIPUTILS="NSIS Menu" NSIS_CONFIG_LOG_STDOUT=yes

but my LogText messages are still being sent to install.log

I am using the newly compiled makensis.exe [VC++ 9.0, sCons 0.98.5] with the Stubs from the special_build package.

Any ideas what I'm doing wrong?
kichik#
You can't use the stubs from the special_build package. The stubs are the ones that have to be rebuilt according to your configuration. Use the ones you built and it should work.
panikbuttn#
doh, VC++ noobie here.

I thought the stubs could be the issue but I could not find them in the build/release.

Changing the build command to include a target gave me the stubs I was looking for.
scons dist-zip
NSIS_CONFIG_LOG=yes SKIPUTILS="NSIS Menu" NSIS_CONFIG_LOG_STDOUT=yes

Thanks
nankezhishi#
But the install.log does not generate

After recompile the NSIS by

scons NSIS_CONFIG_LOG=yes NSIS_CONFIG_LOG_STDOUT=yes

I made the install detail output to the STDOUT, but I find that the install.log cannot be find.

May I have both of them in silent install? Because my uninstall need the install.log.