I have a Windows .NET standalone app. and I want to include PostgreSQL database setup with my application's Setup. Is it possible?
2 Answers
Actually for PostgreSQL you don't really need to run the installer, you can simply unzip all the files. The installer would then use initdb to initialize the data directory and from within your application you can then use pg_ctl to start and stop the server when your application starts without registering it as a service.
Comments
Depending on what you use for setup you could probably embed the installer and then execute it before/after your application's installation.
However, don't forget to make it optional. For example, I have both MySQL and PostgreSQL servers running in my local network so I would never install any of them on my local windows machine but rather make applications requiring a database server connect to the existing one. In such a case a forced installation would be annoying.