2

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 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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.

3 Comments

Without knowing what you use to create your setup: No.
I use the built-in installed that comes with Visual Studio 2008.
Sounds like ClickOnce. I don't think you can execute installers with it. But you can include the exe as a data file and then execute it from your application if necessary. The nice thing is that you don't even have to include it in the main download but that you can trigger the download in your code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.