rbfen
Posts: 10
Joined: Fri Feb 04, 2011 4:55 pm

SQL Script Conditions - Software version

Is it possible to have a condition on a SQL script that will allow the script only to run on a certain previous version?

Example: My software is currently version 2.1.3

I want a certain SQL script only to run if someone is upgrading from software version 2.0.0

Is this possible and if so, how can it be done?

Thanks
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: SQL Script Conditions - Software version

Hello,

Here's the "Best practices SQL change scripts?" thread you can follow regarding this.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rbfen
Posts: 10
Joined: Fri Feb 04, 2011 4:55 pm

Re: SQL Script Conditions - Software version

Hi Mihai, thanks for the reply. I had found that particular post but could not get it working, perhaps I am doing something wrong though.

I have this, in my SQL Script condition:

OLDPRODUCTS >< VER_2_0_PRODUCT_CODE

When I run the installer version 2.1.3 on a system with 2.1.1, the SQL script is still running.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: SQL Script Conditions - Software version

Hello,

Maybe you have the wrong product code stored in VER_2_0_PRODUCT_CODE property. You can keep track of the properties values with MsgBox occurrences. Better yet from the verbose log of the installation.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rbfen
Posts: 10
Joined: Fri Feb 04, 2011 4:55 pm

Re: SQL Script Conditions - Software version

Thanks Mihai, that was it, got the correct code from the logs per your suggestion.

Return to “Building Installers”