Suppress Windows command output when using 'ExecWait' in NSIS
Asked Answered
R

2

13

I am trying to suppress the output window which pops up after executing a psql command in NSIS

ExecWait 'psql -U postgres -f "Path\To\File.sql" postgres'

I tried '>nul' after looking at this link. But that doesn't work.

Ranaerancagua answered 5/6, 2013 at 12:54 Comment(1)
'psql -q' hides the output but doesn't suppress the errors.Ranaerancagua
C
18

To avoid the black DOS box, you can use nsExec::Exec instead of Execwait.

Cleanser answered 5/6, 2013 at 13:24 Comment(0)
J
0

Using vanilla NSIS, you can also use ExecShellWait with SW_HIDE like so:

ExecShellWait "" "$INSTDIR\myservice.exe" "install" SW_HIDE

...although nsExec is clearly the way to go if you want to capture output.

Jewett answered 19/8, 2022 at 14:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.