Archive: "pg_dump" command is not executing.


"pg_dump" command is not executing.
Hello,
I am trying to cerate dump of my database. When i execute the command line "pg_dump -U admin MyDB > c:\dumps\MyDB.dmp" in the console, it works fine. When i execute a part of it
"pg_dump -U admin MyDB" in the NSIS installer it creates the dump but i have no idea where and if it store it. And when i execute the whole line, "pg_dump -U admin MyDB > c:\dumps\MyDB.dmp", in the installer, no error message is shown, the console appears for a second and that's it. It doesn't build the .dump file.
I searched the net for similar problems, but didn't find anything. Thanks for any help.


I found it.
I will post the solution if someone else has the same problem.
Just replace the ">" with "-f", which sends the output to specific file. So the correct command line is:
"pg_dump MyDB -f c:\dumps\MyDB.dmp"


ExecDos has log/stdout file option. Both nsExec (included to distribution) and ExecDos hide console window.