11

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.

Community
  • 1
  • 1
Lyman Zerga
  • 1,415
  • 3
  • 19
  • 40

2 Answers2

17

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

Francisco R
  • 4,032
  • 1
  • 22
  • 37
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.

bk138
  • 3,033
  • 1
  • 34
  • 28