I'm new at Advanced installer and so I hope to get here some clues to develop my first a little more complex setup.
The Situation:
I want to deploy a .NET Application (including a Windows-Service), using a PostgreSQL Database. This Application is for non technical educated users. They are dealing with a huge amount of Data, on a Stand alone System and dind't know anything about the problems of processind many datasets. They don't know anything about Databases and in most cases don't want to. So the Setup has to be as simple as possible, like the Program.
I builded a Offline-Setup including the -NET Framework, the PostgreSQL-Server and some ODBC Drivers. I install each of this Components as Prerequirement if they where not found at the customers system.
While Installing the PostgreSQL Database I set a default master password.
At the end of the Setup I connect to the Database-Server as superuser, create a database-user and a Database owned by the new user.
All this works fine on a naked System. All components become installed, the user and database are created successfully and the service starts work without any problems.
The Problems:
- In general the Client System hasn't a PostgreSQL Server installed but of cause I can't avoid the posibility that it has.
So in that case the setup will detect the Server and won't install it by itself (thats fine) but it still has to create the user and Database. It will fail to connect to the Database, because the Masteruser Password is incorrect.
So my idea is to show the user in this situation (and only in this situation) a Dialog asking for the superuser Password to proceed with the entered password. To do this I have to try to connect to the database server with the supposed password. If a error occurs (can't connect) I have to be notice this (without showing an errormessage to the user) and show the dialog.
Is this possible within the Advanced Installer (Enterprice)? - The second case is, that the current setup run is some kind of update. So my Masterpassword fits and my user and database are already existing at the database server.
In this case I must recognice it to don't try to create my Database again (I can build some sort of CREATE USER IF NOT EXIST statement but not a CREATE DATABASE IF NOT EXISTS because PostgreSQL becomes a little eccentric in this situation).
So my idea is to run some sort of "Check if exists query", sore the result an a Advanced-Variable and run the "CREATE DATABASE query" only if the result tells me the database won't exist on the server.
And again I have to ask, is this possible within the Advanced Installer (Enterprice)?
cloudius
FOLLOW US
Get the latest news in Application Packaging