Archive: Comparing values like 2.2.1 and 2.2


Comparing values like 2.2.1 and 2.2
I am having a problem when I compare values like "2.2" and "2.2.1". When I use StrCmp, IntCmp, or LogicLib the value "2.2.1" is seen as being equal to "2.2". Is there a function for comparing values like this and seeing if they are equal.


I am looking at versioncheck right now so please dont suggest it.


Using VersionCheck I compared the two values and check if the retured value was equal to 0.

Code:

Push "$Version"
Push "2.2"
Call VersionCheck
Pop $0
${If} $0 = 0
Code here
${EndIf}


Don't use VersionCheck. It doesn't work for all version numbers. Use VersionCompare which was written as a replacement:
http://nsis.sourceforge.net/VersionCompare

-Stu


thanks.