Check SQL Server version - Advanced Installer Community
edin
Posts: 1
Joined: Wed Oct 14, 2015 11:35 am

Check SQL Server version

Hi,

I need to implement following during setup:

- Check windows version (e.g. Windows >= 7)
- Create two SQL Server connections and validate version (e.g. SQL Server > 2005)
- Prompt user to select backup locations and verify backup against SQL server and backup date

I would like to know if this is possible using installer.

Thanks,
Edin
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Check SQL Server version

Hi Edin and welcome to Advanced Installer forums,
- Check windows version (e.g. Windows >= 7)
For this, you can take advantage of the VersionNT property. For details, please take a look on the How do I install resources based on the Operating System version? article.
- Create two SQL Server connections and validate version (e.g. SQL Server > 2005)
In the SQL Databases Page you can create your SQL Server connections.

In order to prevent the connection on machine where the SQL Server version is lower than 2005, you can use the following statement in the condition field from the Custom SQL Connection:

Code: Select all

AI_DETECTED_SQLEXPRESS_VERSION >= "2005"
During installation, the AI_DETECTED_SQLEXPRESS_VERSION property will be automatically set. However, this option will be available with the 12.5 version of Advanced Installer which will be released at the beginning of the next week. In order to set this property using the 12.4.2 version of Advanced Installer, please use the following statement as a launch condition in the Custom Launch Conditions Tab page:

Code: Select all

(AI_DETECTED_SQLEXPRESS_VERSION >= "2005") or 1
As you may note, the launch condition will never be fired as it is always true. This creation of the launch condition is necessary in order to fill the AI_DETECTED_SQLEXPRESS_VERSION property.
- Prompt user to select backup locations and verify backup against SQL server and backup date
For this, you can create a custom dialog in order to allow to user to select a backup location. For this, please take a look on the How to browse for a folder at install time? article.

Then in your script, you need to get the the value of the property that contains the selected location of the backup. For this, you can use a Script Replacements operation.

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jerrythomasnyk
Posts: 1
Joined: Fri Oct 16, 2015 9:49 am

Re: Check SQL Server version

To determine the version of the client tools that are installed on your system, start Management Studio, and then click About on the Help menu.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Check SQL Server version

Hello and welcome to Advanced Installer forums,
To determine the version of the client tools that are installed on your system, start Management Studio, and then click About on the Help menu.
Thank you for your help. However, I thing Edin needs to do this automatically within the installation package, and not manually.

If you have any questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vanya
Posts: 1
Joined: Fri Oct 23, 2015 9:01 am

Re: Check SQL Server version

I appreciate everything you have added to my knowledge base.Admiring the time and effort you put into your blog and detailed information you offer.
Anand Mishra

Return to “Common Problems”