Deploying Postgresql Along Windows Application

c#, deployment, postgresql, setup-deployment

Solution

The application's users are non-technical people and they can not install Postgresql individually.

then try this , silently install PostgreSQL, we are using the similar code in our software deployment

C:\Installer\postgresql-9.0.2-1-windows.exe  --serverport 5432 --servicename postgres_service --locale C --superaccount Myadmin --superpassword Mypassword --unattendedmodeui minimal --debuglevel 2 --mode unattended 

run this as the bat file , install in the background

- postgresql-9.0.2-1-windows.exe

This is your exe

- serverport 5432

This is your port number where you want to install Postgres

- superaccount Myadmin

You use account name

- superpassword Mypassword

Your user password

keep the rest same. This will directly install to `c:\Program Files`

Problem

I have WPF application which using Postgresql as Database engine. I want to install Postgresql engine and restore/attach application-Db to it. The application's users are non-technical people and they can not install Postgresql individually.

Original source