Archive: version compare


version compare
this can be used in sections, i need it in an function. is there another idea?


It would help if you provided some more info, which version compare code, error messages, etc.


It can be used in a function.


edit: $Version hast the value 5.0


Function bla

...

${VersionCompare} Version "7.0" $R0
Strcmp $R0 0 color_nored 0
Strcmp $R0 1 color_nored 0
Strcmp $R0 2 color_red 0


color_red:
pop $HWND
pop $R0
GetDlgItem $R0 $HWND 1204 ;1200 + Field # - 1
SetCtlColors $R0 FF0000 transparent

color_nored:

...

FunctionEnd



Invalid command: VersionCompare



E.3.16 VersionCompare
Compare version numbers.
Syntax:

${VersionCompare} "[Version1]" "[Version2]" $var
"[Version1]" ; First version
"[Version2]" ; Second version
$var ; Result:
; $var=0 Versions are equal
; $var=1 Version1 is newer
; $var=2 Version2 is newer
Example:

Section
${VersionCompare} "1.1.1.9" "1.1.1.01" $R0
; $R0="1"
SectionEnd

Did you use !insertmacro VersionCompare?


oh my god, i can't believe this.

yes i use it, but i have disabled it while testing another Problem.

thanks