thanks
Nick
here is the current code block:
FileOpen $1 "createopenfiredb.bat" "w"
FileWrite $1 "@ECHO OFF$\r$\n"
FileWrite $1 "set PGPASSWORD=$password$\r$\n"
FileWrite $1 '"$PROGRAMFILES\PostgreSQL\8.4\bin\createdb.exe" -U postgres -h localhost --encoding=UNICODE openfire 2> "createopenfiredb_error.txt"$\r$\n'
FileWrite $1 '"$PROGRAMFILES\PostgreSQL\8.4\bin\psql.exe" -U postgres -h localhost -d openfire -f "openfire_postgresql.sql"$\r$\n'
FileWrite $1 '"$PROGRAMFILES\PostgreSQL\8.4\bin\psql.exe" -U postgres -h localhost -d openfire -f "openfire_update2.sql"$\r$\n'
#FileWrite $1 "PAUSE$\r$\n"
FileWrite $1 "exit %ERRORLEVEL%$\r$\n"
FileClose $1
DetailPrint "Creating openfire database."
ExecWait "createopenfiredb.bat" ; don't forget the .bat extension...
IfErrors +1 +3
Push "Creation of openfire database failed, please contact face2name with this error."
Call ErrorHandler
DetailPrint "Openfire database created."