Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Upgrading product between specific versions


3 replies to this topic

nobledeveloper

nobledeveloper
  • Full Members
  • 5 posts

Posted 17 June 2009 - 01:46

Hi,
I am very new to the Installer world, but have done quite a bit of reading before I decided to post on this forum. Please pardon me if my problem looks lame.


The Problem:
I am required to create an installer (4.0) that upgrades only versions "2.x" and 3.x. If the version "1.x" is installed, I need to display a message stating that the installer is not meant for upgrading "1.x"

My Expected Solution:
As mentioned in the documents that I read, I changed the product code, package code and the version to 4.0 and left the upgrade code same as the older versions. Under Media->Upgrades->Upgrade Windows Installer Setup, added a Major Upgrade Item and selected the "within the specific range of versions" and entered "2.0 to 3.0"

Result:
I expected the installer not to install 4.0 when I had installed the version 1.0 om my system but, the installer went ahead and installed 4.0

I would highly appreciate it if anybody could help me in suggesting a solution to my problem.


PS:Also, any suggestions on a reference book for using Installshield? The only book on Amazon specific to Installshield has very low ratings sad.gif

VBScab

VBScab
  • Full Members
  • 436 posts

Posted 17 June 2009 - 09:08

Check out MSDN for details on AppSearch and LaunchConditions actions and related tables. Without doubt, InstallShield offers a UI to these options, it's simply that I can't remember them!

Rather than reading about how to use IS (or Wise, for that matter - they're just interfaces to the MSI's database tables, after all), you would be better off learning about the underlying technology first. Seek out Phil Wilson's Definitive Guide to Windows Installer and then John McFadyen's blog. You can then spend time wandering this forum, AppDeploy and, to a lesser extent, PackageDeploy

Edited by VBScab, 17 June 2009 - 09:11.

- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 18 June 2009 - 18:03

What your Upgrade entry does is automatically uninstall version 2 or 3 while installing version 4 - good.
But you have no action specified if version 1 exists. Therefore version 4 will simply be installed side by side to version 1.
How to solve:
Add another Upgrade entry for version 1. n advanced settings select "detect only".
Create a custom action of type 19 - display error message and abort.
Insert this custom action in the InstallUI and InstallExecute sequences after FindRelatedProducts (which is the action that processes the Upgrade table). As a condition use the property you specified in the new Upgrade entry.

If you (or your tool) haven't done so already, you should repeat the steps above to detect any version > 4. This will prevent your setup to downgrade version 5.

nobledeveloper

nobledeveloper
  • Full Members
  • 5 posts

Posted 25 June 2009 - 01:55

Thanks a ton Stefan. Your suggestions are percise and perfect .... it worked like a charm.