Visual Studio Installer Projects with PostgreSQL

1

I'm starting a Windows Form C # project, a business application that the user downloads, installs, and uses without any complications. Is it possible to configure Visual Studio Installer Projects to install with PostgreSQL without the user realizing it is completely transparent?

    
asked by anonymous 10.08.2017 / 05:38

2 answers

2

You can group PostgreSQL binaries into your application, but do not incorporate them into the same process. You will need to invoke initdb, pg_ctl, etc. in your application and manage the startup and shutdown of postgres.

It works fine, but it can not be complicated.

Do not use the default port 5432 or send the official postgres installer and run it in silent mode. This confuses users a lot when they wonder where "postgres" came from and they have reported on the mailing lists on our "adware" or "stealth installation" or whatever. Instead, group the .zip binaries, the precompiled install tree, or whatever. And do not run on port 5432.

Remember to include the MSVC runtime for the postgres binaries you are using, if they need a different one for your application.

There are lots of advice on how to do this in more detail.

    
12.08.2017 / 00:32
2

Using PowerShell from VSI, it is possible to:

Simple installation:

Import-Module Install-Postgres
Install-Postgres -User "postgres" -Password "ChangeMe!"

With more parametrizations:

Install-Postgres  
-User "postgres"  
-Password "ChangeMe!"  
-InstallUrl "http://get.enterprisedb.com/postgresql/postgresql-9.3.5-1-windows-x64.exe"  
-InstallPath "C:\Program Files\PostgreSQL.3"  
-DataPath "C:\Program Files\PostgreSQL.3\data"  
-Locale "Romanian, Romania"  
-Port 5432  
-ServiceName "postgresql"

Source: link

    
10.08.2017 / 09:00