I have to compare the versions of current file and already the installed in NSIS installer. I understand the version numbers are in string but I read at couple of places that the NSIS automaticaly converts the strings to intergers if needed in logic operations.
Just for the test purpose, I wrote the following script:
Var Test1
Var Test2
section
StrCpy $Test1 "4.3.1.50245"
StrCpy $Test2 "4.2.1.50245"
${If} $Test1 > $Test2
MessageBox MB_ICONSTOP "$Test1 is bigger than $Test2"
${Else}
MessageBox MB_ICONSTOP "$Test2 is bigger than $Test1"
${EndIf}
Quit
sectionEnd
PROBLEM: It gives me the result 4.2.1.50245
is greated than 4.3.1.50245
. However, it gives me correct results if I try to compare 4.2.1.50245
with 3.2.1.50245
(or if I compare 50245
and 40256
etc.)