|
|
#1 |
|
Junior Member
Join Date: Nov 2011
Posts: 4
|
psql problem
I am trying to execute this script:
'psql -U postgres -w -c "create database nuevantp"' in a NSIS installer, i tried a lot of options ExecWait , ExecCmd For example: ExecCmd::exec /NOUNLOAD /ASYNC /TEST /TIMEOUT=10000 'psql -U postgres -w -c "create database nuevantp"' or ExecWait 'psql -U postgres -w -c "create database nuevantp"' The problem is that random times the script is not executed and the database is not created. Thanks in advance for your help!!! Sergio |
|
|
|
|
|
#2 |
|
Major Dude
|
I assume this problem is related to psql, not to the NSIS.
Try to create .bat file with your command and execute it. See results in cmd window for more info. Cool looking installers with custom design: www.graphical-installer.com Create Setup Pages easily: www.install-designer.com Build installers in Visual Studio 2005-2022: www.visual-installer.com or RAD Studio 2009 - 11 Alexandria: www.rad-installer.com |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Nov 2011
Posts: 4
|
help
When I execute the bat file, it always return ok
I was 3 weeks with this problem and i am crazy now Help pleaseeeeeeee |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Nov 2011
Posts: 4
|
I have right now .bat 100 % operative , what is the best option to execute each bat file?
|
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Nov 2011
Posts: 4
|
Help!!!
I tried a lot of ways to execute the .bat file in the NSIS installer and i cannot, the .bat file is called "create.bat" and it has the command "psql -U postgres -w -c "create database nuevantp"" If i execute it separatly it works fine, but NSIS doesn't execute it
Help!!! Thanks in advance |
|
|
|
|
|
#6 |
|
Major Dude
|
Extract your bat file into $TEMP and execute it using ExecWait:
SetOutPath "$TEMP" File "create.bat" ExecWait '"$TEMP\create.bat"' There are also many other options like: nsExec::ExecToLog and so on... Cool looking installers with custom design: www.graphical-installer.com Create Setup Pages easily: www.install-designer.com Build installers in Visual Studio 2005-2022: www.visual-installer.com or RAD Studio 2009 - 11 Alexandria: www.rad-installer.com |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|