Archive: version finder


version finder
hello,

trying to write an installer that finds the version number of an already installed program(no entry in registry)kind of like installing a plugin to that version..Basically what ive been doing is starting at version 9.9.9 and going backwards from there manually, not using variables and math ala..


;*************************459****************************

; TESTS FOR Program 459
IfFileExists "$APPDATA\PROG\${PROG_VERS_459}\*.*" 0 no459
SetOutPath "$APPDATA\PROG\${PROG_VERS_459}\UserPresets"

;Call AddFiles
Goto endINSTALL
no459:

;*************************458****************************

; TESTS FOR Program 458
IfFileExists "$APPDATA\PROG\${PROG_VERS_458}\*.*" 0 no458
SetOutPath "$APPDATA\PROG\${PROG_VERS_458}\UserPresets"

;Call AddFiles
Goto endINSTALL
no458:

;*************************457****************************

; TESTS FOR Program 457
IfFileExists "$APPDATA\PROG\${PROG_VERS_457}\*.*" 0 no457
SetOutPath "$APPDATA\PROG\${PROG_VERS_457}\UserPresets"

;Call AddFiles
Goto endINSTALL
no457:
.........

well you get the idea. In C i would assign each version number to 3 ints and subtract but i cant figure out how to do it with the NSIS script system. ive looked a little at the math library but havent seen simple addition and subtraction...help would be greatly appreciated....
thanks
mike


Addition and substraction is done with IntOp. Click the link for some examples.


thanks alot:D

is there any function to test for equality of two integer variables?

mike


IntCmp?

-Stu