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

Upgrade


11 replies to this topic

cherukus

cherukus
  • Members
  • 68 posts

Posted 21 January 2005 - 18:19

My version numbers looks like this : 1.0.0.1
and we do change it to 1.0.0.2 for the next release and upgrade doesn't work.

I do know that MSI just looks for first 3 digits, but the user's wants to stick their own version format.

My question is, Is there a way to handle this ?

Appreciate any suggestions on this.

Thanks.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 22 January 2005 - 12:20

How does your update fail? What type of update are you trying to build (Minor or Major)? Did you change the ProductCode? Did you change the PackageCode? I assume you are talking about the ProductVersion, not the version number of an application file.

cherukus

cherukus
  • Members
  • 68 posts

Posted 22 January 2005 - 16:47

Stefan,
I am trying to do Major Upgrade and I do change the Package Code, Product Code and Product Version.

Initially the Application file version will be 1.0.0.1 and for the next release we are changing it to 1.0.0.2 and the user's want the Product Version to be same as Application file version.

But as per MSI, I think it only looks for first 3 digits in the Product Version. But for us, only the fourth digit is getting changed and the installer is not treating it as an Upgrade.

The upgrade works fine, if 3rd digit in Product Version seems to have changed.

Thanks for your quick reply Stefan.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 24 January 2005 - 10:51

That's strange. A Major Upgrade should work even if you don't increase the ProductVersion (and from Windows Installer's point of view you are not changing the ProductVersion). I suspect there's a problem with your entries in the Upgrade table. Can you post your Upgrade settings here (ideally together with the content from the Upgrade table in Direct Editor)?
Note that with your numbering concept you will not be able to prevent a downgrade, that is: 1.0.0.1 will happily install over 1.0.0.2.

cherukus

cherukus
  • Members
  • 68 posts

Posted 24 January 2005 - 19:53

Stefan,
I am sorry, if I wasn't able to explain clearly.

I do change the ProductVersion in reference to the Application file version. These are the things I change for every release Product Code, Package Code and Product Version.



cherukus

cherukus
  • Members
  • 68 posts

Posted 24 January 2005 - 20:01

Stefan,
I did attach a jpeg file, but it's not showing up...so doing a copy and paste.

Here are the contents of my Upgrade table.

UpgradeCode - (s38)
{37AAC8BC-16F9-41CA-BEE0-766BDEB66AC3}


VersionMax - (S20)
1.0.0.2

Attributes - (i4)
0

ActionProperty - (s72)
OLDPRODUCTS

Appreciate all your help.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 25 January 2005 - 15:51

That's the problem. Since Windows Installer ignores the fourth field of thE ProductVersion, your version entry is essentially 1.0.0 which means: upgrade versions that are lower than 1.0.0. Set the attribute to 512 (VersionMax Inclusive). Then it will upgrade versions that are lower than OR EQUAL 1.0.0.

cherukus

cherukus
  • Members
  • 68 posts

Posted 25 January 2005 - 18:05

As the 4th field is always ignored, is it like the ProductVersion is never changed ?

If the ProductVersion is not changed, will Major Upgrade works ?

Also, will it be adding 2 icons in the Add/Remove programs if I upgrade from 1.0.0.2 to 1.0.0.3 ?

As suggested I will change the Attribute value from 0 to 512.

Stefan, please suggest me if you have any ideas on handling this scenario.

Thanks...




cherukus

cherukus
  • Members
  • 68 posts

Posted 26 January 2005 - 04:42

What's the difference between having an Attribute value of 256 to 512 ?

Also, does that mean if we install 1.0.0.3 over 1.0.20.2 will it perform an upgrade ? If the Attribute value to set to 512 ?

Edited by cherukus, 26 January 2005 - 04:48.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 26 January 2005 - 09:47

QUOTE
As the 4th field is always ignored, is it like the ProductVersion is never changed ?
Yes, from Windows Installer's point of view your ProductVersions are the same.
QUOTE
If the ProductVersion is not changed, will Major Upgrade works ?
Yes. Changing the version number is recommended to prevent downgrades, but the Major Upgrdae mechanism will work without.
QUOTE
Also, will it be adding 2 icons in the Add/Remove programs if I upgrade from 1.0.0.2 to 1.0.0.3 ?
That depends on how you populate the Upgrade table. If you make VersionMax inclusive, it will remove the other package, that is: 1.0.0.3 will remove 1.0.0.2 so you'll get only one entry in Add/Remove Programs. But since Windows Installer can't tell which of the two versions is higher, running the 1.0.0.2 install on top of 1.0.0.3 will also remove 1.0.0.3 abd replace it with 1.0.0.2. That's why increasing the version number (in any of the first three fields) is recommended to prevent such downgrades. You will need another Upgrade entry and a custom action to display an error message to prevent the downgrade.
If you don't make VersionMax includsive, your upgrade entry will not match the existing version, so it will not be removed and you end up with two entries in Add/Remove Programs.
QUOTE
What's the difference between having an Attribute value of 256 to 512 ?
256 makes VersionMin includsive, 512 makes VersionMax inclusive.
QUOTE
Also, does that mean if we install 1.0.0.3 over 1.0.20.2 will it perform an upgrade ? If the Attribute value to set to 512 ?

1.0.20 is higher than 1.0.0. So 1.0.20 will perform an upgrade if installed on top of 1.0.0.

cherukus

cherukus
  • Members
  • 68 posts

Posted 27 January 2005 - 00:19

Stefan,
Thank you very much for your valuable inputs. Really appreciate your time.

I have one more question for you :
Can I take the 3rd & 4th digits from the ProductVersion and append them and store it in a Public property and use that Public property in the upgrade table for MaxVersion.
By doing this, will the Installer be treating as ProductVersion being updated ? (or) necessarily ProductVersion and the value in Maxversion field in the upgrade table need to match.

Do I need to write a Custom Action ? If so, at what stage I need to invoke it ?

Thanks !!!

Edited by cherukus, 27 January 2005 - 03:33.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 27 January 2005 - 11:48

The version columns in the Upgrade table don't accept properties.
Windows Installer uses only the first three fields of the product version. If you include a fourth field in your product version, the installer ignores the fourth field.