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

Re: Best practices SQL change scripts?

If old products has 1.2, 1.3, 1.4 and you're installing 1.5
You cannot have several product code values in OLDPRODUCTS property unless you're using "Allow side by side installs of different product versions". This property is set only in an upgrading package and the option results in having several previous versions already installed at upgrade time.

By using "Automatically upgrade older product versions" option, you'll always have only one version version of your product installed on any target machine at any given time. This means OLDPRODUCTS will include only a single product code.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
frjames
Posts: 27
Joined: Wed Apr 18, 2012 8:40 pm

Re: Best practices SQL change scripts?

You cannot have several product code values in OLDPRODUCTS property unless you're using "Allow side by side installs of different product versions".
Got it. This was the info I was missing.
frjames
Posts: 27
Joined: Wed Apr 18, 2012 8:40 pm

Re: Best practices SQL change scripts?

I am going to start with your second approach:
http://www.advancedinstaller.com/forums ... 916#p52224

Can I get exact steps to implement for release version 1.0.1 with old version 1.0.0?
First, I don't know how to condition the install script 1.0.1 with NOT OLDPRODUCTS
Second, I don't know how to create a property with the product versions - is this the upgrade guid or product guid? And how/where to create these properties
Third, how to condition the 1.0.0 script to only run if equals OLDPRODUCTS

I will reread your help files but I need specific step support on this please. Thanks!
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Best practices SQL change scripts?

Hello,
First, I don't know how to condition the install script 1.0.1 with NOT OLDPRODUCTS
This can be done from the SQL Scripts Page from Script Condition field. The Configuring Databases with SQL Scripts tutorial has the related basics.
Second, I don't know how to create a property with the product versions - is this the upgrade guid or product guid? And how/where to create these properties
You should read this post to get this working. Properties can be defined from the Install Parameters page.
Third, how to condition the 1.0.0 script to only run if equals OLDPRODUCTS
Here's Edit Condition Dialog article to help you with the operators.
The following condition is TRUE if version 1.0.0 is installed on the target machine:

Code: Select all

OLDPRODUCTS >< VER_1_0_0_PRODUCT_CODE
Where VER_1_0_0_PRODUCT_CODE property stores the corresponding product code.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
PeterM
Posts: 19
Joined: Fri Mar 29, 2013 9:28 pm

Re: Best practices SQL change scripts?

Unless you've explicitly enabled "Allow side by side installs", then during an upgrade OLDPRODUCTS contains one and only one product code, that of the version that is currently installed on the machine. So if you have 1.2 installed and are running the 1.5 installer, you will see the 1.2 product code GUID in the OLDPRODUCTS property.
narsingani
Posts: 23
Joined: Thu Sep 12, 2013 4:59 am

Re: Best practices SQL change scripts?

Mihai,

I am having a similar issue and not sue how to configure an upgrade from the old version to the new version. I have read through the above thread but could not work it out. I am trying to add a property for 'OLDPRODUCTS' under Install parameters 'Properties' section but it does not allow me. During the application installation the setup checks SQL connection and creadentials. I already have completed this. But meanwhile it also requires to check the existing database version and if it is older than the current version then the database will be upgraded automatically once the user confirms it. I am not sure how to action on this. Much appreciate any assistance from you.

Thanks,
Upendra
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Best practices SQL change scripts?

Hello Upendra,

I've sent you a reply by e-mail to your question. If you want to continue this conversation on our forums please open a new thread and give us a detailed information about the behavior you want to achieve. Maybe you can iterate the desired behavior using a step by step description.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”