This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Format for product version
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 11, 2011
04:31 PM
Format for product version
Is there a best practice for the format used with product version?
Specifically, padding with zero's. For example: "4.06.0007" vs. "4.6.7"
When creating a new project in InstallShield, the default value for product version is "1.00.0000".
I find the extra zero's to hurt readability (think of elevated support call with user reading back version number...). Perhaps the zero's make it easier to compare versions when treating as strings.
Specifically, padding with zero's. For example: "4.06.0007" vs. "4.6.7"
When creating a new project in InstallShield, the default value for product version is "1.00.0000".
I find the extra zero's to hurt readability (think of elevated support call with user reading back version number...). Perhaps the zero's make it easier to compare versions when treating as strings.
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 07, 2011
01:26 PM
I did some simple testing with install condition. As expected, string comparisons require the extra padding to work properly. Otherwise "1.10.0" is treated as less than "1.9.0".
As such, I'll probably always add extra padding. What are others out there doing?
As such, I'll probably always add extra padding. What are others out there doing?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 18, 2011
03:55 PM
For completeness, I also tested the version values regarding the Upgrade table. It does not matter if padding is used or not, the upgrade entries all work as expected. This is true even for scenarios when the installed version had padding and upgrade entry did not, and vice versa.
In summary, there appears to be no problems with the short or long version strings with one exception: if you are doing your own string comparison such as an install condition (see previous post). If you think you may need to include a version in a condition, then perhaps consider padding otherwise it is pefecttly fine to use the no-padding approach.
In summary, there appears to be no problems with the short or long version strings with one exception: if you are doing your own string comparison such as an install condition (see previous post). If you think you may need to include a version in a condition, then perhaps consider padding otherwise it is pefecttly fine to use the no-padding approach.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 21, 2011
04:23 PM
That's correct, as the ProductVersion is stored and compared in numerical format, not as a string.
Note that padding doesn't help when doing a string comparison on the first part of a version number: alphabetically, 10.0 is less than 9.0, and you probably don't want to use 09.0.
Note that padding doesn't help when doing a string comparison on the first part of a version number: alphabetically, 10.0 is less than 9.0, and you probably don't want to use 09.0.
Stefan Krueger
InstallSite.org
InstallSite.org