Parimal Patel
Posts: 25
Joined: Wed Jun 01, 2016 3:16 am

Creating Website and SQL future

Hi

I am new into Advanced installer world.

I have created installer which is doing Website and Database deployment. Now i want to separate it, means would like to prompt during installation or give selection option to user which futures they would like to install. User can select both (Website and SQL Database) futures or either one of them. If one future already install in past still user should have option to run installer and add remaining futures.

Please guide me how i can separate my existing installer.
I am doing SQL deployment using SQL Databases menu.

Thanks,
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Creating Website and SQL future

Hi and welcome to Advanced Installer forums.

Thank you for your interest in Advanced Installer.

In order to achieve what you want you can follow the steps below:
- go in the "Organization" page and create the features you want by using the "New Feature" option
- add each component in the feature you want it to be a part of
- go in the "Dialogs" page and add the "SetupTypeDlg" dialog or the "ConfigureDlg" dialog (the last one requires an EXE package, not MSI)
- in the "SQL Databases" page and "IIS" page use the "Condition" field available for each entry to create a dependency between that entry and a specific feature (i.e. ((&MainFeature = 3) AND NOT (!MainFeature = 3)) ). You can use the [...] button for a list of predefined conditions that you can use.
- build and test the project

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Parimal Patel
Posts: 25
Joined: Wed Jun 01, 2016 3:16 am

Re: Creating Website and SQL future

Thanks for reply

I have completed up to step 3. But i am not finding any condition option for SQL Databases and IIS.
Find attachment screenshot.

When user NOT select Database option than SQLServerConnectionDlg and Scripts shouldn't be executed or shown for user prompt.
CustomInstall_1.PNG
CustomInstall_1.PNG (21.75 KiB) Viewed 10096 times
CustomInstall_2.PNG
CustomInstall_2.PNG (74.23 KiB) Viewed 10096 times
CustomInstall_3.PNG
CustomInstall_3.PNG (84.3 KiB) Viewed 10096 times
Regards,
Parimal Patel
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Creating Website and SQL future

Hi Parimal,

In order to display the "SQLServerConnectionDlg" dialog only when the "Database" feature is checked you can follow the steps below:
- select the "Next" button of the "CustomizeDlg" dialog
- in the "Published Events" tab, double-click the "Display a specific dialog" event that already exists there
- click on the [...] button from the right of the "Condition" field
- in the dialog that appears, double-click on the "Feature will be installed local. Feature will not be uninstalled" predefined condition
- select the "Database" feature to be used as a condition and copy that condition
- click [OK} to return to the "Published Events" tab and add a new "Display a specific dialog" event
- choose the "VerifyReadyDlg" as an argument and use the condition that you copied, but negated (i.e. NOT ( condition ) )
- select the "Back" button of the "VerifyReadyDlg" dialog, go to the "Published Events" tab and use the copied condition for the "Display a specific dialog -> SQLServerConnectionDlg" event

To execute the SQL scripts only when the "Database" feature is checked you can go in the "SQL Databases" page and use the copied condition for all the connections defined there.

Just let me know if you need more information.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Parimal Patel
Posts: 25
Joined: Wed Jun 01, 2016 3:16 am

Re: Creating Website and SQL future

How i can control showing SetupTypeDlg for normal install? Means anyway i can hide certain dialog under running under certain account or user rights?
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Creating Website and SQL future

Hi Parimal,

Do you want to show that dialog depending on the user rights (e.g. administrator or standard user)? If so, you can add the "InstallTypeDlg" predefined dialog before it and display the "SetupTypeDlg" dialog based on the option the user chooses on the "InstallTypeDlg" dialog. In this case you can right-click on the "SetupTypeDlg" dialog and use the "Show only if..." option for simplicity.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Parimal Patel
Posts: 25
Joined: Wed Jun 01, 2016 3:16 am

Re: Creating Website and SQL future

I will try and let you know. But how can I enforce or apply SQL password policy to SQL Dialogue.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Creating Website and SQL future

Hi,

Do you want the username and password information to always be requested? To achieve this you can select their related fields go in the "Control Conditions" tab and remove the conditions related to them. Also, remove the "Trusted connection" checkbox. Then, select the "Next" button and use the properties related to the username and password fields as conditions to enable and disable that button as in the attached image.

Best regards,
Eusebiu
Attachments
SQLServerConnectionDlg.png
SQLServerConnectionDlg.png (92.73 KiB) Viewed 9891 times
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Parimal Patel
Posts: 25
Joined: Wed Jun 01, 2016 3:16 am

Re: Creating Website and SQL future

That's i already sorted out last week but i want to enforce SQL password policy e.g. password should be 8 to 16 characters long with capital and number.
If we cannot apply SQL password policy than can we apply regex to do that job. if yes than can you send me example regex for 8 characters long password validation.
Parimal Patel
Posts: 25
Joined: Wed Jun 01, 2016 3:16 am

Re: Creating Website and SQL future

Also how i can change web.config file's SQL connection string based on SQL connection dialog selection. Means Trusted Connection (windows authentication) and SQL Server instance connection string

Trusted Connection
Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;

Connection to a SQL Server instance
Server=myServerName\myInstanceName;Database=myDataBase;User Id=myUsername;
Password=myPassword;

I have imported xml (web.config) file into project. is there any way i can do if condition to verify type of connection selected into SQLConnection Dialog.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Creating Website and SQL future

Hi Parimal,
That's i already sorted out last week but i want to enforce SQL password policy e.g. password should be 8 to 16 characters long with capital and number.
If we cannot apply SQL password policy than can we apply regex to do that job. if yes than can you send me example regex for 8 characters long password validation.
I'm afraid that we do not have predefined support for this, however you can create a simple custom action that checks the "PASSWORD_PROP" property on the "Next" button and displays an error message if the password constraints are not respected.
Also how i can change web.config file's SQL connection string based on SQL connection dialog selection.
The SQL connection strings are usually stored in the "SqlConnectionString" property. So, you can simply use that property in your imported XML file and the file will be updated with the value from that property during the installation.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Feature Requests”