PDA

View Full Version : Help Required on Determining a New or Upgrade Install



Neil Gascoigne
05-04-2006, 05:32 AM
Morning gang, I am in need some help!

Here's part of my deployment spec, which shows what I am trying to achieve. Whether this is feasible or easily done in IS is another matter!

http://www.bluerobin.flyer.co.uk/images/install.jpg

Our product does not just run a binary, it relies on connecting to the installed database server process. If we follow the new install stream, this will install binaries, runtime files, database file, database engine/server and perhaps run a small entitlement app, called though the custom actions area in IS.

Fair enough, reasonably straight forward to do.

So what about the upgrade? If the user gets second and subsequent installs to update, how can we detect that and so change the behaviour? Here in this stream we are again updating binaries but this time running a SQL app to also update their database.

Is there an elegant way? I'm none too hot by the way on InstallScript sadly :( By the way, the database is Sybase so I guess I cannot use the SQL Script area?

The heath robinson method would be for a new/upgrade screen.

Somehow though I have configured the project to say, when applying the install over an existing install, "an update has been detected, do you wish to proceed?" Obviously we don't want that because the user would have to agree twice to upgrade!

MichaelU
05-04-2006, 03:03 PM
If you just want to know if a version is already present on their machine, and you restrict yourself to minor and major upgrades, it's easy to detect. A minor upgrade will leave the Installed property true, which is extremely easy to check.

A major upgrade item will store the product code of the setup being upgraded in a property that you specify (defaults to ISACTIONPROP1, I think), which should be similarly easy to check, but requires you wait until after the existing products are detected.

In neither case will this detect a manual uninstall and reinstall cycle. If this is what you want, it's great; if you want those to be upgrades, you're back to detecting something specific to the environment you've set up, or asking the user.