>>and use the .bat's name as the command to run? You can delete the .bat after use (so you wouldn't have a text file containing the password hanging around your disk).
>>
>>I'm using this technique (generate a batch, run it, delete it) regularly and it seems much easier than trying to do everything in one line.
>
>Dragan,
>
>thank you. This is bright idea.
>
>pg_dump is a 32 bit windows console application.
>I tried using RUN command to run this bat file but got an error for pg_dump.exe file
>
>Program too big to fit in memory
>
>The console window remains in screen after this and contains readable password in SET= statement.
I meant run the batch with the Api_apprun with the last parameter set to "HID" when running it. Also, if it can't find the pg_dump.exe, you can generate the batch with a full path to it, or have a PATH= statement in it - which you may restore afterwards:
set pgpassword=whatever
set cPath=%path%
path "C:\Program Files\PostgreSQL\8.0\bin";%path%
"C:\Program Files\PostgreSQL\8.0\bin\pg_dump.exe" -Z9 -b -v -f "c:\my document\myfile.backup" -F c -h myserver -U postgres mydb
set pgpassword=
path %cPath%
exit