Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

Prevent an Older Version from Installation

Updated: 17 Oct 2008 | 3 comments
Santro's picture
+1 1 Vote
Login to vote

Prevent older version installation over newer version. As MSI Technology doesn't support this kind of check, we can provide it by doing a few steps in our packages to prevent installing an older version on top of a newer version.

Use the upgrade table "Action Property" to find a newer version installed.

In the Upgrade table add a row with:

  • UpgradeCode - UpgradeCode value of the package.
  • VersionMin - min version of your package.
  • Attributes 258.
    Where
    • 2 - Detect products and applications but do not install and
    • 256 - The range of versions detected includes the value in VersionMin
  • ActionProperty - NEW_VERSION_INSTALLED (user defined property name).

Use of Custom Action type 19 to terminate installation based on the "Action
Property".

Custom Action type 19 displays an error message, returns a failure and terminates the installation.

Add a new Custom Action type 19 - Terminate installation called CA_NEW_VERSION_INSTALLED to the InstallExecuteSequence under Immediate Execution mode. Add your comments for the Termination message as the Custom Action Target value;

Set this custom action to have a condition of DB_NEWERVERSION AND NOT Installed.

Comments

avherur's picture
17
Dec
2008
1 Vote +1
Login to vote

More information

Nice article,

I want to add some more information to this article.

Attribute 2 implies : Detects Products & applications but does not remove.

I will also suggest that keep Custom action 19 after FindRelatedProducts action in the Execute Sequence.

This procedure relies on the "FindRelatedProducts" action, which only runs during a first time installation & does not run in maintenance mode i.e reinstallation. Because minor upgrade are performed using reinstallation, this procedure cannot be used to determine whether a minor upgrade package is attempting to downgrade an application.

Anand V Herur

AVHerur

Darren Collins's picture
11
May
2010
0 Votes 0
Login to vote

Cheers Santro and Anand !

Did the job for me.  Definitely better to place action just after FindRelatedProducts as this aborts much earlier in the sequence if it needs to.

One other thing to add:

When adding the row in the Upgrade table as per the article, ensure that VersionMin is equal to the version of msi that you are editing and not the earliest version that you have authored or your msi will not upgrade older versions either.

I have tested this with 3 versions of an msi, and you can still have the standard upgrade line in the upgrade table for upgrading older versions, alongside the row described in this article to ensure that your msi will upgrade older versions, but not install alongside newer ones.

Thanks again,
Regards,
Darren.

Darren Collins
Applications Packaging and Deployment for the ICT Support Team,
Oxford University, UK.

Darren Collins's picture
11
May
2010
0 Votes 0
Login to vote

P.S. ....

... this technique was not reliable for me testing with per-user installations, that is it only worked reliably if ALLUSERS=1

Regards,
Darren.

Darren Collins
Applications Packaging and Deployment for the ICT Support Team,
Oxford University, UK.