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

Release a standalone and Upgrading Release... HOW???


4 replies to this topic

Ben Woodcock

Ben Woodcock
  • Members
  • 6 posts

Posted 07 January 2002 - 04:18

Hey All.
It seems I am not the only person out on the net that is having trouble with setting up a release that will detect if there is an older version of their product already installed and if there is uninstall it then continue to do a normal install.

I was hoping that there was someone out there that actually knew the basic steps to achieve something like this (hopefully through InstallShield Developer 7 though any other way would be fine). I have been in contact with InstallShield support for 3 weeks now and they can't seem to even comprehend what I am trying to do and keep telling me that I should release a patch.

Admittedly I am new to the Installation game. I started using installshield 3 months ago and seem to be able to make it do what ever I want except this upgrade.

So to define the problem.

There are 3 possible scenarios.
1 - My product has never been installed on the machine, or has been installed but has been uninstalled

If this is the case then the install should run and install the program.

2 - A previous version of my product is installed

if this is the case then the install should uninstall the existing version (remove files as they all change, remove the listing from the add remove programs dialogue. Essentially do a normal uninstall without user interaction). Then do the install as per scenario 1.

3 - Same version is installed.
This I don't care what it does. It would be nice if it just ran the maintanace option but if it unistalls, reinstalls, I don't care.


So if there is anyone out there that can do this I really need detailed help. I have already read about putting OLDPRODUCTS and REMOVEALL and what ever else in as far as I can tell random locations in random tables (read many posts all contradicting each other) tried all of them and the closet I have come is updating the files but ending up with 2 entries in the Add remove programs Dialogue.

Please Help, I am running out of hair to pull.

Ben Woodcock
ben@datatrack.com.au


Leigh Ravenhall

Leigh Ravenhall
  • Members
  • 269 posts

Posted 07 January 2002 - 04:41

I'll try giving you a list of the random codes I stick in random tables.  Last time I checked my installer was working successfully.

In the upgrade table, I have two lines.  One line detects the existence of an older version, then upgrades over it.  It is as follows:
UpgradeCode:  UpgradeCode from product properties
VersionMin: 0.0.0
VersionMax:  Previous version number
Language:  Blank
Attributes:  773
Remove:  Blank
ActionProperty:  UPGRADEVERSIONS

The other line in the upgrade table detects a newer version and throws an error message.
UpgradeCode:  UpgradeCode from product properties
VersionMin:  Current version number
VersionMax:  Blank
Language:  Blank
Attributes:  2
Remove:  Blank
ActionProperty:  NEWERVERSIONS

Both NEWERVERSIONS and UPGRADEVERSIONS are in the property table, with blank values.

I also have an additional entry in the error table containing the error message when a newer version is installed:
Error:  20000
Message:  You are trying to install an older version of the software.  You must uninstall your current version of the client before attempting to run this version.

I have a custom action to display my error message and halt the installation if a newer version is installed.  It is a type 19 action, Source is blank, Target is 20000.  It is inserted into the UI sequence, immediately following FindRelatedProducts.  The condition in the sequence is NEWERVERSIONS.

In the execute sequence, I have the RemoveExistingProducts action at the very end of the sequence, after InstallFinalize.

When I need to do a release for a new version, I enter the new version number, generate a new ProductCode, a new PackageCode, then hit compile.

It seems to work.  Any problems, let me know.

(Using ISWI 2.03)

(Edited by Leigh Ravenhall at 1:43 pm on Jan. 7, 2002)


Ben Woodcock

Ben Woodcock
  • Members
  • 6 posts

Posted 07 January 2002 - 06:07

Finally someone has given me the information I needed. No one has told me where the action property came from. It seems that you can put any value in that column as long as you define it in the Property table.

Thankyou Leigh Ravenhall, you have saved a lowly programmer's job.


ET123

ET123
  • Members
  • 16 posts

Posted 07 January 2002 - 17:20

I have a question for you. My first release goes out and its called Test.msi. I have another msi called test_update.msi i put the info listed above in this msi   (upgrade info), do i need to put anything in the upgrade table of the first test.msi that i released?

Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 07 January 2002 - 17:35

There is no need to put anything in the first release.  The later release locates the first release using the Upgrade Code which would normally be the same for all versions of a product.