cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
AaronM
Level 6

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.
Labels (1)
0 Kudos
3 Replies
AaronM
Level 6

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?
0 Kudos
AaronM
Level 6

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.
0 Kudos
Stefan_Krueger
Level 9

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.
Stefan Krueger
InstallSite.org
0 Kudos