Silent installation of Postgres and creation of the installer base

Asked

Viewed 747 times

4

How I can embed the Postgresql database in my Winforms system installer?

I can even put it as a prerequisite to install before system binaries, however I wanted to do a silent installation. I would also like to know how to create the bank of my application during the installation.

  • How is your system installed? How you created this installer, which tool you used, etc.?

  • I have the binary files from my system, I have the postgresql installer on version 9.5, first I tried using the program Advanced Installer available at http://www.advancedinstaller.com/ . In it I was able to add prerequisites to the installation of my software, then I asked him to install Postgre before installing the system, otherwise the installation could not continue, until well, the problem of installing the system bank was solved, however it is still the challenge to create the database, and make the whole installation of the postgre exe be in hidden mode

1 answer

7


If you call the postgresql executable passing as parameter --help will open the information:

inserir a descrição da imagem aqui

You must enter the password, the installation path, this you can set through the parameters.

So you can call it that:

msiexec /i postgresql[versão].msi  /qr INTERNALLAUNCH=1 ADDLOCAL=server,psql,docs SERVICEDOMAIN="%COMPUTERNAME%"
        SERVICEPASSWORD="SecretWindowsPassword123" SUPERPASSWORD="VerySecret" BASEDIR="c:\postgres" TRANSFORMS=:lang_de

NOTE: I never used the Advanced Installer, but I’ve used the NSIS Compiler, and currently use the Inno Setup Compiler, I know you can do this without problems..

Reference: link

I hope I’ve helped!

  • And to run the bank script is also possible friend?

  • Yes, just go to the installation path /bin/psql.exe, and pass the --help parameter will also list the available parameters, but basically you should do this: psql.exe –U [usuario] -w –d [nome do banco] –f [path script]

Browser other questions tagged

You are not signed in. Login or sign up in order to post.